From 043f62949e6eb400ad42fd891a957ecf514c35f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 2 Oct 2014 21:14:26 -0400 Subject: [PATCH] man: add sd_event_set_name(3) --- Makefile-man.am | 7 +++ man/sd_event_set_name.xml | 151 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 man/sd_event_set_name.xml diff --git a/Makefile-man.am b/Makefile-man.am index aff5186c2d..a13e948bc8 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -735,6 +735,7 @@ MANPAGES += \ man/sd_event_add_time.3 \ man/sd_event_get_fd.3 \ man/sd_event_new.3 \ + man/sd_event_set_name.3 \ man/systemd-bus-proxyd.8 \ man/systemd-bus-proxyd@.service.8 MANPAGES_ALIAS += \ @@ -795,6 +796,7 @@ MANPAGES_ALIAS += \ man/sd_event_add_exit.3 \ man/sd_event_add_post.3 \ man/sd_event_default.3 \ + man/sd_event_get_name.3 \ man/sd_event_ref.3 \ man/sd_event_source_get_child_pid.3 \ man/sd_event_source_get_signal.3 \ @@ -862,6 +864,7 @@ man/sd_bus_unref.3: man/sd_bus_new.3 man/sd_event_add_exit.3: man/sd_event_add_defer.3 man/sd_event_add_post.3: man/sd_event_add_defer.3 man/sd_event_default.3: man/sd_event_new.3 +man/sd_event_get_name.3: man/sd_event_set_name.3 man/sd_event_ref.3: man/sd_event_new.3 man/sd_event_source_get_child_pid.3: man/sd_event_add_child.3 man/sd_event_source_get_signal.3: man/sd_event_add_signal.3 @@ -1043,6 +1046,9 @@ man/sd_event_add_post.html: man/sd_event_add_defer.html man/sd_event_default.html: man/sd_event_new.html $(html-alias) +man/sd_event_get_name.html: man/sd_event_set_name.html + $(html-alias) + man/sd_event_ref.html: man/sd_event_new.html $(html-alias) @@ -1577,6 +1583,7 @@ EXTRA_DIST += \ man/sd_event_add_time.xml \ man/sd_event_get_fd.xml \ man/sd_event_new.xml \ + man/sd_event_set_name.xml \ man/sd_get_seats.xml \ man/sd_id128_get_machine.xml \ man/sd_id128_randomize.xml \ diff --git a/man/sd_event_set_name.xml b/man/sd_event_set_name.xml new file mode 100644 index 0000000000..406d124972 --- /dev/null +++ b/man/sd_event_set_name.xml @@ -0,0 +1,151 @@ + + + + + + + + + sd_event_set_name + systemd + + + + More text + Zbigniew + Jędrzejewski-Szmek + zbyszek@in.waw.pl + + + + + + sd_event_set_name + 3 + + + + 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 + + + + + + + Description + + 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-event3 + 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. + + + + Return Value + + 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. + + + + Errors + + Returned errors may indicate the following problems: + + + + -EINVAL + + source is not a valid + pointer to an sd_event_source + structure or the name argument for + sd_event_get_name() is + NULL. + + + + -ENOMEM + + Not enough memory to copy the + name. + + + + + + Notes + + Functions described here are available as a + shared library, which can be compiled and linked to with the + libsystemd pkg-config1 + file. + + + + See Also + + + sd-event3, + sd_event_add_time3, + sd_event_add_child3, + sd_event_add_signal3, + sd_event_add_defer3, + sd_event_run3 + + + +