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>
This commit is contained in:
Jean-Jacques Hiblot
2019-02-13 12:15:26 +01:00
committed by Tom Rini
parent 5efc0686ee
commit aaa12157c7
3 changed files with 60 additions and 0 deletions

View File

@@ -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[])
{