summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/utils.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/src/utils.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/src/utils.c')
-rw-r--r--shlibs/mount/src/utils.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/shlibs/mount/src/utils.c b/shlibs/mount/src/utils.c
index 48c37de3d..c9e171cc9 100644
--- a/shlibs/mount/src/utils.c
+++ b/shlibs/mount/src/utils.c
@@ -723,7 +723,7 @@ char *mnt_get_fs_root(const char *path, const char *mnt)
}
#ifdef TEST_PROGRAM
-int test_match_fstype(struct mtest *ts, int argc, char *argv[])
+int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[])
{
char *type = argv[1];
char *pattern = argv[2];
@@ -732,7 +732,7 @@ int test_match_fstype(struct mtest *ts, int argc, char *argv[])
return 0;
}
-int test_match_options(struct mtest *ts, int argc, char *argv[])
+int test_match_options(struct libmnt_test *ts, int argc, char *argv[])
{
char *optstr = argv[1];
char *pattern = argv[2];
@@ -741,7 +741,7 @@ int test_match_options(struct mtest *ts, int argc, char *argv[])
return 0;
}
-int test_startswith(struct mtest *ts, int argc, char *argv[])
+int test_startswith(struct libmnt_test *ts, int argc, char *argv[])
{
char *optstr = argv[1];
char *pattern = argv[2];
@@ -750,7 +750,7 @@ int test_startswith(struct mtest *ts, int argc, char *argv[])
return 0;
}
-int test_endswith(struct mtest *ts, int argc, char *argv[])
+int test_endswith(struct libmnt_test *ts, int argc, char *argv[])
{
char *optstr = argv[1];
char *pattern = argv[2];
@@ -759,7 +759,7 @@ int test_endswith(struct mtest *ts, int argc, char *argv[])
return 0;
}
-int test_mountpoint(struct mtest *ts, int argc, char *argv[])
+int test_mountpoint(struct libmnt_test *ts, int argc, char *argv[])
{
char *path = canonicalize_path(argv[1]),
*mnt = path ? mnt_get_mountpoint(path) : NULL;
@@ -770,7 +770,7 @@ int test_mountpoint(struct mtest *ts, int argc, char *argv[])
return 0;
}
-int test_fsroot(struct mtest *ts, int argc, char *argv[])
+int test_fsroot(struct libmnt_test *ts, int argc, char *argv[])
{
char *path = canonicalize_path(argv[1]),
*mnt = path ? mnt_get_fs_root(path, NULL) : NULL;
@@ -781,7 +781,7 @@ int test_fsroot(struct mtest *ts, int argc, char *argv[])
return 0;
}
-int test_filesystems(struct mtest *ts, int argc, char *argv[])
+int test_filesystems(struct libmnt_test *ts, int argc, char *argv[])
{
char **filesystems = NULL;
int rc;
@@ -798,7 +798,7 @@ int test_filesystems(struct mtest *ts, int argc, char *argv[])
int main(int argc, char *argv[])
{
- struct mtest tss[] = {
+ struct libmnt_test tss[] = {
{ "--match-fstype", test_match_fstype, "<type> <pattern> FS types matching" },
{ "--match-options", test_match_options, "<options> <pattern> options matching" },
{ "--filesystems", test_filesystems, "[<pattern>] list /{etc,proc}/filesystems" },