From aaa12157c7d22132688ae97dcb35fc37f9ae88d5 Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Wed, 13 Feb 2019 12:15:26 +0100 Subject: fs: Add a new command to create symbolic links The command line is: ln 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 Reviewed-by: Tom Rini --- cmd/fs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cmd/fs.c') 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", + " 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[]) { -- cgit v1.2.3