Skip to content

Commit

Permalink
hdata_to_dt: fail "gracefully" on fatal op_display()
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Mar 20, 2019
1 parent c0faa92 commit a2c13f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 11 additions & 0 deletions hdata/test/hdata_to_dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,17 @@ static bool spira_check_ptr(const void *ptr, const char *file, unsigned int line

#include <err.h>

#include <op-panel.h>

void op_display(enum op_severity s, enum op_module m, uint16_t code)
{
fprintf(stderr, "op_panel Severity: 0x%x (%s), module %x, %x\n",
s, (s == OP_FATAL) ? "FATAL" : "non-fatal",
m, code);
if (s == OP_FATAL)
exit(EXIT_FAILURE);
}

char __rodata_start[1], __rodata_end[1];

enum proc_gen proc_gen = proc_gen_p7;
Expand Down
1 change: 0 additions & 1 deletion hdata/test/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ static void stub_function(void)
#define STUB(fnname) \
void fnname(void) __attribute__((weak, alias ("stub_function")))

STUB(op_display);
STUB(fsp_preload_lid);
STUB(fsp_wait_lid_loaded);
STUB(fsp_adjust_lid_side);
Expand Down

0 comments on commit a2c13f1

Please sign in to comment.