[U-Boot-Users] [PATCH] Fix incorrect switch for IF_TYPE in part.c

Use correct field in block_dev_desc_t when writing interface type in dev_print. Error introduced in 574b319512b13e10800f0045e39b993f4ca25e42.
Signed-off-by: Tor Krill tor@excito.com --- disk/part.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk/part.c b/disk/part.c index 316e254..6a1b1f8 100644 --- a/disk/part.c +++ b/disk/part.c @@ -109,7 +109,7 @@ void dev_print (block_dev_desc_t *dev_desc) lbaint_t lba512; #endif
- switch (dev_desc->type) { + switch (dev_desc->if_type) { case IF_TYPE_SCSI: printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n", dev_desc->target,dev_desc->lun,

Hi Tor,
that's funny, we found this bug also - two minutes before you send the patch :-).
u-boot-users-bounces@lists.sourceforge.net wrote on :
Use correct field in block_dev_desc_t when writing interface type in dev_print. Error introduced in 574b319512b13e10800f0045e39b993f4ca25e42.
Signed-off-by: Tor Krill tor@excito.com
disk/part.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk/part.c b/disk/part.c index 316e254..6a1b1f8 100644 --- a/disk/part.c +++ b/disk/part.c @@ -109,7 +109,7 @@ void dev_print (block_dev_desc_t *dev_desc) lbaint_t lba512; #endif
- switch (dev_desc->type) {
- switch (dev_desc->if_type) { case IF_TYPE_SCSI: printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n", dev_desc->target,dev_desc->lun,
Maybe it is a good idea to change the default path of the switch statement in Line 127 also:
- case DEV_TYPE_UNKNOWN: + case IF_TYPE_UNKNOWN:
Best Regards, Martin Krause

Use correct field in block_dev_desc_t when writing interface type in dev_print. Error introduced in 574b319512b13e10800f0045e39b993f4ca25e42.
Changes: * Added fix from Martin Krause
Signed-off-by: Tor Krill tor@excito.com --- disk/part.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/disk/part.c b/disk/part.c index 316e254..5c4bf6b 100644 --- a/disk/part.c +++ b/disk/part.c @@ -109,7 +109,7 @@ void dev_print (block_dev_desc_t *dev_desc) lbaint_t lba512; #endif
- switch (dev_desc->type) { + switch (dev_desc->if_type) { case IF_TYPE_SCSI: printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n", dev_desc->target,dev_desc->lun, @@ -124,7 +124,7 @@ void dev_print (block_dev_desc_t *dev_desc) dev_desc->revision, dev_desc->product); break; - case DEV_TYPE_UNKNOWN: + case IF_TYPE_UNKNOWN: default: puts ("not available\n"); return;

In message 1212052230-11835-1-git-send-email-tor@excito.com you wrote:
Use correct field in block_dev_desc_t when writing interface type in dev_print. Error introduced in 574b319512b13e10800f0045e39b993f4ca25e42.
Changes:
- Added fix from Martin Krause
Signed-off-by: Tor Krill tor@excito.com
disk/part.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (3)
-
Martin Krause
-
Tor Krill
-
Wolfgang Denk