summaryrefslogtreecommitdiff
path: root/src/include/sar.h
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-05-31 12:53:54 -0600
committerPatrick Georgi <pgeorgi@google.com>2019-06-11 17:24:53 +0000
commit913437e8a268130b7fbfb9d6d366c42de4f681be (patch)
tree859051a4be674ced9ef4959b8a1c5799eca5efc8 /src/include/sar.h
parentb5962a934a4dae3d84590dc8ef290f5fa8fec34b (diff)
console: Make die() and friends variadic
die() currently only accepts a fixed message string, which is rather inconvenient when there is extra information that would be helpful to print in the error message. This currently requires an extra call to printk(), which is somewhat awkward: printk(BIOS_EMERG, "Bad table, opcode %d at %d", id, i); die(""); // what do I say here? die() already has a printk() inside it to print the error message, so let's just make it variadic to combine the two. die("Bad table, opcode %d at %d", id, i); // much better Forwarding variadic arguments from one function to another is rather tricky, so die_with_post_code() is redefined as a variadic macro instead. Change-Id: I28b9eac32899a1aa89e086e0d3889b75459581aa Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33153 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'src/include/sar.h')
0 files changed, 0 insertions, 0 deletions