libfru 2.0+git20240917.25293b1
FRU Manupulation Library
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
fru-errno.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  fru_errno_t {
  FEBASE = 10000 ,
  FELONGINPUT = FEBASE ,
  FENONPRINT ,
  FENONHEX ,
  FERANGE ,
  FENOTEVEN ,
  FEBADENC ,
  FETOOSMALL ,
  FEHDRVER ,
  FEHDRBADPTR ,
  FENOSUCHAREA ,
  FEAREANOTSUP ,
  FEAREABADTYPE ,
  FEAREAVER ,
  FEAREACKSUM ,
  FEHEXLEN ,
  FEINVCHAS ,
  FEMRNODATA ,
  FEMRVER ,
  FEMRHCKSUM ,
  FEMRDCKSUM ,
  FEMRMGMTRANGE ,
  FEMRMGMTSIZE ,
  FEMRMGMTTYPE ,
  FETOTALCOUNT
}
 

Functions

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

Variables

__thread fru_errno_t fru_errno
 Numeric code of an error.
 

Enumeration Type Documentation

◆ fru_errno_t

Defines the errors specific to libfru. Number range is supposed to include standard errno codes.

Enumerator
FEBASE 
FELONGINPUT 
FENONPRINT 
FENONHEX 
FERANGE 
FENOTEVEN 
FEBADENC 
FETOOSMALL 
FEHDRVER 
FEHDRBADPTR 
FENOSUCHAREA 
FEAREANOTSUP 
FEAREABADTYPE 
FEAREAVER 
FEAREACKSUM 
FEHEXLEN 
FEINVCHAS 
FEMRNODATA 
FEMRVER 
FEMRHCKSUM 
FEMRDCKSUM 
FEMRMGMTRANGE 
FEMRMGMTSIZE 
FEMRMGMTTYPE 
FETOTALCOUNT 

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
extern

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().