Retrieves the header details of the advanced accounting data file.
The libaacct.a library.
#define <sys/aacct.h>
getfilehdr(filename, hdrinfo)
char *filename;
struct aacct_file_header *hdrinfo;
The getfilehdr subroutine retrieves the advanced accounting data file header information in a structure of type aacct_file_header and returns it to the caller through the structure pointer passed to it. The data file header contains the system details such as the name of the host, the partition number, and the system model.
Item | Description |
---|---|
filename | Name of the advanced accounting data file. |
hdrinfo | Pointer to the aacct_file_header structure in which the header information is returned. |
No restrictions. Any user can call this function.
Item | Description |
---|---|
0 | The call to the subroutine was successful. |
-1 | The call to the subroutine failed. |
Item | Description |
---|---|
EINVAL | The passed pointer is NULL. |
ENOENT | Specified data file does not exist. |
EPERM | Permission denied. Unable to read the data file. |