Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2709 → Rev 2710

/trunk/uspace/srv/fs/tmpfs/tmpfs.c
115,6 → 115,9
case VFS_READ:
tmpfs_read(callid, &call);
break;
case VFS_WRITE:
tmpfs_write(callid, &call);
break;
default:
ipc_answer_0(callid, ENOTSUP);
break;
/trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c
497,7 → 497,7
if (pos + len <= dentry->size) {
/* The file size is not changing. */
(void) ipc_data_write_finalize(callid, dentry->data + pos, len);
ipc_answer_1(rid, EOK, len);
ipc_answer_2(rid, EOK, len, dentry->size);
return;
}
size_t delta = (pos + len) - dentry->size;
511,7 → 511,7
void *newdata = realloc(dentry->data, dentry->size + delta);
if (!newdata) {
ipc_answer_0(callid, ENOMEM);
ipc_answer_1(rid, EOK, 0);
ipc_answer_2(rid, EOK, 0, dentry->size);
return;
}
/* Clear any newly allocated memory in order to emulate gaps. */
/trunk/uspace/srv/vfs/vfs_ops.c
370,7 → 370,7
}
vfs_file_t *file = vfs_file_get(fd);
file->node = node;
if (oflag & O_APPEND)
if (oflag & O_APPEND)
file->append = true;
 
/*
470,12 → 470,14
rwlock_read_unlock(&file->node->contents_rwlock);
else {
/* Update the cached version of node's size. */
file->node->size = IPC_GET_ARG2(answer);
if (rc == EOK)
file->node->size = IPC_GET_ARG2(answer);
rwlock_write_unlock(&file->node->contents_rwlock);
}
 
/* Update the position pointer and unlock the open file. */
file->pos += bytes;
if (rc == EOK)
file->pos += bytes;
futex_up(&file->lock);
 
/*