]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_fs.c
fs: Add command to retrieve the filesystem type
[karo-tx-uboot.git] / common / cmd_fs.c
index 0d9da113bf0c1305bc64e7e67368d6eba800b5e0..e146254f6d68367d8dc2650c409f24a1676362dd 100644 (file)
@@ -81,3 +81,18 @@ U_BOOT_CMD(
        "    - List files in directory 'directory' of partition 'part' on\n"
        "      device type 'interface' instance 'dev'."
 )
+
+static int do_fstype_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+                               char * const argv[])
+{
+       return do_fs_type(cmdtp, flag, argc, argv);
+}
+
+U_BOOT_CMD(
+       fstype, 4, 1, do_fstype_wrapper,
+       "Look up a filesystem type",
+       "<interface> <dev>:<part>\n"
+       "- print filesystem type\n"
+       "fstype <interface> <dev>:<part> <varname>\n"
+       "- set environment variable to filesystem type\n"
+);