summaryrefslogtreecommitdiff
path: root/common/cmd_fs.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2015-01-05 18:13:36 +0100
committerTom Rini <trini@ti.com>2015-01-29 13:36:54 -0500
commit1a1ad8e0903ec916d1e3ef8c18fa335d765a4342 (patch)
treebefa1ea03b3cc9666d36ccdd96ebb90ddf6c2aa3 /common/cmd_fs.c
parent2af13d6b6265a6700c4f65597410b769895024bf (diff)
fs: Add command to retrieve the filesystem type
New command to determine the filesystem type of a given partition. Optionally stores the filesystem type in a environment variable. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'common/cmd_fs.c')
-rw-r--r--common/cmd_fs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/cmd_fs.c b/common/cmd_fs.c
index 0d9da113bf..e146254f6d 100644
--- a/common/cmd_fs.c
+++ b/common/cmd_fs.c
@@ -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"
+);