MCPcopy Create free account
hub / github.com/coreboot/coreboot / val2str_default

Function val2str_default

util/cbfstool/flashmap/valstr.c:9–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <valstr.h>
8
9const char *val2str_default(uint32_t val, const struct valstr *vs,
10 const char *def_str)
11{
12 int i;
13
14 for (i = 0; vs[i].str; i++) {
15 if (vs[i].val == val)
16 return vs[i].str;
17 }
18
19 return def_str;
20}
21
22const char *val2str(uint32_t val, const struct valstr *vs)
23{

Callers 2

eventlog_print_typeFunction · 0.85
val2strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected