summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/amd64/driver')
-rw-r--r--src/kernel/arch/amd64/driver/fsroot.c36
-rw-r--r--src/kernel/arch/amd64/driver/pata.c2
-rw-r--r--src/kernel/arch/amd64/driver/ps2.c2
-rw-r--r--src/kernel/arch/amd64/driver/rtl8139.c2
-rw-r--r--src/kernel/arch/amd64/driver/serial.c2
-rw-r--r--src/kernel/arch/amd64/driver/video.c2
6 files changed, 23 insertions, 23 deletions
diff --git a/src/kernel/arch/amd64/driver/fsroot.c b/src/kernel/arch/amd64/driver/fsroot.c
index 0eef12f..2684b72 100644
--- a/src/kernel/arch/amd64/driver/fsroot.c
+++ b/src/kernel/arch/amd64/driver/fsroot.c
@@ -12,23 +12,23 @@
enum {
Hbase,
- Hkdev,
+ Hdev,
};
static int
-get_kdev(char *lst)
+get_dev(char *lst)
{
int len = 0;
for (VfsMount *m = vfs_mount_seed(); m; m = m->prev) {
if (m->prefix_len == 0) {
continue; /* that's us */
}
- assert(m->prefix_len > 6);
- assert(memcmp(m->prefix, "/kdev/", 6) == 0);
- len += m->prefix_len - 6 + 1;
+ assert(m->prefix_len > 5);
+ assert(memcmp(m->prefix, "/dev/", 5) == 0);
+ len += m->prefix_len - 5 + 1;
if (lst) {
- memcpy(lst, m->prefix + 6, m->prefix_len - 6);
- lst += m->prefix_len - 6;
+ memcpy(lst, m->prefix + 5, m->prefix_len - 5);
+ lst += m->prefix_len - 5;
*lst++ = '\0';
}
}
@@ -38,8 +38,8 @@ get_kdev(char *lst)
static long
handle(VfsReq *req)
{
- static char *kdev = NULL;
- static int kdev_len = 0;
+ static char *dev = NULL;
+ static int dev_len = 0;
const char *lst = NULL;
int len = 0;
@@ -47,17 +47,17 @@ handle(VfsReq *req)
if (req->type != VFSOP_OPEN) {
switch ((uintptr_t __force)req->id) {
case Hbase:
- lst = "kdev/";
+ lst = "dev/";
len = strlen(lst) + 1;
break;
- case Hkdev:
- if (!kdev) {
- kdev_len = get_kdev(NULL);
- kdev = kmalloc(kdev_len);
- get_kdev(kdev);
+ case Hdev:
+ if (!dev) {
+ dev_len = get_dev(NULL);
+ dev = kmalloc(dev_len);
+ get_dev(dev);
}
- lst = kdev;
- len = kdev_len;
+ lst = dev;
+ len = dev_len;
break;
default:
assert(false);
@@ -67,7 +67,7 @@ handle(VfsReq *req)
switch (req->type) {
case VFSOP_OPEN:
if (reqpathcmp(req, "/")) return Hbase;
- if (reqpathcmp(req, "/kdev/")) return Hkdev;
+ if (reqpathcmp(req, "/dev/")) return Hdev;
return -ENOENT;
case VFSOP_READ:
return req_readcopy(req, lst, len);
diff --git a/src/kernel/arch/amd64/driver/pata.c b/src/kernel/arch/amd64/driver/pata.c
index da8b541..cc6645d 100644
--- a/src/kernel/arch/amd64/driver/pata.c
+++ b/src/kernel/arch/amd64/driver/pata.c
@@ -13,7 +13,7 @@ static const int root_id = 100;
static void accept(VfsReq *req);
void pata_init(void) {
ata_init();
- vfs_root_register("/kdev/ata/", accept);
+ vfs_root_register("/dev/ata/", accept);
}
static void accept(VfsReq *req) {
diff --git a/src/kernel/arch/amd64/driver/ps2.c b/src/kernel/arch/amd64/driver/ps2.c
index f2a98a2..f0c5f2c 100644
--- a/src/kernel/arch/amd64/driver/ps2.c
+++ b/src/kernel/arch/amd64/driver/ps2.c
@@ -58,7 +58,7 @@ void ps2_init(void) {
irq_fn[IRQ_PS2KB] = ps2_irq;
irq_fn[IRQ_PS2MOUSE] = ps2_irq;
- vfs_root_register("/kdev/ps2/", accept);
+ vfs_root_register("/dev/ps2/", accept);
}
static void ps2_irq(void) {
diff --git a/src/kernel/arch/amd64/driver/rtl8139.c b/src/kernel/arch/amd64/driver/rtl8139.c
index d55a58f..42b2abb 100644
--- a/src/kernel/arch/amd64/driver/rtl8139.c
+++ b/src/kernel/arch/amd64/driver/rtl8139.c
@@ -80,7 +80,7 @@ void rtl8139_init(uint32_t bdf) {
rx_irq_enable(false);
- vfs_root_register("/kdev/eth", accept);
+ vfs_root_register("/dev/eth", accept);
}
static void rtl8139_irq(void) {
diff --git a/src/kernel/arch/amd64/driver/serial.c b/src/kernel/arch/amd64/driver/serial.c
index 4ee8639..6f383a3 100644
--- a/src/kernel/arch/amd64/driver/serial.c
+++ b/src/kernel/arch/amd64/driver/serial.c
@@ -20,7 +20,7 @@ static VfsReq *hung_reads = NULL;
void serial_init(void) {
if (COM1_exists) {
- vfs_root_register("/kdev/com1", accept);
+ vfs_root_register("/dev/com1", accept);
}
}
diff --git a/src/kernel/arch/amd64/driver/video.c b/src/kernel/arch/amd64/driver/video.c
index 390e8dd..5ce9a30 100644
--- a/src/kernel/arch/amd64/driver/video.c
+++ b/src/kernel/arch/amd64/driver/video.c
@@ -65,5 +65,5 @@ void video_init(GfxInfo fb_) {
fb = fb_;
snprintf(namebuf, sizeof namebuf, "%ux%ux%u", fb.width, fb.height, fb.bpp);
namelen = strlen(namebuf);
- vfs_root_register("/kdev/video/", accept);
+ vfs_root_register("/dev/video/", accept);
}