summaryrefslogtreecommitdiffstats
path: root/libmount/src/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/src/fs.c')
-rw-r--r--libmount/src/fs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libmount/src/fs.c b/libmount/src/fs.c
index 9971d6ae3..147398955 100644
--- a/libmount/src/fs.c
+++ b/libmount/src/fs.c
@@ -190,6 +190,7 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest,
return NULL;
}
+ dest->tab = NULL;
dest->id = src->id;
dest->parent = src->parent;
dest->devno = src->devno;
@@ -446,6 +447,22 @@ int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path)
}
/**
+ * mnt_fs_get_table:
+ * @fs: table entry
+ * @tb: table that contains @fs
+ *
+ * Returns: 0 or negative number on error (if @fs or @tb is NULL).
+ */
+int mnt_fs_get_table(struct libmnt_fs *fs, struct libmnt_table **tb)
+{
+ if (!fs || !tb)
+ return -EINVAL;
+
+ *tb = fs->tab;
+ return 0;
+}
+
+/**
* mnt_fs_streq_target:
* @fs: fs
* @path: mount point