Rev 2657 | Rev 2665 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2657 | Rev 2660 | ||
|---|---|---|---|
| Line 51... | Line 51... | ||
| 51 | 51 | ||
| 52 | /* 2. mount TMPFS as / */ |
52 | /* 2. mount TMPFS as / */ |
| 53 | ipcarg_t rc; |
53 | ipcarg_t rc; |
| 54 | aid_t req; |
54 | aid_t req; |
| 55 | req = async_send_1(vfs_phone, VFS_MOUNT, TMPFS_DEVHANDLE, NULL); |
55 | req = async_send_1(vfs_phone, VFS_MOUNT, TMPFS_DEVHANDLE, NULL); |
| 56 | if (ipc_data_send(vfs_phone, fs_name, strlen(fs_name)) != EOK) { |
56 | if (ipc_data_write_send(vfs_phone, fs_name, strlen(fs_name)) != EOK) { |
| 57 | async_wait_for(req, &rc); |
57 | async_wait_for(req, &rc); |
| 58 | return "Could not send fs_name to VFS.\n"; |
58 | return "Could not send fs_name to VFS.\n"; |
| 59 | } |
59 | } |
| 60 | if (ipc_data_send(vfs_phone, mp, strlen(mp)) != EOK) { |
60 | if (ipc_data_write_send(vfs_phone, mp, strlen(mp)) != EOK) { |
| 61 | async_wait_for(req, &rc); |
61 | async_wait_for(req, &rc); |
| 62 | return "Could not send mp to VFS.\n"; |
62 | return "Could not send mp to VFS.\n"; |
| 63 | } |
63 | } |
| 64 | async_wait_for(req, &rc); |
64 | async_wait_for(req, &rc); |
| 65 | if (rc != EOK) { |
65 | if (rc != EOK) { |
| Line 68... | Line 68... | ||
| 68 | 68 | ||
| 69 | /* 3. open some files */ |
69 | /* 3. open some files */ |
| 70 | char *path = "/dir2/file2"; |
70 | char *path = "/dir2/file2"; |
| 71 | ipc_call_t answer; |
71 | ipc_call_t answer; |
| 72 | req = async_send_2(vfs_phone, VFS_OPEN, 0, 0, &answer); |
72 | req = async_send_2(vfs_phone, VFS_OPEN, 0, 0, &answer); |
| 73 | if (ipc_data_send(vfs_phone, path, strlen(path)) != EOK) { |
73 | if (ipc_data_write_send(vfs_phone, path, strlen(path)) != EOK) { |
| 74 | async_wait_for(req, &rc); |
74 | async_wait_for(req, &rc); |
| 75 | return "Could not send path to VFS.\n"; |
75 | return "Could not send path to VFS.\n"; |
| 76 | } |
76 | } |
| 77 | async_wait_for(req, &rc); |
77 | async_wait_for(req, &rc); |
| 78 | if (rc != EOK) { |
78 | if (rc != EOK) { |