Subversion Repositories HelenOS

Rev

Rev 4485 | Rev 4549 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4485 Rev 4536
Line 55... Line 55...
55
 
55
 
56
static bool mount_root(const char *fstype)
56
static bool mount_root(const char *fstype)
57
{
57
{
58
    int rc = -1;
58
    int rc = -1;
59
    char *opts = "";
59
    char *opts = "";
-
 
60
    const char *root_dev = "initrd";
60
   
61
   
61
    if (str_cmp(fstype, "tmpfs") == 0)
62
    if (str_cmp(fstype, "tmpfs") == 0)
62
        opts = "restore";
63
        opts = "restore";
63
 
64
 
64
    while (rc < 0) {
65
    while (rc < 0) {
65
        rc = mount(fstype, "/", "initrd", opts, IPC_FLAG_BLOCKING);
66
        rc = mount(fstype, "/", root_dev, opts, IPC_FLAG_BLOCKING);
66
       
67
       
67
        switch (rc) {
68
        switch (rc) {
68
        case EOK:
69
        case EOK:
69
            printf(NAME ": Root filesystem mounted\n");
70
            printf(NAME ": Root filesystem mounted, %s at %s\n",
-
 
71
                fstype, root_dev);
70
            break;
72
            break;
71
        case EBUSY:
73
        case EBUSY:
72
            printf(NAME ": Root filesystem already mounted\n");
74
            printf(NAME ": Root filesystem already mounted\n");
73
            break;
75
            break;
74
        case ELIMIT:
76
        case ELIMIT: