diff options
author | Karel Zak | 2010-07-09 11:15:08 +0200 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:39 +0100 |
commit | 0b3953a33d492336a6d9aa8f7ef200e6dc262281 (patch) | |
tree | ce28b76c58a180af280eaecd72e36c53510f4a56 /shlibs/mount/src/fs.c | |
parent | findmnt: add /etc/fstab.d support (diff) | |
download | kernel-qcow2-util-linux-0b3953a33d492336a6d9aa8f7ef200e6dc262281.tar.gz kernel-qcow2-util-linux-0b3953a33d492336a6d9aa8f7ef200e6dc262281.tar.xz kernel-qcow2-util-linux-0b3953a33d492336a6d9aa8f7ef200e6dc262281.zip |
libmount: add mnt_fs_get_root()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/fs.c')
-rw-r--r-- | shlibs/mount/src/fs.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/shlibs/mount/src/fs.c b/shlibs/mount/src/fs.c index 63da2f206..c8677c702 100644 --- a/shlibs/mount/src/fs.c +++ b/shlibs/mount/src/fs.c @@ -51,7 +51,7 @@ void mnt_free_fs(mnt_fs *fs) free(fs->source); free(fs->tagname); free(fs->tagval); - free(fs->mntroot); + free(fs->root); free(fs->target); free(fs->fstype); free(fs->optstr); @@ -448,6 +448,18 @@ int mnt_fs_set_passno(mnt_fs *fs, int passno) } /** + * mnt_fs_get_root: + * @fs: /proc/self/mountinfo entry + * + * Returns: root of the mount within the filesystem or NULL + */ +const char *mnt_fs_get_root(mnt_fs *fs) +{ + assert(fs); + return fs ? fs->root : NULL; +} + +/** * mnt_fs_get_id: * @fs: /proc/self/mountinfo entry * @@ -475,7 +487,7 @@ int mnt_fs_get_parent_id(mnt_fs *fs) /** * mnt_fs_get_devno: - * @fs: /proc/self/mountinfo + * @fs: /proc/self/mountinfo entry * * Returns: value of st_dev for files on filesystem or 0 in case of error. */ |