summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/samples/mount.c
diff options
context:
space:
mode:
authorKarel Zak2011-01-22 00:09:34 +0100
committerKarel Zak2011-01-22 00:27:26 +0100
commit68164f6c308af1f53567b627876cd1bc8afe8817 (patch)
tree619ba5ff92b2f6a23ce899b9f771279179a7c7ba /shlibs/mount/samples/mount.c
parentlibmount: add functions for mount.<type> helpers (diff)
downloadkernel-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/samples/mount.c')
-rw-r--r--shlibs/mount/samples/mount.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/shlibs/mount/samples/mount.c b/shlibs/mount/samples/mount.c
index aa7130013..5e87d88db 100644
--- a/shlibs/mount/samples/mount.c
+++ b/shlibs/mount/samples/mount.c
@@ -50,7 +50,7 @@
#define EX_FAIL 32 /* mount failure */
#define EX_SOMEOK 64 /* some mount succeeded */
-static mnt_lock *lock;
+static struct libmnt_lock *lock;
static void lock_atexit_cleanup(void)
{
@@ -98,13 +98,13 @@ static const char *opt_to_longopt(int c, const struct option *opts)
return NULL;
}
-static int print_all(mnt_context *cxt, char *pattern, int show_label)
+static int print_all(struct libmnt_context *cxt, char *pattern, int show_label)
{
int rc = 0;
- mnt_tab *tb;
- mnt_iter *itr;
- mnt_fs *fs;
- mnt_cache *cache = NULL;
+ struct libmnt_table *tb;
+ struct libmnt_iter *itr;
+ struct libmnt_fs *fs;
+ struct libmnt_cache *cache = NULL;
rc = mnt_context_get_mtab(cxt, &tb);
if (rc)
@@ -117,7 +117,7 @@ static int print_all(mnt_context *cxt, char *pattern, int show_label)
if (show_label)
cache = mnt_new_cache();
- while(mnt_tab_next_fs(tb, itr, &fs) == 0) {
+ while(mnt_table_next_fs(tb, itr, &fs) == 0) {
const char *type = mnt_fs_get_fstype(fs);
const char *src = mnt_fs_get_source(fs);
char *optstr = mnt_fs_strdup_options(fs);
@@ -203,7 +203,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
int main(int argc, char **argv)
{
int c, rc = EXIT_FAILURE, all = 0, show_labels = 0;
- mnt_context *cxt;
+ struct libmnt_context *cxt;
char *source = NULL, *srcbuf = NULL;
char *types = NULL;
unsigned long oper = 0;
@@ -403,7 +403,7 @@ int main(int argc, char **argv)
usage(stderr);
if (oper)
- mnt_context_set_mountflags(cxt, oper);
+ mnt_context_set_mflags(cxt, oper);
lock = mnt_context_get_lock(cxt);
if (lock)