uexterr_gettext3
Get string representation of the current extended error
Usage
#include <exterr.h>
int
uexterr_gettext(char *buffer, size_t buffer_size);
Library
Standard C Library (libc, -lc)
Overview
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.
Releases
2 releases since FreeBSD 15.1-RELEASE; the text changed 1 time.