summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/tab.c
diff options
context:
space:
mode:
authorKarel Zak2010-03-02 22:34:56 +0100
committerKarel Zak2010-06-03 15:20:11 +0200
commitefe73c3ef120997c14ad95bf1857a044e99872b6 (patch)
tree518fe139a38ec374aa0a9aa8fb533dc8044dd6ab /shlibs/mount/src/tab.c
parentfindmnt: add new command (diff)
downloadkernel-qcow2-util-linux-efe73c3ef120997c14ad95bf1857a044e99872b6.tar.gz
kernel-qcow2-util-linux-efe73c3ef120997c14ad95bf1857a044e99872b6.tar.xz
kernel-qcow2-util-linux-efe73c3ef120997c14ad95bf1857a044e99872b6.zip
libmount: read devno, ID and parent ID from /proc/self/mountinfo
The patch also removes obsolete test program from tab_parse.c. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/tab.c')
-rw-r--r--shlibs/mount/src/tab.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/shlibs/mount/src/tab.c b/shlibs/mount/src/tab.c
index bfd3a6e12..2ae694b5e 100644
--- a/shlibs/mount/src/tab.c
+++ b/shlibs/mount/src/tab.c
@@ -709,12 +709,20 @@ err:
int test_parse(struct mtest *ts, int argc, char *argv[])
{
mnt_tab *tb;
+ mnt_iter *itr;
+ mnt_fs *fs;
tb = create_tab(argv[1]);
if (!tb)
return -1;
- mnt_tab_fprintf(tb, stdout, MNT_MFILE_PRINTFMT);
+ itr = mnt_new_iter(MNT_ITER_FORWARD);
+ if (!itr)
+ goto err;
+ while(mnt_tab_next_fs(tb, itr, &fs) == 0)
+ mnt_fs_print_debug(fs, stdout);
+err:
+ mnt_free_iter(itr);
mnt_free_tab(tb);
return 0;
}