Rev 4317 | Rev 4485 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4317 | Rev 4417 | ||
---|---|---|---|
Line 77... | Line 77... | ||
77 | } |
77 | } |
78 | 78 | ||
79 | return true; |
79 | return true; |
80 | } |
80 | } |
81 | 81 | ||
- | 82 | static bool mount_devfs(void) |
|
- | 83 | { |
|
- | 84 | int rc = -1; |
|
- | 85 | ||
- | 86 | while (rc < 0) { |
|
- | 87 | rc = mount("devfs", "/dev", "null", "", IPC_FLAG_BLOCKING); |
|
- | 88 | ||
- | 89 | switch (rc) { |
|
- | 90 | case EOK: |
|
- | 91 | printf(NAME ": Device filesystem mounted\n"); |
|
- | 92 | break; |
|
- | 93 | case EBUSY: |
|
- | 94 | printf(NAME ": Device filesystem already mounted\n"); |
|
- | 95 | break; |
|
- | 96 | case ELIMIT: |
|
- | 97 | printf(NAME ": Unable to mount device filesystem\n"); |
|
- | 98 | return false; |
|
- | 99 | case ENOENT: |
|
- | 100 | printf(NAME ": Unknown filesystem type (devfs)\n"); |
|
- | 101 | return false; |
|
- | 102 | } |
|
- | 103 | } |
|
- | 104 | ||
- | 105 | return true; |
|
- | 106 | } |
|
- | 107 | ||
82 | static void spawn(char *fname) |
108 | static void spawn(char *fname) |
83 | { |
109 | { |
84 | char *argv[2]; |
110 | char *argv[2]; |
85 | 111 | ||
86 | printf(NAME ": Spawning %s\n", fname); |
112 | printf(NAME ": Spawning %s\n", fname); |
Line 99... | Line 125... | ||
99 | if (!mount_fs(STRING(RDFMT))) { |
125 | if (!mount_fs(STRING(RDFMT))) { |
100 | printf(NAME ": Exiting\n"); |
126 | printf(NAME ": Exiting\n"); |
101 | return -1; |
127 | return -1; |
102 | } |
128 | } |
103 | 129 | ||
104 | // FIXME: spawn("/srv/pci"); |
130 | spawn("/srv/devfs"); |
- | 131 | ||
- | 132 | if (!mount_devfs()) { |
|
- | 133 | return(NAME ": Exiting\n"); |
|
- | 134 | return -2; |
|
- | 135 | } |
|
- | 136 | ||
105 | spawn("/srv/fb"); |
137 | spawn("/srv/fb"); |
106 | spawn("/srv/kbd"); |
138 | spawn("/srv/kbd"); |
107 | spawn("/srv/console"); |
139 | spawn("/srv/console"); |
108 | spawn("/srv/fhc"); |
140 | spawn("/srv/fhc"); |
109 | spawn("/srv/obio"); |
141 | spawn("/srv/obio"); |