SCF_ERROR(3SCF) | Service Configuration Facility Library Functions | SCF_ERROR(3SCF) |
scf_error, scf_strerror - error interface to Service Configuration Facility
cc [ flag... ] file... -lscf [ library... ] #include <libscf.h> scf_error_t scf_error(void);
const char *scf_strerror(scf_error_t error);
The scf_error() function returns the current libscf(3LIB) error value for the current thread. If the immediately previous call to a libscf function failed, the error value will reflect the reason for that failure.
The scf_strerror() function takes an error code previously returned by scf_error() and returns a human-readable, localized description of the error.
The error values are as follows:
SCF_ERROR_BACKEND_ACCESS
SCF_ERROR_BACKEND_READONLY
SCF_ERROR_CONNECTION_BROKEN
SCF_ERROR_CONSTRAINT_VIOLATED
SCF_ERROR_DELETED
SCF_ERROR_EXISTS
SCF_ERROR_HANDLE_DESTROYED
SCF_ERROR_HANDLE_MISMATCH
SCF_ERROR_IN_USE
SCF_ERROR_INTERNAL
SCF_ERROR_INVALID_ARGUMENT
SCF_ERROR_NO_MEMORY
SCF_ERROR_NO_RESOURCES
SCF_ERROR_NO_SERVER
SCF_ERROR_NONE
SCF_ERROR_NOT_BOUND
SCF_ERROR_NOT_FOUND
SCF_ERROR_NOT_SET
SCF_ERROR_PERMISSION_DENIED
SCF_ERROR_TYPE_MISMATCH
SCF_ERROR_VERSION_MISMATCH
The scf_error() function returns SCF_ERROR_NONE if there have been no calls from libscf functions from the current thread. The return value is undefined if the immediately previous call to a libscf function did not fail.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
MT-Level | MT-Safe |
February 21, 2023 | OmniOS |