@@ -195,6 +195,11 @@ const char **tst_get_supported_fs_types(const char *const *skiplist);
*/
int tst_fs_in_skiplist(const char *fs_type, const char *const *skiplist);
+/*
+ * Returns maximal number of supported filesystem types.
+ */
+unsigned int tst_fs_max_types(void);
+
/*
* Check whether device supports FS quotas. Negative return value means that
* quotas appear to be broken.
@@ -29,6 +29,11 @@ static const char *const fs_type_whitelist[] = {
static const char *fs_types[ARRAY_SIZE(fs_type_whitelist)];
+unsigned int tst_fs_max_types(void)
+{
+ return ARRAY_SIZE(fs_type_whitelist) - 1;
+}
+
static int has_mkfs(const char *fs_type)
{
char buf[128];
The tst_fs_max_types() returns an upper bound on the number of supported filesystems. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> --- include/tst_fs.h | 5 +++++ lib/tst_supported_fs_types.c | 5 +++++ 2 files changed, 10 insertions(+)