diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-26 21:39:06 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-26 21:39:06 +0100 |
commit | 87f0e418cf2c58b3201d06a60e3696ec672d2662 (patch) | |
tree | a27ef34fdf69505d983852d36d200b6e590726df /device.c | |
parent | fd79db6a5df0f94c48736ce5aa0131d6ab108fb0 (diff) | |
download | systemd-87f0e418cf2c58b3201d06a60e3696ec672d2662.tar.gz |
s/name/unit
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,24 +1,24 @@ /*-*- Mode: C; c-basic-offset: 8 -*-*/ -#include "name.h" +#include "unit.h" #include "device.h" #include "strv.h" -static void device_done(Name *n) { - Device *d = DEVICE(n); +static void device_done(Unit *u) { + Device *d = DEVICE(u); assert(d); strv_free(d->sysfs); } -static void device_dump(Name *n, FILE *f, const char *prefix) { +static void device_dump(Unit *u, FILE *f, const char *prefix) { static const char* const state_table[_DEVICE_STATE_MAX] = { [DEVICE_DEAD] = "dead", [DEVICE_AVAILABLE] = "available" }; - Device *s = DEVICE(n); + Device *s = DEVICE(u); assert(s); @@ -27,14 +27,14 @@ static void device_dump(Name *n, FILE *f, const char *prefix) { prefix, state_table[s->state]); } -static NameActiveState device_active_state(Name *n) { - return DEVICE(n)->state == DEVICE_DEAD ? NAME_INACTIVE : NAME_ACTIVE; +static UnitActiveState device_active_state(Unit *u) { + return DEVICE(u)->state == DEVICE_DEAD ? UNIT_INACTIVE : UNIT_ACTIVE; } -const NameVTable device_vtable = { +const UnitVTable device_vtable = { .suffix = ".device", - .init = name_load_fragment_and_dropin, + .init = unit_load_fragment_and_dropin, .done = device_done, .dump = device_dump, |