From b7cd95627baac05b7023b014c802be309be636a0 Mon Sep 17 00:00:00 2001 From: AKASHI Takahiro Date: Mon, 7 Oct 2019 14:59:37 +0900 Subject: fs: add fs_get_type() for current filesystem type This function is a variant of fs_get_type_name() and returns a filesystem type with which the current device is associated. We don't want to export fs_type variable directly because we have to take care of it consistently within fs.c. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- include/fs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/fs.h b/include/fs.h index 247e9540536..742a535b5f0 100644 --- a/include/fs.h +++ b/include/fs.h @@ -49,6 +49,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 * -- cgit v1.3.1