diff options
author | Alex Kiernan | 2018-05-29 15:30:50 +0000 |
---|---|---|
committer | Marek Vasut | 2018-05-30 11:59:21 +0200 |
commit | 0d488e8f508e697e3b8fb4a3d8bd4f61ca8a225f (patch) | |
tree | e97faee4a9466f3a0a845845ca6203d19d52ca96 /fs/fs.c | |
parent | 413b90777f8d9949083688e491e3f4e329d8a5b9 (diff) |
fs: Add fs_get_type_name to return current filesystem name
Add fs_get_type_name so we can get the current filesystem type.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'fs/fs.c')
-rw-r--r-- | fs/fs.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; |