diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-07-30 16:52:30 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-08-02 12:05:57 -0600 |
commit | 0236642212f87c8d589f9e16cc29503b476a45c5 (patch) | |
tree | 800b62bdd05d744dad2c2b791878ed3aa2e81031 | |
parent | ca9d9263e5214d450e2693b6de297fee74ee753e (diff) |
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>
-rw-r--r-- | cmd/bootdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/bootdev.c b/cmd/bootdev.c index 5b1efaaee87..a657de6bd0f 100644 --- a/cmd/bootdev.c +++ b/cmd/bootdev.c @@ -99,7 +99,7 @@ static int do_bootdev_info(struct cmd_tbl *cmdtp, int flag, int argc, printf("Name: %s\n", dev->name); 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"); printf("Uclass: %s\n", dev_get_uclass_name(dev_get_parent(dev))); printf("Bootflows: %d (%d valid)\n", i, num_valid); |