diff mbox

[U-Boot] iso: Fix part info command

Message ID 1469057516-224231-1-git-send-email-agraf@suse.de
State Accepted
Commit 28f0014bde9993354223ed250df22ba97d381565
Delegated to: Tom Rini
Headers show

Commit Message

Alexander Graf July 20, 2016, 11:31 p.m. UTC
Partitions on the iso el torito partition table interpreter
only start from partition 1. So when printing out the tables,
let's also start counting at 1.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 disk/part_iso.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini July 23, 2016, 12:14 a.m. UTC | #1
On Thu, Jul 21, 2016 at 01:31:56AM +0200, Alexander Graf wrote:

> Partitions on the iso el torito partition table interpreter
> only start from partition 1. So when printing out the tables,
> let's also start counting at 1.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/disk/part_iso.c b/disk/part_iso.c
index 9f5c50c..f9a741d 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -233,13 +233,13 @@  static void part_print_iso(struct blk_desc *dev_desc)
 	disk_partition_t info;
 	int i;
 
-	if (part_get_info_iso_verb(dev_desc, 0, &info, 0) == -1) {
+	if (part_get_info_iso_verb(dev_desc, 1, &info, 0) == -1) {
 		printf("** No boot partition found on device %d **\n",
 		       dev_desc->devnum);
 		return;
 	}
 	printf("Part   Start     Sect x Size Type\n");
-	i=0;
+	i=1;
 	do {
 		printf(" %2d " LBAFU " " LBAFU " %6ld %.32s\n",
 		       i, info.start, info.size, info.blksz, info.type);