efi_loader: clean up UEFI sub-system initialization
[oweals/u-boot.git] / cmd / fs.c
index abfe5be17218580dea740698eab2460d79df1acc..aaafbf9b52b2e09dc8f2c857748470a09e5876ae 100644 (file)
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
  *
  * Inspired by cmd_ext_common.c, cmd_fat.c.
- *
- * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <common.h>
@@ -27,8 +26,10 @@ U_BOOT_CMD(
 static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
                                char * const argv[])
 {
+#ifdef CONFIG_CMD_BOOTEFI
        efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "",
                        (argc > 4) ? argv[4] : "");
+#endif
        return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
 
@@ -75,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[])
 {