summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-event/sd-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-event/sd-event.c')
-rw-r--r--src/libsystemd/sd-event/sd-event.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 80a2ae97e8..f0356a48e6 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -66,7 +66,7 @@ struct sd_event_source {
void *userdata;
sd_event_handler_t prepare;
- char *name;
+ char *description;
EventSourceType type:5;
int enabled:3;
@@ -737,7 +737,7 @@ static void source_free(sd_event_source *s) {
assert(s);
source_disconnect(s);
- free(s->name);
+ free(s->description);
free(s);
}
@@ -1253,18 +1253,17 @@ _public_ sd_event_source* sd_event_source_unref(sd_event_source *s) {
return NULL;
}
-_public_ int sd_event_source_set_name(sd_event_source *s, const char *name) {
+_public_ int sd_event_source_set_description(sd_event_source *s, const char *description) {
assert_return(s, -EINVAL);
- return free_and_strdup(&s->name, name);
+ return free_and_strdup(&s->description, description);
}
-_public_ int sd_event_source_get_name(sd_event_source *s, const char **name) {
+_public_ int sd_event_source_get_description(sd_event_source *s, const char **description) {
assert_return(s, -EINVAL);
- assert_return(name, -EINVAL);
-
- *name = s->name;
+ assert_return(description, -EINVAL);
+ *description = s->description;
return 0;
}
@@ -2152,8 +2151,8 @@ static int source_dispatch(sd_event_source *s) {
s->dispatching = false;
if (r < 0) {
- if (s->name)
- log_debug("Event source '%s' returned error, disabling: %s", s->name, strerror(-r));
+ if (s->description)
+ log_debug("Event source '%s' returned error, disabling: %s", s->description, strerror(-r));
else
log_debug("Event source %p returned error, disabling: %s", s, strerror(-r));
}
@@ -2190,8 +2189,8 @@ static int event_prepare(sd_event *e) {
s->dispatching = false;
if (r < 0) {
- if (s->name)
- log_debug("Prepare callback of event source '%s' returned error, disabling: %s", s->name, strerror(-r));
+ if (s->description)
+ log_debug("Prepare callback of event source '%s' returned error, disabling: %s", s->description, strerror(-r));
else
log_debug("Prepare callback of event source %p returned error, disabling: %s", s, strerror(-r));
}