kernel/boot: bind #0 wherever #c is bound

This commit is contained in:
Giacomo Tesio 2017-01-02 00:40:27 +01:00
parent ac15346de7
commit 8e7f47c743
3 changed files with 8 additions and 2 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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);