Changeset 0928526 in mainline for uspace/app/init/init.c


Ignore:
Timestamp:
2008-08-04T21:15:13Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
677f620
Parents:
6e0e8c9
Message:

Boot infrastructure support for FAT16 init ramdisks.
Only amd64 so far.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/init/init.c

    r6e0e8c9 r0928526  
    5252}
    5353
    54 static bool mount_tmpfs(void)
     54static bool mount_fs(const char *fstype)
    5555{
    5656        int rc = -1;
    5757       
    5858        while (rc < 0) {
    59                 rc = mount("tmpfs", "/", "initrd");
     59                rc = mount(fstype, "/", "initrd");
    6060               
    6161                switch (rc) {
     
    9696        info_print();
    9797        sleep(5);       // FIXME
     98        bool has_tmpfs = false;
     99        bool has_fat = false;
    98100       
    99         if (!mount_tmpfs()) {
     101        if (!(has_tmpfs = mount_fs("tmpfs")) && !(has_fat = mount_fs("fat"))) {
    100102                printf(NAME ": Exiting\n");
    101103                return -1;
     
    110112        version_print();
    111113       
    112         spawn("/sbin/fat");
     114        /*
     115         * Spawn file system servers that were not loaded as init tasks.
     116         */
     117        if (!has_fat)
     118                spawn("/sbin/fat");
     119        if (!has_tmpfs)
     120                spawn("/sbin/tmpfs");
     121               
    113122        spawn("/sbin/tetris");
    114123        spawn("/sbin/cli");
Note: See TracChangeset for help on using the changeset viewer.