Changeset 92688eb in mainline
- Timestamp:
- 2007-12-30T21:13:37Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 449c246
- Parents:
- 986332aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/tmpfs/tmpfs_ops.c
r986332aa r92688eb 300 300 */ 301 301 ipc_callid_t callid; 302 size_t size;303 if (!ipc_data_read_receive(&callid, & size)) {302 size_t len; 303 if (!ipc_data_read_receive(&callid, &len)) { 304 304 ipc_answer_0(callid, EINVAL); 305 305 ipc_answer_0(rid, EINVAL); … … 307 307 } 308 308 309 size_t bytes = max(0, min(dentry->size - pos, size));309 size_t bytes = max(0, min(dentry->size - pos, len)); 310 310 (void) ipc_data_read_deliver(callid, dentry->data + pos, bytes); 311 311 … … 338 338 */ 339 339 ipc_callid_t callid; 340 size_t size;341 if (!ipc_data_write_receive(&callid, NULL, & size)) {340 size_t len; 341 if (!ipc_data_write_receive(&callid, NULL, &len)) { 342 342 ipc_answer_0(callid, EINVAL); 343 343 ipc_answer_0(rid, EINVAL); … … 348 348 * Check whether the file needs to grow. 349 349 */ 350 if (pos + size<= dentry->size) {350 if (pos + len <= dentry->size) { 351 351 /* The file size is not changing. */ 352 (void) ipc_data_write_deliver(callid, dentry->data + pos, size);353 ipc_answer_1(rid, EOK, size);354 return; 355 } 356 size_t delta = (pos + size) - dentry->size;352 (void) ipc_data_write_deliver(callid, dentry->data + pos, len); 353 ipc_answer_1(rid, EOK, len); 354 return; 355 } 356 size_t delta = (pos + len) - dentry->size; 357 357 /* 358 358 * At this point, we are deliberately extremely straightforward and … … 370 370 dentry->size += delta; 371 371 dentry->data = newdata; 372 (void) ipc_data_write_deliver(callid, dentry->data + pos, size);373 ipc_answer_1(rid, EOK, size);372 (void) ipc_data_write_deliver(callid, dentry->data + pos, len); 373 ipc_answer_1(rid, EOK, len); 374 374 } 375 375
Note:
See TracChangeset
for help on using the changeset viewer.