Changeset 594303b in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2009-04-18T15:32:56Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d049ee0
Parents:
6b6e423a
Message:

Support mount options.
Let tmpfs decide whether to start empty or restored a TMPFS dump based on the mount option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    r6b6e423a r594303b  
    756756        int rc;
    757757
     758        /* accept the mount options */
     759        ipc_callid_t callid;
     760        size_t size;
     761        if (!ipc_data_write_receive(&callid, &size)) {
     762                ipc_answer_0(callid, EINVAL);
     763                ipc_answer_0(rid, EINVAL);
     764                return;
     765        }
     766        char *opts = malloc(size + 1);
     767        if (!opts) {
     768                ipc_answer_0(callid, ENOMEM);
     769                ipc_answer_0(rid, ENOMEM);
     770                return;
     771        }
     772        ipcarg_t retval = ipc_data_write_finalize(callid, opts, size);
     773        if (retval != EOK) {
     774                ipc_answer_0(rid, retval);
     775                free(opts);
     776                return;
     777        }
     778        opts[size] = '\0';
     779
    758780        /* initialize libblock */
    759781        rc = block_init(dev_handle, BS_SIZE);
Note: See TracChangeset for help on using the changeset viewer.