Subversion Repositories HelenOS

Rev

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

Rev 2676 Rev 2677
Line 268... Line 268...
268
    dprintf("Callback connection to FS created.\n");
268
    dprintf("Callback connection to FS created.\n");
269
 
269
 
270
    /*
270
    /*
271
     * The client will want us to send him the address space area with PLB.
271
     * The client will want us to send him the address space area with PLB.
272
     */
272
     */
-
 
273
 
273
    callid = async_get_call(&call);
274
    if (!ipc_share_in_receive(&callid, &size)) {
274
    if (IPC_GET_METHOD(call) != IPC_M_AS_AREA_RECV) {
-
 
275
        dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
275
        dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
276
        list_remove(&fs_info->fs_link);
276
        list_remove(&fs_info->fs_link);
277
        futex_up(&fs_head_futex);
277
        futex_up(&fs_head_futex);
278
        ipc_hangup(fs_info->phone);
278
        ipc_hangup(fs_info->phone);
279
        free(fs_info);
279
        free(fs_info);
Line 283... Line 283...
283
    }
283
    }
284
   
284
   
285
    /*
285
    /*
286
     * We can only send the client address space area PLB_SIZE bytes long.
286
     * We can only send the client address space area PLB_SIZE bytes long.
287
     */
287
     */
288
    size = IPC_GET_ARG2(call);
-
 
289
    if (size != PLB_SIZE) {
288
    if (size != PLB_SIZE) {
290
        dprintf("Client suggests wrong size of PFB, size = %d\n", size);
289
        dprintf("Client suggests wrong size of PFB, size = %d\n", size);
291
        list_remove(&fs_info->fs_link);
290
        list_remove(&fs_info->fs_link);
292
        futex_up(&fs_head_futex);
291
        futex_up(&fs_head_futex);
293
        ipc_hangup(fs_info->phone);
292
        ipc_hangup(fs_info->phone);
Line 298... Line 297...
298
    }
297
    }
299
 
298
 
300
    /*
299
    /*
301
     * Commit to read-only sharing the PLB with the client.
300
     * Commit to read-only sharing the PLB with the client.
302
     */
301
     */
303
    ipc_answer_2(callid, EOK, (ipcarg_t) plb,
302
    (void) ipc_share_in_deliver(callid, plb,
304
        (ipcarg_t) (AS_AREA_READ | AS_AREA_CACHEABLE));
303
        AS_AREA_READ | AS_AREA_CACHEABLE);
305
 
304
 
306
    dprintf("Sharing PLB.\n");
305
    dprintf("Sharing PLB.\n");
307
 
306
 
308
    /*
307
    /*
309
     * That was it. The FS has been registered.
308
     * That was it. The FS has been registered.