Changeset 594303b in mainline for uspace/srv/fs/tmpfs/tmpfs_ops.c
- Timestamp:
- 2009-04-18T15:32:56Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d049ee0
- Parents:
- 6b6e423a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/tmpfs/tmpfs_ops.c
r6b6e423a r594303b 400 400 dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); 401 401 402 /* accept the mount options */ 403 ipc_callid_t callid; 404 size_t size; 405 if (!ipc_data_write_receive(&callid, &size)) { 406 ipc_answer_0(callid, EINVAL); 407 ipc_answer_0(rid, EINVAL); 408 return; 409 } 410 char *opts = malloc(size + 1); 411 if (!opts) { 412 ipc_answer_0(callid, ENOMEM); 413 ipc_answer_0(rid, ENOMEM); 414 return; 415 } 416 ipcarg_t retval = ipc_data_write_finalize(callid, opts, size); 417 if (retval != EOK) { 418 ipc_answer_0(rid, retval); 419 free(opts); 420 return; 421 } 422 opts[size] = '\0'; 423 402 424 /* Initialize TMPFS. */ 403 425 if (!root && !tmpfs_init()) { … … 406 428 } 407 429 408 if ( dev_handle >= 0) {430 if (str_cmp(opts, "restore") == 0) { 409 431 if (tmpfs_restore(dev_handle)) 410 432 ipc_answer_3(rid, EOK, root->index, root->size,
Note:
See TracChangeset
for help on using the changeset viewer.