diag_get_fru_serial
Purpose
Gets the FRU serial number from the given FRU location code.
Syntax
int diag_get_fru_serial (char *loc, char **fru_serial)
Description
The diag_get_fru_serial routine attempts to retrieve the
FRU (field replaceable unit) serial number for a given physical location
code.
Note: The calling routine must initialize and stop
the Object Database Manager (ODM). It can use the diagnostic library
routines, init_dgodm() and term_dgodm(), respectively.
Parameters
Parameter | Description |
---|---|
loc | Physical location of the FRU to return it's FRU serial number. |
fru_serial | Returns the FRU serial number if found, otherwise is set to NULL. |
Return Value
The diag_get_fru_serial subroutine returns one of the following values:
Return Value | Description |
---|---|
-1 | If there was an error retrieving the FRU serial number. |
0 | If the FRU serial number is not found. |
1 | If the FRU serial number was found, and fru_serial now points to the FRU serial number. |