Subversion Repositories HelenOS

Rev

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

Rev 3343 Rev 3397
Line 203... Line 203...
203
         */
203
         */
204
        rwlock_write_unlock(&namespace_rwlock);
204
        rwlock_write_unlock(&namespace_rwlock);
205
    } else {
205
    } else {
206
        /* We still don't have the root file system mounted. */
206
        /* We still don't have the root file system mounted. */
207
        if ((size == 1) && (buf[0] == '/')) {
207
        if ((size == 1) && (buf[0] == '/')) {
-
 
208
            vfs_lookup_res_t mr_res;
-
 
209
            vfs_node_t *mr_node;
-
 
210
            ipcarg_t rindex;
-
 
211
            ipcarg_t rsize;
-
 
212
            ipcarg_t rlnkcnt;
-
 
213
       
208
            /*
214
            /*
209
             * For this simple, but important case,
215
             * For this simple, but important case,
210
             * we are almost done.
216
             * we are almost done.
211
             */
217
             */
212
            free(buf);
218
            free(buf);
213
           
219
           
214
            /* Tell the mountee that it is being mounted. */
220
            /* Tell the mountee that it is being mounted. */
215
            phone = vfs_grab_phone(fs_handle);
221
            phone = vfs_grab_phone(fs_handle);
216
            rc = async_req_1_0(phone, VFS_MOUNTED,
222
            rc = async_req_1_3(phone, VFS_MOUNTED,
217
                (ipcarg_t) dev_handle);
223
                (ipcarg_t) dev_handle, &rindex, &rsize, &rlnkcnt);
218
            vfs_release_phone(phone);
224
            vfs_release_phone(phone);
219
 
225
           
220
            if (rc == EOK) {
226
            if (rc != EOK) {
221
                rootfs.fs_handle = fs_handle;
227
                futex_up(&rootfs_futex);
222
                rootfs.dev_handle = dev_handle;
228
                ipc_answer_0(rid, rc);
-
 
229
                return;
223
            }
230
            }
224
 
231
 
-
 
232
            mr_res.triplet.fs_handle = fs_handle;
-
 
233
            mr_res.triplet.dev_handle = dev_handle;
-
 
234
            mr_res.triplet.index = (fs_index_t) rindex;
-
 
235
            mr_res.size = (size_t) rsize;
-
 
236
            mr_res.lnkcnt = (unsigned) rlnkcnt;
-
 
237
 
-
 
238
            rootfs.fs_handle = fs_handle;
-
 
239
            rootfs.dev_handle = dev_handle;
225
            futex_up(&rootfs_futex);
240
            futex_up(&rootfs_futex);
-
 
241
 
-
 
242
            /* Add reference to the mounted root. */
-
 
243
            mr_node = vfs_node_get(&mr_res);
-
 
244
            assert(mr_node);
-
 
245
 
226
            ipc_answer_0(rid, rc);
246
            ipc_answer_0(rid, rc);
227
            return;
247
            return;
228
        } else {
248
        } else {
229
            /*
249
            /*
230
             * We can't resolve this without the root filesystem
250
             * We can't resolve this without the root filesystem