SD_BUS_ERROR_ADD_MAP - Online Linux Manual PageSection : 3
Updated :
Source : systemd 250
Note : sd_bus_error_add_map

NAMEsd_bus_error_add_map, sd_bus_error_map, SD_BUS_ERROR_MAP, SD_BUS_ERROR_END − Additional sd−dbus error mappings

SYNOPSIS#include <systemd/sd−bus​.h>typedef struct { const char *name; int code; ​... } sd_bus_error_map;SD_BUS_ERROR_MAP(name, code) SD_BUS_ERROR_MAP_END int sd_bus_error_add_map(const sd_bus_error_map *map);

DESCRIPTIONThe sd_bus_error_add_map() call may be used to register additional mappings for converting D−Bus errors to Linux errno−style errors​. The mappings defined with this call are consulted by calls such as sd_bus_error_set(3) or sd_bus_error_get_errno(3)​. By default, a number of generic, standardized mappings are known, as documented in sd-bus-errors(3)​. Use this call to add further, application−specific mappings​. The function takes a pointer to an array of sd_bus_error_map structures​. A reference to the specified array is added to the lookup tables for error mappings​. Note that the structure is not copied, and that it is hence essential that the array stays available and constant during the entire remaining runtime of the process​. The mapping array should be put together with a series of SD_BUS_ERROR_MAP() macro invocations that take a literal name string and a (positive) errno−style error number​. The last entry of the array should be an invocation of the SD_BUS_ERROR_MAP_END macro​. The array should not be put together without use of these two macros​. Note that the call is idempotent: it is safe to invoke it multiple times with the parameter, which will only add the passed mapping array once​. Note that the memory allocated by this call is not intended to be freed during the lifetime of the process​. It should not be freed explicitly​.

RETURN VALUEsd_bus_error_add_map() returns a positive value when the new array was added to the lookup tables​. It returns zero when the same array was already added before​. On error, a negative errno−style error code is returned​. See below for known error codes​.

ErrorsReturned errors may indicate the following problems: −EINVAL The specified mapping array is invalid​. −ENOMEM Memory allocation failed​.

NOTESThese APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd ​pkg-config(1) file​.

SEE ALSOsystemd(1), sd-bus(3), sd_bus_error(3), sd-bus-errors(3), errno(3), strerror_r(3)
0
Johanes Gumabo
Data Size   :   10,106 byte
man-SD_BUS_ERROR_END.3Build   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 256,918
Visitor ID   :     :  
Visitor IP   :   3.149.25.87   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.