summaryrefslogtreecommitdiff
path: root/common/cmd_net.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-12-10 11:07:55 +0000
committerWolfgang Denk <wd@denx.de>2012-03-18 20:56:00 +0100
commit5ddb118da4cbd34c3c8a0231dedad56ba504699f (patch)
tree5fb2e7e107427bb6b30a5292283c88c65b42bd24 /common/cmd_net.c
parent578ac1e9ba4c79175e69becb28e7157a84eff241 (diff)
bootstage: Use show_boot_error() for -ve progress numbers
Rather than the caller negating our progress numbers to indicate an error has occurred, which seems hacky, add a function to indicate this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common/cmd_net.c')
-rw-r--r--common/cmd_net.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 3dd6810e051..c9f2a0864ae 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -230,23 +230,23 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
break;
#endif
default:
- show_boot_progress (-80);
+ show_boot_error(80);
return CMD_RET_USAGE;
}
- show_boot_progress (80);
+ show_boot_progress(80);
if ((size = NetLoop(proto)) < 0) {
- show_boot_progress (-81);
+ show_boot_error(81);
return 1;
}
- show_boot_progress (81);
+ show_boot_progress(81);
/* NetLoop ok, update environment */
netboot_update_env();
/* done if no file was loaded (no errors though) */
if (size == 0) {
- show_boot_progress (-82);
+ show_boot_error(82);
return 0;
}
@@ -257,9 +257,9 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
rcode = bootm_maybe_autostart(cmdtp, argv[0]);
if (rcode < 0)
- show_boot_progress (-83);
+ show_boot_error(83);
else
- show_boot_progress (84);
+ show_boot_progress(84);
return rcode;
}