提交 0d488e8f 编写于 作者: A Alex Kiernan 提交者: Marek Vasut

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: NAlex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
上级 413b9077
......@@ -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;
......
......@@ -37,6 +37,16 @@ int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype);
*/
int fs_set_blk_dev_with_part(struct blk_desc *desc, int part);
/**
* 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);
/*
* Print the list of files on the partition previously set by fs_set_blk_dev(),
* in directory "dirname".
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册