55,13 → 55,13 |
usleep(50000); // FIXME |
} |
|
static bool mount_tmpfs(void) |
static bool mount_fs(const char *fstype) |
{ |
int rc = -1; |
|
while (rc < 0) { |
rc = mount("tmpfs", "/", "initrd"); |
|
rc = mount(fstype, "/", "initrd"); |
|
switch (rc) { |
case EOK: |
printf(NAME ": Root filesystem mounted\n"); |
72,6 → 72,9 |
case ELIMIT: |
printf(NAME ": Unable to mount root filesystem\n"); |
return false; |
case ENOENT: |
printf(NAME ": Unknown filesystem type (%s)\n", fstype); |
return false; |
default: |
sleep(5); // FIXME |
} |
100,7 → 103,7 |
info_print(); |
sleep(5); // FIXME |
|
if (!mount_tmpfs()) { |
if (!mount_fs("tmpfs") && !mount_fs("fat")) { |
printf(NAME ": Exiting\n"); |
return -1; |
} |
115,11 → 118,7 |
console_wait(); |
version_print(); |
|
spawn("/sbin/fat"); |
spawn("/sbin/tetris"); |
spawn("/sbin/cli"); |
// FIXME: spawn("/sbin/tester"); |
spawn("/sbin/klog"); |
spawn("/sbin/bdsh"); |
|
free(buf); |
return 0; |