@@ -99,3 +99,14 @@ U_BOOT_CMD(
"fstype <interface> <dev>:<part> <varname>\n"
"- set environment variable to filesystem type\n"
);
+
+static int do_fstypes_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ return do_fs_types(cmdtp, flag, argc, argv);
+}
+
+U_BOOT_CMD(
+ fstypes, 1, 1, do_fstypes_wrapper,
+ "List supported filesystem types", ""
+);
@@ -900,3 +900,23 @@ int do_ln(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
return 0;
}
+
+int do_fs_types(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ struct fstype_info *drv = fstypes;
+ const int n_ents = ARRAY_SIZE(fstypes);
+ struct fstype_info *entry;
+ int i = 0;
+
+ puts("Supported filesystems");
+ for (entry = drv; entry != drv + n_ents; entry++) {
+ if (entry->fstype != FS_TYPE_ANY) {
+ printf("%c %s", i ? ',' : ':', entry->name);
+ i++;
+ }
+ }
+ if (!i)
+ puts(": <none>");
+ puts("\n");
+ return CMD_RET_SUCCESS;
+}
@@ -254,4 +254,9 @@ int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
*/
int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+/*
+ * List supported filesystems.
+ */
+int do_fs_types(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+
#endif /* _FS_H */
Added command "fstypes" to list supported/included filesystems. Signed-off-by: Niel Fourie <lusus at denx.de> CC: Simon Glass <sjg at chromium.org> --- cmd/fs.c | 11 +++++++++++ fs/fs.c | 20 ++++++++++++++++++++ include/fs.h | 5 +++++ 3 files changed, 36 insertions(+)