summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/optstr.c
diff options
context:
space:
mode:
authorKarel Zak2011-01-04 00:43:56 +0100
committerKarel Zak2011-01-04 00:43:56 +0100
commit0f32f1e2fca10124952ca8d83d08f56f79b669c0 (patch)
tree14f98dfd57bd6c239c3835ab3a98f0602280f4b9 /shlibs/mount/src/optstr.c
parentmount: use verbose info for HAVE_LIBMOUNT_MOUNT only (diff)
downloadkernel-qcow2-util-linux-0f32f1e2fca10124952ca8d83d08f56f79b669c0.tar.gz
kernel-qcow2-util-linux-0f32f1e2fca10124952ca8d83d08f56f79b669c0.tar.xz
kernel-qcow2-util-linux-0f32f1e2fca10124952ca8d83d08f56f79b669c0.zip
libmount: cleanup API and docs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/optstr.c')
-rw-r--r--shlibs/mount/src/optstr.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/shlibs/mount/src/optstr.c b/shlibs/mount/src/optstr.c
index 7c41f6857..8894dfba6 100644
--- a/shlibs/mount/src/optstr.c
+++ b/shlibs/mount/src/optstr.c
@@ -454,8 +454,7 @@ int mnt_optstr_remove_option(char **optstr, const char *name)
*
* Returns: 0 on success, or negative number in case of error.
*/
-int mnt_split_optstr(const char *optstr, char **user, char **vfs, char **fs,
- int ignore_user, int ignore_vfs)
+int mnt_split_optstr(const char *optstr, char **user, char **vfs, char **fs, int ignore_user, int ignore_vfs)
{
char *name, *val, *str = (char *) optstr;
size_t namesz, valsz;
@@ -569,6 +568,7 @@ int mnt_optstr_get_options(const char *optstr, char **subset,
* mnt_optstr_get_flags:
* @optstr: string with comma separated list of options
* @flags: returns mount flags
+ * @map: options map
*
* Returns in @flags IDs of options from @optstr as defined in the @map.
*
@@ -583,7 +583,6 @@ int mnt_optstr_get_options(const char *optstr, char **subset,
*
* Returns: 0 on success or negative number in case of error
*/
-
int mnt_optstr_get_flags(const char *optstr, unsigned long *flags,
const struct mnt_optmap *map)
{
@@ -615,7 +614,7 @@ int mnt_optstr_get_flags(const char *optstr, unsigned long *flags,
}
/**
- * mnt_optstr_apply_mountflags:
+ * mnt_optstr_apply_flags:
* @optstr: string with comma separated list of options
* @flags: returns mount flags
* @map: options map
@@ -717,9 +716,9 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags,
p = strchr(ent->name, '=');
if (p) {
if (*(p - 1) == '[')
- p--; /* name[=%s] */
+ p--; /* name[=] */
else
- continue; /* name=%s */
+ continue; /* name= */
p = strndup(ent->name, p - ent->name);
if (!p) {