From 1a1ad8e0903ec916d1e3ef8c18fa335d765a4342 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Mon, 5 Jan 2015 18:13:36 +0100 Subject: 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 Reviewed-by: Stephen Warren --- common/cmd_fs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'common/cmd_fs.c') diff --git a/common/cmd_fs.c b/common/cmd_fs.c index 0d9da11..e146254 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", + " :\n" + "- print filesystem type\n" + "fstype : \n" + "- set environment variable to filesystem type\n" +); -- cgit v1.1