aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/fs.c13
-rw-r--r--include/fs.h10
2 files changed, 23 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index b17b76a..0c66d60 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -308,6 +308,19 @@ static struct fstype_info *fs_get_info(int fstype)
}
/**
+ * fs_get_type() - Get type of current filesystem
+ *
+ * Return: filesystem type
+ *
+ * Returns filesystem type representing the current filesystem, or
+ * FS_TYPE_ANY for any unrecognised filesystem.
+ */
+int fs_get_type(void)
+{
+ return fs_type;
+}
+
+/**
* fs_get_type_name() - Get type of current filesystem
*
* Return: Pointer to filesystem name
diff --git a/include/fs.h b/include/fs.h
index 247e954..742a535 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -50,6 +50,16 @@ int fs_set_blk_dev_with_part(struct blk_desc *desc, int part);
void fs_close(void);
/**
+ * fs_get_type() - Get type of current filesystem
+ *
+ * Return: filesystem type
+ *
+ * Returns filesystem type representing the current filesystem, or
+ * FS_TYPE_ANY for any unrecognised filesystem.
+ */
+int fs_get_type(void);
+
+/**
* fs_get_type_name() - Get type of current filesystem
*
* Return: Pointer to filesystem name