mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-24 14:25:56 +00:00
cmd/bootdev: print readable status code
device_probe() called by the 'bootdev info' command returns 0 or a negative error code. itoa() cannot print negative numbers. Convert the error code to a positive number. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
ca9d9263e5
commit
0236642212
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ static int do_bootdev_info(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
|
||||||
printf("Name: %s\n", dev->name);
|
printf("Name: %s\n", dev->name);
|
||||||
printf("Sequence: %d\n", dev_seq(dev));
|
printf("Sequence: %d\n", dev_seq(dev));
|
||||||
printf("Status: %s\n", ret ? simple_itoa(ret) : device_active(dev) ?
|
printf("Status: %s\n", ret ? simple_itoa(-ret) : device_active(dev) ?
|
||||||
"Probed" : "OK");
|
"Probed" : "OK");
|
||||||
printf("Uclass: %s\n", dev_get_uclass_name(dev_get_parent(dev)));
|
printf("Uclass: %s\n", dev_get_uclass_name(dev_get_parent(dev)));
|
||||||
printf("Bootflows: %d (%d valid)\n", i, num_valid);
|
printf("Bootflows: %d (%d valid)\n", i, num_valid);
|
||||||
|
|
Loading…
Add table
Reference in a new issue