]> 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 9c4d67faf82324c44d051ab4c14ed8734784b0a1..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;
@@ -407,7 +419,7 @@ int fs_read(const char *filename, ulong addr, loff_t offset, loff_t len,
 
        /* If we requested a specific number of bytes, check we got it */
        if (ret == 0 && len && *actread != len)
-               printf("** %s shorter than offset + len **\n", filename);
+               debug("** %s shorter than offset + len **\n", filename);
        fs_close();
 
        return ret;