diff options
author | Karel Zak <kzak@redhat.com> | 2010-03-02 22:34:56 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2010-06-03 15:20:11 +0200 |
commit | efe73c3ef120997c14ad95bf1857a044e99872b6 (patch) | |
tree | 518fe139a38ec374aa0a9aa8fb533dc8044dd6ab /shlibs/mount/src/tab.c | |
parent | 04fd7a9febad79917fbf98a618ef23dcb5a14fb1 (diff) | |
download | util-linux-old-efe73c3ef120997c14ad95bf1857a044e99872b6.tar.gz |
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.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/shlibs/mount/src/tab.c b/shlibs/mount/src/tab.c index bfd3a6e1..2ae694b5 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; } |