Rev 4154 | Rev 4317 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4154 | Rev 4305 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | #include <fcntl.h> |
43 | #include <fcntl.h> |
44 | #include <task.h> |
44 | #include <task.h> |
45 | #include <malloc.h> |
45 | #include <malloc.h> |
46 | #include <macros.h> |
46 | #include <macros.h> |
47 | #include <console.h> |
47 | #include <console.h> |
- | 48 | #include <string.h> |
|
48 | #include "init.h" |
49 | #include "init.h" |
49 | #include "version.h" |
50 | #include "version.h" |
50 | 51 | ||
51 | static bool mount_fs(const char *fstype) |
52 | static bool mount_fs(const char *fstype) |
52 | { |
53 | { |
53 | int rc = -1; |
54 | int rc = -1; |
- | 55 | char *opts = ""; |
|
54 | 56 | ||
- | 57 | if (str_cmp(fstype, "tmpfs") == 0) |
|
- | 58 | opts = "restore"; |
|
- | 59 | ||
55 | while (rc < 0) { |
60 | while (rc < 0) { |
56 | rc = mount(fstype, "/", "initrd", IPC_FLAG_BLOCKING); |
61 | rc = mount(fstype, "/", "initrd", opts, IPC_FLAG_BLOCKING); |
57 | 62 | ||
58 | switch (rc) { |
63 | switch (rc) { |
59 | case EOK: |
64 | case EOK: |
60 | printf(NAME ": Root filesystem mounted\n"); |
65 | printf(NAME ": Root filesystem mounted\n"); |
61 | break; |
66 | break; |