]> git.sur5r.net Git - u-boot/blobdiff - fs/fs.c
Makefile: drop unused cpp_cfg macro
[u-boot] / fs / fs.c
diff --git a/fs/fs.c b/fs/fs.c
index 6155cb1daf34352c95f3d5270e5cf7b8d7b0e32f..33808d549e0a5cd5e0a005dc5b00a3337aa4f0f8 100644 (file)
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
- *
- * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <config.h>
@@ -266,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;