diff options
author | Joel Kitching <kitching@google.com> | 2019-07-22 14:21:35 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-24 06:53:41 +0000 |
commit | e050a2c88fc963cb97d9794849e9e2b60fabbe77 (patch) | |
tree | f037b8c93a7dc4b8a5d23c9b7a643d1dedfc71e0 /firmware/stub | |
parent | 34abb32ed2e48ccad95320c37fb001df8e3442fd (diff) | |
download | vboot-e050a2c88fc963cb97d9794849e9e2b60fabbe77.tar.gz |
vboot: deprecate VbExError function
Convert uses of this function to call VB2_DEBUG and manually
exit if necessary.
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: I9006b1a9c66645757d33310d96207233b88eaed5
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1710340
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware/stub')
-rw-r--r-- | firmware/stub/vboot_api_stub_init.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/firmware/stub/vboot_api_stub_init.c b/firmware/stub/vboot_api_stub_init.c index 23ae9f78..0f7a3482 100644 --- a/firmware/stub/vboot_api_stub_init.c +++ b/firmware/stub/vboot_api_stub_init.c @@ -15,34 +15,6 @@ #include "vboot_api.h" -/* U-Boot's printf uses '%L' for uint64_t. gcc uses '%l'. */ -#define MAX_FMT 255 -static char fmtbuf[MAX_FMT+1]; - -static const char *fixfmt(const char *format) -{ - int i; - for(i=0; i<sizeof(fmtbuf)-1 && format[i]; i++) { - fmtbuf[i] = format[i]; - if(format[i] == '%' && format[i+1] == 'L') { - fmtbuf[i+1] = 'l'; - i++; - } - } - fmtbuf[i] = '\0'; - return fmtbuf; -} - -void VbExError(const char *format, ...) -{ - va_list ap; - va_start(ap, format); - fprintf(stderr, "ERROR: "); - vfprintf(stderr, fixfmt(format), ap); - va_end(ap); - exit(1); -} - uint64_t VbExGetTimer(void) { struct timeval tv; |