diff options
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/fs/misc.c | 5 | ||||
-rw-r--r-- | src/init/main.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/init/fs/misc.c b/src/init/fs/misc.c index ddb230f..f140910 100644 --- a/src/init/fs/misc.c +++ b/src/init/fs/misc.c @@ -149,10 +149,11 @@ void fs_dir_inject(const char *path) { struct fs_dir_handle h = handles[res.id]; int out_len = 0; - while (h.inject[out_len] != '/') + while (h.inject[out_len] && h.inject[out_len] != '/') + out_len++; + if (h.inject[out_len] == '/') out_len++; memcpy(buf, h.inject, out_len); - buf[out_len++] = '/'; buf[out_len++] = '\0'; if (h.delegate >= 0) { diff --git a/src/init/main.c b/src/init/main.c index b5ef22f..3460417 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -22,11 +22,11 @@ int main(void) { // allocate bss _syscall_memflag(&_bss_start, &_bss_end - &_bss_start, MEMFLAG_PRESENT); - MOUNT("/init", tar_driver(&_initrd)); + MOUNT("/init/", tar_driver(&_initrd)); MOUNT("/keyboard", ps2_drv()); MOUNT("/vga_tty", ansiterm_drv()); - MOUNT("/bind", fs_passthru(NULL)); + MOUNT("/bind/", fs_passthru(NULL)); if (!_syscall_fork()) { __stdin = __stdout = _syscall_open(argify("/com1")); |