libfru 2.0+git20240917.25293b1
FRU Manupulation Library
Loading...
Searching...
No Matches
Functions | Variables
fru-errno.c File Reference
#include <string.h>
#include "fru-errno.h"
Include dependency graph for fru-errno.c:

Functions

const char * fru_strerr (fru_errno_t ferr)
 Get a description of the given fru_errno value.
 

Variables

__thread fru_errno_t fru_errno
 Numeric code of an error.
 

Function Documentation

◆ fru_strerr()

const char * fru_strerr ( fru_errno_t  ferr)

Get a description of the given fru_errno value.

Returns
A pointer to a constant string with the description
Return values
NULLNo description found for the given value.

References FEBASE, and FETOTALCOUNT.

Referenced by load_from_binary_file(), main(), save_to_binary_file(), and save_to_text_file().

Here is the caller graph for this function:

Variable Documentation

◆ fru_errno

__thread fru_errno_t fru_errno

Numeric code of an error.

Similar to errno, this variable is modified by most functons in libfru in the event of an error.

Set this to 0 before invocation of any libfru function. Check for non-zero values after the invocation.

Non-zero values below 10000 represent the standard errno codes and can be decoded with strerr().

Both the standard errno and extended fru-specific codes can be decoded with fru_strerr()

Referenced by find_fru_header(), find_fru_internal_use_area(), find_fru_mr_area(), fru_create(), fru_decode_internal_use_area(), fru_decode_mr_area(), fru_encode_chassis_info(), fru_encode_internal_use_area(), fru_encode_mr_area(), fru_mr_mgmt_rec2str(), fru_mr_rec2uuid(), load_from_binary_file(), main(), save_to_binary_file(), and save_to_text_file().