diff options
author | Karel Zak | 2011-02-02 22:32:52 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-02 22:32:52 +0100 |
commit | b70785bca6238ea7e092dda8bd0aa56cdf1ec923 (patch) | |
tree | 96611cda1c80330668acb8545dd9cc65107d9383 /shlibs/mount/src/context_mount.c | |
parent | libmount: add low-level API for umount (diff) | |
download | kernel-qcow2-util-linux-b70785bca6238ea7e092dda8bd0aa56cdf1ec923.tar.gz kernel-qcow2-util-linux-b70785bca6238ea7e092dda8bd0aa56cdf1ec923.tar.xz kernel-qcow2-util-linux-b70785bca6238ea7e092dda8bd0aa56cdf1ec923.zip |
libmount: cleanup helper initialization API
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/context_mount.c')
-rw-r--r-- | shlibs/mount/src/context_mount.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/shlibs/mount/src/context_mount.c b/shlibs/mount/src/context_mount.c index 7f6847277..0c6754644 100644 --- a/shlibs/mount/src/context_mount.c +++ b/shlibs/mount/src/context_mount.c @@ -218,11 +218,8 @@ static int evaluate_permissions(struct libmnt_context *cxt) return 0; } -/** - * mnt_context_mounthelper_setopt: - * @cxr: context - * @c: getopt() result - * @arg: getopt() optarg +/* + * mnt_context_helper_setopt() backend * * This function applies mount.<type> command line option (for example parsed * by getopt() or getopt_long()) to @cxt. All unknown options are ignored and @@ -230,12 +227,12 @@ static int evaluate_permissions(struct libmnt_context *cxt) * * Returns: negative number on error, 1 if @c is unknown option, 0 on success. */ -int mnt_context_mounthelper_setopt(struct libmnt_context *cxt, int c, char *arg) +int mnt_context_mount_setopt(struct libmnt_context *cxt, int c, char *arg) { int rc = -EINVAL; - if (!cxt || !c) - return -EINVAL; + assert(cxt); + assert(cxt->action == MNT_ACT_MOUNT); switch(c) { case 'f': |