/trunk/uspace/srv/vfs/vfs_ops.c |
---|
370,6 → 370,8 |
} |
vfs_file_t *file = vfs_file_get(fd); |
file->node = node; |
if (oflag & O_APPEND) |
file->append = true; |
/* |
* The following increase in reference count is for the fact that the |
443,6 → 445,8 |
/* Make a VFS_READ/VFS_WRITE request at the destination FS server. */ |
aid_t msg; |
ipc_call_t answer; |
if (!read && file->append) |
file->pos = file->node->size; |
msg = async_send_3(fs_phone, IPC_GET_METHOD(*request), |
file->node->dev_handle, file->node->index, file->pos, &answer); |
/trunk/uspace/srv/vfs/vfs.h |
---|
204,6 → 204,9 |
/** Number of file handles referencing this file. */ |
unsigned refcnt; |
/** Append on write. */ |
bool append; |
/** Current position in the file. */ |
off_t pos; |
} vfs_file_t; |