NAME
uexterr_gettext – get string representation of the current extended error
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <exterr.h>
int
uexterr_gettext(char *buffer, size_t buffer_size);
DESCRIPTION
The uexterr_gettext function fills the buffer pointed to by the buffer pointer with the formatted extended null-terminated error string, as reported by the last error from a system call, which returned an extended error. The capacity of the passed buffer is buffer_size bytes.
Normally, applications should use the err(3) family of functions to display errors from system calls. If this is not convenient or even not possible, for instance for applications with an advanced user interface, the uexterr_gettext function can be used to fetch the string with the extended error.
Note that most parts of the extended errors are directly provided by the kernel, and as such cannot be localized.
See exterror(9) for the description of the extended error facilities.
RETURN VALUES
The function returns zero. There are currently no errors defined for the function, which might change in future.
If any error condition is added, it will be reported by returning -1 and setting errno to the corresponding value.
SEE ALSO
STANDARDS
The uexterr_gettext is a FreeBSD extension that first appeared in FreeBSD 15.0.