diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-29 03:18:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-29 03:18:09 +0100 |
commit | f50e0a012340fa8dfe6ec7f0cd869f5f3a052d7a (patch) | |
tree | 79ef58ce7acbc8dffcb0af8284a0f4e5922bbe88 /unit.c | |
parent | b08d03ffe58332f590aae5c78a85e4fc0b8588ce (diff) |
implement coldpluggin
Diffstat (limited to 'unit.c')
-rw-r--r-- | unit.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -170,6 +170,19 @@ int unit_choose_id(Unit *u, const char *name) { return 0; } +int unit_set_description(Unit *u, const char *description) { + char *s; + + assert(u); + + if (!(s = strdup(description))) + return -ENOMEM; + + free(u->meta.description); + u->meta.description = s; + return 0; +} + void unit_add_to_load_queue(Unit *u) { assert(u); @@ -586,7 +599,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) { else { assert(u->meta.job->state == JOB_RUNNING); - /* Let's check of this state change + /* Let's check whether this state change * constitutes a finished job, or maybe * cotradicts a running job and hence needs to * invalidate jobs. */ |