summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 94cdc37debf..33808d549e0 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -265,6 +265,19 @@ static struct fstype_info *fs_get_info(int fstype)
return info;
}
+/**
+ * fs_get_type_name() - Get type of current filesystem
+ *
+ * Return: Pointer to filesystem name
+ *
+ * Returns a string describing the current filesystem, or the sentinel
+ * "unsupported" for any unrecognised filesystem.
+ */
+const char *fs_get_type_name(void)
+{
+ return fs_get_info(fs_type)->name;
+}
+
int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype)
{
struct fstype_info *info;