efi_loader: variable: add VendorKeys variable
[oweals/u-boot.git] / cmd / blk_common.c
index 86c75e78d8892a3a1f6ea45728307f61ae86b593..cc6e161ba0aebeef3675a0a1cf9f67629695db78 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Handling of common block commands
  *
@@ -5,14 +6,11 @@
  *
  * (C) Copyright 2000-2011
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <blk.h>
 
-#ifdef HAVE_BLOCK_DEVICE
 int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
                   int *cur_devnump)
 {
@@ -34,7 +32,8 @@ int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
                        return 0;
                } else if (strncmp(argv[1], "part", 4) == 0) {
                        if (blk_list_part(if_type))
-                               printf("\nno %s devices available\n", if_name);
+                               printf("\nno %s partition table available\n",
+                                      if_name);
                        return 0;
                }
                return CMD_RET_USAGE;
@@ -68,9 +67,8 @@ int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
                        ulong cnt = simple_strtoul(argv[4], NULL, 16);
                        ulong n;
 
-                       printf("\n%s read: device %d block # %lld, count %ld ... ",
-                              if_name, *cur_devnump, (unsigned long long)blk,
-                              cnt);
+                       printf("\n%s read: device %d block # "LBAFU", count %lu ... ",
+                              if_name, *cur_devnump, blk, cnt);
 
                        n = blk_read_devnum(if_type, *cur_devnump, blk, cnt,
                                            (ulong *)addr);
@@ -84,9 +82,8 @@ int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
                        ulong cnt = simple_strtoul(argv[4], NULL, 16);
                        ulong n;
 
-                       printf("\n%s write: device %d block # %lld, count %ld ... ",
-                              if_name, *cur_devnump, (unsigned long long)blk,
-                              cnt);
+                       printf("\n%s write: device %d block # "LBAFU", count %lu ... ",
+                              if_name, *cur_devnump, blk, cnt);
 
                        n = blk_write_devnum(if_type, *cur_devnump, blk, cnt,
                                             (ulong *)addr);
@@ -97,8 +94,5 @@ int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
                } else {
                        return CMD_RET_USAGE;
                }
-
-               return 0;
        }
 }
-#endif