diff options
author | Karel Zak | 2010-03-09 15:48:11 +0100 |
---|---|---|
committer | Karel Zak | 2010-06-03 15:20:11 +0200 |
commit | 26b4f9e4551ca97334dd06114bf0f97a75c4ce81 (patch) | |
tree | c0941d271ecf19932108445e6c600db4c154b3c9 /shlibs/mount/src/fs.c | |
parent | libblkid: add mnt_iter_get_direction() (diff) | |
download | kernel-qcow2-util-linux-26b4f9e4551ca97334dd06114bf0f97a75c4ce81.tar.gz kernel-qcow2-util-linux-26b4f9e4551ca97334dd06114bf0f97a75c4ce81.tar.xz kernel-qcow2-util-linux-26b4f9e4551ca97334dd06114bf0f97a75c4ce81.zip |
libmount: add support for userdata and work with VFS tree
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/fs.c')
-rw-r--r-- | shlibs/mount/src/fs.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/shlibs/mount/src/fs.c b/shlibs/mount/src/fs.c index fef61b0d6..ae97b6542 100644 --- a/shlibs/mount/src/fs.c +++ b/shlibs/mount/src/fs.c @@ -58,6 +58,33 @@ void mnt_free_fs(mnt_fs *fs) } /** + * mnt_fs_get_userdata: + * @fs: mnt_file instance + * + * Returns private data set by mnt_fs_set_userdata() or NULL. + */ +void *mnt_fs_get_userdata(mnt_fs *fs) +{ + return fs ? fs->userdata : NULL; +} + +/** + * mnt_fs_set_userdata: + * @fs: mnt_file instance + * + * The "userdata" are library independent data. + * + * Returns 0 or -1 in case of error (if @fs is NULL). + */ +int mnt_fs_set_userdata(mnt_fs *fs, void *data) +{ + if (!fs) + return -1; + fs->userdata = data; + return 0; +} + +/** * mnt_fs_get_srcpath: * @fs: mnt_file (fstab/mtab/mountinfo) fs * |