Rev 2553 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2553 | Rev 2554 | ||
---|---|---|---|
Line 191... | Line 191... | ||
191 | return; |
191 | return; |
192 | } |
192 | } |
193 | } |
193 | } |
194 | futex_up(&rootfs_futex); |
194 | futex_up(&rootfs_futex); |
195 | 195 | ||
- | 196 | free(buf); /* The buffer is not needed anymore. */ |
|
- | 197 | ||
196 | /* |
198 | /* |
197 | * At this point, we have all necessary pieces: file system and device |
199 | * At this point, we have all necessary pieces: file system and device |
198 | * handles, and we know the mount point VFS node and also the root node |
200 | * handles, and we know the mount point VFS node and also the root node |
199 | * of the file system being mounted. |
201 | * of the file system being mounted. |
200 | */ |
202 | */ |
201 | 203 | ||
- | 204 | int phone = vfs_grab_phone(mp.fs_handle); |
|
- | 205 | /* Later we can use ARG3 to pass mode/flags. */ |
|
- | 206 | aid_t req1 = async_send_3(phone, VFS_MOUNT, (ipcarg_t) mp.dev_handle, |
|
- | 207 | (ipcarg_t) mp.index, 0, NULL); |
|
- | 208 | /* The second call uses the same method. */ |
|
- | 209 | aid_t req2 = async_send_3(phone, VFS_MOUNT, |
|
- | 210 | (ipcarg_t) mounted_root.fs_handle, |
|
- | 211 | (ipcarg_t) mounted_root.dev_handle, (ipcarg_t) mounted_root.index, |
|
- | 212 | NULL); |
|
- | 213 | ||
- | 214 | ipcarg_t rc1; |
|
- | 215 | ipcarg_t rc2; |
|
- | 216 | async_wait_for(req1, &rc1); |
|
- | 217 | async_wait_for(req2, &rc2); |
|
- | 218 | vfs_release_phone(phone); |
|
- | 219 | ||
- | 220 | if ((rc1 == EOK) && (rc2 == EOK)) |
|
- | 221 | ipc_answer_fast(rid, EOK, 0, 0); |
|
- | 222 | else if (rc1 != EOK) |
|
- | 223 | ipc_answer_fast(rid, rc1, 0, 0); |
|
- | 224 | else |
|
- | 225 | ipc_answer_fast(rid, rc2, 0, 0); |
|
202 | } |
226 | } |
203 | 227 | ||
204 | /** |
228 | /** |
205 | * @} |
229 | * @} |
206 | */ |
230 | */ |