sd_event_set_name, sd_event_get_name — Set human-readable names for event sources
#include <systemd/sd-bus.h>
int sd_event_set_name( | sd_event_source *source, |
const char *name); |
int sd_event_get_name( | sd_event_source *source, |
const char **name); |
sd_event_set_name() can be used to set
an arbitrary name for the event source
source. This name will be used in error
messages generated by
sd-event(3)
for this source. Specified name must point
to a NUL-terminated string or be
NULL. In the latter case, the name will be
unset. The string is copied internally, so the
name argument is not referenced after the
function returns.
sd_event_set_name() can be used to
query the current name assigned to source
source. It returns a pointer to the current
name (possibly NULL) in
name.
On success, sd_event_set_name() and
sd_event_get_name() return a
non-negative integer. On failure, they return a negative
errno-style error code.
Functions described here are available as a
shared library, which can be compiled and linked to with the
libsystemd pkg-config(1)
file.