diff options
author | dzwdz | 2023-09-11 03:17:23 +0200 |
---|---|---|
committer | dzwdz | 2023-09-11 03:17:23 +0200 |
commit | 1e54db260811d0d759e76be725d50f4b59d0fc41 (patch) | |
tree | 7e7fabe0ec777fd6aa9d1847e746a415f31ea12e /src/cmd | |
parent | 73ea9f2e3556dd753b32ac4a2c34581a4126eab1 (diff) |
*: rename /kdev/ to /dev/
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/drawmouse/drawmouse.c | 4 | ||||
-rw-r--r-- | src/cmd/dvd/dvd.c | 2 | ||||
-rw-r--r-- | src/cmd/init/driver/ps2.c | 3 | ||||
-rw-r--r-- | src/cmd/init/init.c | 14 | ||||
-rw-r--r-- | src/cmd/vterm/vterm.c | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/src/cmd/drawmouse/drawmouse.c b/src/cmd/drawmouse/drawmouse.c index c65030c..f20d9bd 100644 --- a/src/cmd/drawmouse/drawmouse.c +++ b/src/cmd/drawmouse/drawmouse.c @@ -49,13 +49,13 @@ struct packet { int main(void) { char buf[64]; - hid_t fd = camellia_open("/kdev/ps2/mouse", OPEN_READ); + hid_t fd = camellia_open("/dev/ps2/mouse", OPEN_READ); if (fd < 0) { err(1, "open"); return 1; } - if (fb_setup(&fb, "/kdev/video/") < 0) { + if (fb_setup(&fb, "/dev/video/") < 0) { err(1, "fb_setup"); return 1; } diff --git a/src/cmd/dvd/dvd.c b/src/cmd/dvd/dvd.c index b20858d..0b5caaf 100644 --- a/src/cmd/dvd/dvd.c +++ b/src/cmd/dvd/dvd.c @@ -21,7 +21,7 @@ void draw_rect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t col) { } int main(void) { - if (fb_setup(&fb, "/kdev/video/") < 0) { + if (fb_setup(&fb, "/dev/video/") < 0) { err(1, "fb_setup"); return 1; } diff --git a/src/cmd/init/driver/ps2.c b/src/cmd/init/driver/ps2.c index 874e672..d0480bc 100644 --- a/src/cmd/init/driver/ps2.c +++ b/src/cmd/init/driver/ps2.c @@ -1,5 +1,6 @@ #include "driver.h" #include <assert.h> +#include <camellia.h> #include <camellia/compat.h> #include <camellia/syscalls.h> #include <err.h> @@ -94,7 +95,7 @@ static void kb_thread(void *unused) { int fd; (void)unused; - fd = _sys_open("/kdev/ps2/kb", 12, 0); + fd = camellia_open("/dev/ps2/kb", OPEN_READ); if (fd < 0) err(1, "open"); while (true) { diff --git a/src/cmd/init/init.c b/src/cmd/init/init.c index 8682dd5..acb6a8f 100644 --- a/src/cmd/init/init.c +++ b/src/cmd/init/init.c @@ -44,8 +44,8 @@ void redirect(const char *exe, const char *out, const char *in) { int main(void) { hid_t killswitch_pipe[2]; - freopen("/kdev/com1", "a+", stdout); - freopen("/kdev/com1", "a+", stderr); + freopen("/dev/com1", "a+", stdout); + freopen("/dev/com1", "a+", stderr); MOUNT_AT("/") { fs_dirinject2((const char*[]){ @@ -62,7 +62,7 @@ int main(void) { } MOUNT_AT("/keyboard") { - MOUNT_AT("/") { fs_whitelist((const char*[]){"/kdev/ps2/kb", NULL}); } + MOUNT_AT("/") { fs_whitelist((const char*[]){"/dev/ps2/kb", NULL}); } ps2_drv(); } MOUNT_AT("/usr/") { @@ -99,14 +99,14 @@ int main(void) { execv(argv[0], (void*)argv); } MOUNT_AT("/vtty") { - const char *allow[] = {"/bin/vterm", "/kdev/video/", "/keyboard", "/init/usr/share/fonts/", NULL}; + const char *allow[] = {"/bin/vterm", "/dev/video/", "/keyboard", "/init/usr/share/fonts/", NULL}; const char *argv[] = {"/bin/vterm", NULL}; MOUNT_AT("/") { fs_whitelist(allow); } execv(argv[0], (void*)argv); } MOUNT_AT("/net/") { - const char *allow[] = {"/bin/netstack", "/kdev/eth", NULL}; - const char *argv[] = {"/bin/netstack", "/kdev/eth", "192.168.0.11", "192.168.0.2", NULL}; + const char *allow[] = {"/bin/netstack", "/dev/eth", NULL}; + const char *argv[] = {"/bin/netstack", "/dev/eth", "192.168.0.11", "192.168.0.2", NULL}; MOUNT_AT("/") { fs_whitelist(allow); } execv(argv[0], (void*)argv); } @@ -124,7 +124,7 @@ int main(void) { if (!fork()) { // TODO close on exec close(killswitch_pipe[0]); - redirect("/bin/shell", "/kdev/com1", "/kdev/com1"); + redirect("/bin/shell", "/dev/com1", "/dev/com1"); redirect("/bin/shell", "/vtty", "/keyboard"); exit(1); } diff --git a/src/cmd/vterm/vterm.c b/src/cmd/vterm/vterm.c index 97149c9..f4db528 100644 --- a/src/cmd/vterm/vterm.c +++ b/src/cmd/vterm/vterm.c @@ -37,7 +37,7 @@ void in_char(char c) { } int main(void) { - if (fb_setup(&fb, "/kdev/video/") < 0) { + if (fb_setup(&fb, "/dev/video/") < 0) { err(1, "fb_setup"); return 1; } |