diff options
author | Karel Zak | 2011-01-22 00:09:34 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-22 00:27:26 +0100 |
commit | 68164f6c308af1f53567b627876cd1bc8afe8817 (patch) | |
tree | 619ba5ff92b2f6a23ce899b9f771279179a7c7ba /shlibs/mount/src/optmap.c | |
parent | libmount: add functions for mount.<type> helpers (diff) | |
download | kernel-qcow2-util-linux-68164f6c308af1f53567b627876cd1bc8afe8817.tar.gz kernel-qcow2-util-linux-68164f6c308af1f53567b627876cd1bc8afe8817.tar.xz kernel-qcow2-util-linux-68164f6c308af1f53567b627876cd1bc8afe8817.zip |
libmount: cleanup API, remove typedef
- replace mnt_ with libmnt_ prefix for types (the old prefix was too generic)
- remove typedef, use struct everywhere
- use shorter functions names (s/userspace/user/; s/mountflags/mflags/)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/optmap.c')
-rw-r--r-- | shlibs/mount/src/optmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/shlibs/mount/src/optmap.c b/shlibs/mount/src/optmap.c index 307a5d4b6..368f2a64d 100644 --- a/shlibs/mount/src/optmap.c +++ b/shlibs/mount/src/optmap.c @@ -39,7 +39,7 @@ * #define MY_MS_FOO (1 << 1) * #define MY_MS_BAR (1 << 2) * - * mnt_optmap myoptions[] = { + * libmnt_optmap myoptions[] = { * { "foo", MY_MS_FOO }, * { "nofoo", MY_MS_FOO | MNT_INVERT }, * { "bar=", MY_MS_BAR }, @@ -68,7 +68,7 @@ /* * fs-independent mount flags (built-in MNT_LINUX_MAP) */ -static const struct mnt_optmap linux_flags_map[] = +static const struct libmnt_optmap linux_flags_map[] = { { "ro", MS_RDONLY }, /* read-only */ { "rw", MS_RDONLY, MNT_INVERT }, /* read-write */ @@ -126,7 +126,7 @@ static const struct mnt_optmap linux_flags_map[] = * * TODO: offset=, sizelimit=, encryption=, vfs= */ -static const struct mnt_optmap userspace_opts_map[] = +static const struct libmnt_optmap userspace_opts_map[] = { { "defaults", 0, 0 }, /* default options */ @@ -170,7 +170,7 @@ static const struct mnt_optmap userspace_opts_map[] = * * Returns: static built-in libmount map. */ -const struct mnt_optmap *mnt_get_builtin_optmap(int id) +const struct libmnt_optmap *mnt_get_builtin_optmap(int id) { assert(id); @@ -185,12 +185,12 @@ const struct mnt_optmap *mnt_get_builtin_optmap(int id) * Lookups for the @name in @maps and returns a map and in @mapent * returns the map entry */ -const struct mnt_optmap *mnt_optmap_get_entry( - struct mnt_optmap const **maps, +const struct libmnt_optmap *mnt_optmap_get_entry( + struct libmnt_optmap const **maps, int nmaps, const char *name, size_t namelen, - const struct mnt_optmap **mapent) + const struct libmnt_optmap **mapent) { int i; @@ -203,8 +203,8 @@ const struct mnt_optmap *mnt_optmap_get_entry( *mapent = NULL; for (i = 0; i < nmaps; i++) { - const struct mnt_optmap *map = maps[i]; - const struct mnt_optmap *ent; + const struct libmnt_optmap *map = maps[i]; + const struct libmnt_optmap *ent; const char *p; for (ent = map; ent && ent->name; ent++) { |