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

Function strerror

payloads/libpayload/libc/string.c:570–576  ·  view source on GitHub ↗

* Get a message string describing the given error number. * * @param errnum The error number to be interpreted * @return A pointer to a string describing the given error number */

Source from the content-addressed store, hash-verified

568 * @return A pointer to a string describing the given error number
569 */
570char *strerror(int errnum)
571{
572 /* Reserve enough space for the string below + INT64_MIN in decimal + \0 */
573 static char errstr[35];
574 snprintf(errstr, sizeof(errstr), "Unknown error %d", errnum);
575 return errstr;
576}
577
578/*
579 * Simple routine to convert UTF-16 to ASCII, giving up with ? if too high.

Callers 15

ivybridge_dump_timingsFunction · 0.85
linux_openFunction · 0.85
do_streamFunction · 0.85
do_diffFunction · 0.85
map_fileFunction · 0.85
unmap_fileFunction · 0.85
mainFunction · 0.85
new_sysfs_pathFunction · 0.85
cbmem_sysfs_initFunction · 0.85
fetch_cbmem_entryFunction · 0.85

Calls 1

snprintfFunction · 0.70

Tested by

no test coverage detected