summaryrefslogtreecommitdiff
path: root/cmd/fs.c
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2019-02-13 12:15:26 +0100
committerTom Rini <trini@konsulko.com>2019-04-09 20:04:03 -0400
commitaaa12157c7d22132688ae97dcb35fc37f9ae88d5 (patch)
tree47db5d6ec45fe2ea156277afd48bf2f7b0c5e9b4 /cmd/fs.c
parent5efc0686eebc0c0daabfbfc2c403f8251b468526 (diff)
downloadu-boot-aaa12157c7d22132688ae97dcb35fc37f9ae88d5.tar.gz
u-boot-aaa12157c7d22132688ae97dcb35fc37f9ae88d5.tar.bz2
u-boot-aaa12157c7d22132688ae97dcb35fc37f9ae88d5.zip
fs: Add a new command to create symbolic links
The command line is: ln <interface> <dev[:part]> target linkname Currently symbolic links are supported only in ext4 and only if the option CMD_EXT4_WRITE is enabled. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd/fs.c')
-rw-r--r--cmd/fs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/fs.c b/cmd/fs.c
index 94467671be..aaafbf9b52 100644
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -76,6 +76,20 @@ U_BOOT_CMD(
" device type 'interface' instance 'dev'."
)
+static int do_ln_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ return do_ln(cmdtp, flag, argc, argv, FS_TYPE_ANY);
+}
+
+U_BOOT_CMD(
+ ln, 5, 1, do_ln_wrapper,
+ "Create a symbolic link",
+ "<interface> <dev[:part]> target linkname\n"
+ " - create a symbolic link to 'target' with the name 'linkname' on\n"
+ " device type 'interface' instance 'dev'."
+)
+
static int do_fstype_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{