Subversion Repositories HelenOS

Rev

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

Rev 2708 Rev 2709
Line 368... Line 368...
368
        ipc_answer_0(rid, fd);
368
        ipc_answer_0(rid, fd);
369
        return;
369
        return;
370
    }
370
    }
371
    vfs_file_t *file = vfs_file_get(fd);
371
    vfs_file_t *file = vfs_file_get(fd);
372
    file->node = node;
372
    file->node = node;
-
 
373
    if (oflag & O_APPEND)
-
 
374
        file->append = true;
373
 
375
 
374
    /*
376
    /*
375
     * The following increase in reference count is for the fact that the
377
     * The following increase in reference count is for the fact that the
376
     * file is being opened and that a file structure is pointing to it.
378
     * file is being opened and that a file structure is pointing to it.
377
     * It is necessary so that the file will not disappear when
379
     * It is necessary so that the file will not disappear when
Line 441... Line 443...
441
    int fs_phone = vfs_grab_phone(file->node->fs_handle);  
443
    int fs_phone = vfs_grab_phone(file->node->fs_handle);  
442
   
444
   
443
    /* Make a VFS_READ/VFS_WRITE request at the destination FS server. */
445
    /* Make a VFS_READ/VFS_WRITE request at the destination FS server. */
444
    aid_t msg;
446
    aid_t msg;
445
    ipc_call_t answer;
447
    ipc_call_t answer;
-
 
448
    if (!read && file->append)
-
 
449
        file->pos = file->node->size;
446
    msg = async_send_3(fs_phone, IPC_GET_METHOD(*request),
450
    msg = async_send_3(fs_phone, IPC_GET_METHOD(*request),
447
        file->node->dev_handle, file->node->index, file->pos, &answer);
451
        file->node->dev_handle, file->node->index, file->pos, &answer);
448
   
452
   
449
    /*
453
    /*
450
     * Forward the IPC_M_DATA_READ/IPC_M_DATA_WRITE request to the
454
     * Forward the IPC_M_DATA_READ/IPC_M_DATA_WRITE request to the