diff --git a/sys/src/kern/boot/embed.c b/sys/src/kern/boot/embed.c index b838d94..ec7179b 100644 --- a/sys/src/kern/boot/embed.c +++ b/sys/src/kern/boot/embed.c @@ -48,7 +48,9 @@ connectembed(void) free(dir); print("paqfs..."); - if(bind("#c", "/dev", MREPL) < 0) + if(bind("#0", "/dev", MREPL) < 0) + fatal("bind #0"); + if(bind("#c", "/dev", MAFTER) < 0) fatal("bind #c"); if(bind("#p", "/proc", MREPL) < 0) fatal("bind #p"); diff --git a/sys/src/kern/boot/local.c b/sys/src/kern/boot/local.c index 9f93c4e..60e3a85 100644 --- a/sys/src/kern/boot/local.c +++ b/sys/src/kern/boot/local.c @@ -134,7 +134,9 @@ connectlocal(void) { int fd; - if(bind("#c", "/dev", MREPL) < 0) + if(bind("#0", "/dev", MREPL) < 0) + fatal("bind #0"); + if(bind("#c", "/dev", MAFTER) < 0) fatal("bind #c"); if(bind("#p", "/proc", MREPL) < 0) fatal("bind #p"); diff --git a/sys/src/kern/port/initcode.c b/sys/src/kern/port/initcode.c index 1654552..45881ee 100644 --- a/sys/src/kern/port/initcode.c +++ b/sys/src/kern/port/initcode.c @@ -30,6 +30,7 @@ char c[] = "#c"; char e[] = "#e"; char ec[] = "#ec"; char s[] = "#s"; +char self[] = "#0"; char srv[] = "/srv"; char env[] = "/env"; char arg1[] = "-qas"; @@ -95,6 +96,7 @@ startboot(char *argv0, char **argv) for(i = 0; i < sizeof buf; ++i) buf[i] = '\0'; + bind(self, dev, MREPL); bind(c, dev, MAFTER); bind(ec, env, MAFTER); bind(e, env, MCREATE|MAFTER);