]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - cmd/disk.c
sandbox: move sandbox specifics to booti_setup()
[thirdparty/u-boot.git] / cmd / disk.c
index cb3b990ba3a567f0efa2b034ea2bf719400e0c4b..92eaa02f4a1312d2ea83cb39211939b00d27c435 100644 (file)
@@ -20,7 +20,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
        ulong cnt;
        struct disk_partition info;
 #if defined(CONFIG_LEGACY_IMAGE_FORMAT)
-       image_header_t *hdr;
+       struct legacy_img_hdr *hdr;
 #endif
        struct blk_desc *dev_desc;
 
@@ -40,8 +40,8 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
 
        bootstage_mark(BOOTSTAGE_ID_IDE_BOOT_DEVICE);
 
-       part = blk_get_device_part_str(intf, (argc == 3) ? argv[2] : NULL,
-                                       &dev_desc, &info, 1);
+       part = blk_get_device_part_str(intf, cmd_arg2(argc, argv),
+                                      &dev_desc, &info, 1);
        if (part < 0) {
                bootstage_error(BOOTSTAGE_ID_IDE_TYPE);
                return 1;
@@ -68,7 +68,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
        switch (genimg_get_format((void *) addr)) {
 #if defined(CONFIG_LEGACY_IMAGE_FORMAT)
        case IMAGE_FORMAT_LEGACY:
-               hdr = (image_header_t *) addr;
+               hdr = (struct legacy_img_hdr *)addr;
 
                bootstage_mark(BOOTSTAGE_ID_IDE_FORMAT);