More changes

This commit is contained in:
Bahadir Balban
2008-05-03 15:04:16 +01:00
parent 0557fa8910
commit 5efece98cd
2 changed files with 4 additions and 2 deletions

View File

@@ -645,7 +645,9 @@ int sys_write(l4id_t sender, int fd, void *buf, int count)
* of this change when the file is flushed (e.g. via fflush()
* or close())
*/
vmfile->length += count;
if (task->fd[fd].cursor + count > vmfile->length)
vmfile->length = task->fd[fd].cursor + count;
task->fd[fd].cursor += count;
retval = count;

View File

@@ -87,7 +87,7 @@ int file_page_out(struct vm_object *vm_obj, unsigned long page_offset)
/* Map the page to vfs task */
l4_map(paddr, vaddr, 1, MAP_USR_RW_FLAGS, VFS_TID);
/* Syscall to vfs to read into the page. */
/* Syscall to vfs to write page back to file. */
if ((err = vfs_write(vm_file_to_vnum(f), page_offset, 1, vaddr)) < 0)
goto out_err;