diff options
author | Matthew Miller <mattdm@mattdm.org> | 2010-08-31 00:17:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-31 00:17:56 +0200 |
commit | 74ac3cbd509de2f5995542aa5db39328e8cbd22a (patch) | |
tree | 9836d146be88e690d0680c1629b1674736b6258b /src | |
parent | c88e7f4e57fcef7998dcd570e8a8866c5116f0de (diff) |
manager: rename 'maintenance' state to 'failed' to avoid user confusion
https://bugzilla.redhat.com/show_bug.cgi?id=614619
Diffstat (limited to 'src')
-rw-r--r-- | src/automount.c | 14 | ||||
-rw-r--r-- | src/automount.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/automount.c b/src/automount.c index b32e0027c1..414816b640 100644 --- a/src/automount.c +++ b/src/automount.c @@ -43,7 +43,7 @@ static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = { [AUTOMOUNT_DEAD] = UNIT_INACTIVE, [AUTOMOUNT_WAITING] = UNIT_ACTIVE, [AUTOMOUNT_RUNNING] = UNIT_ACTIVE, - [AUTOMOUNT_MAINTENANCE] = UNIT_MAINTENANCE + [AUTOMOUNT_FAILED] = UNIT_FAILED }; static int open_dev_autofs(Manager *m); @@ -294,7 +294,7 @@ static void automount_enter_dead(Automount *a, bool success) { if (!success) a->failure = true; - automount_set_state(a, a->failure ? AUTOMOUNT_MAINTENANCE : AUTOMOUNT_DEAD); + automount_set_state(a, a->failure ? AUTOMOUNT_FAILED : AUTOMOUNT_DEAD); } static int open_dev_autofs(Manager *m) { @@ -606,7 +606,7 @@ static int automount_start(Unit *u) { assert(a); - assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_MAINTENANCE); + assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_FAILED); if (path_is_mount_point(a->where)) { log_error("Path %s is already a mount point, refusing start for %s", a->where, u->meta.id); @@ -794,12 +794,12 @@ static void automount_shutdown(Manager *m) { close_nointr_nofail(m->dev_autofs_fd); } -static void automount_reset_maintenance(Unit *u) { +static void automount_reset_failed(Unit *u) { Automount *a = AUTOMOUNT(u); assert(a); - if (a->state == AUTOMOUNT_MAINTENANCE) + if (a->state == AUTOMOUNT_FAILED) automount_set_state(a, AUTOMOUNT_DEAD); a->failure = false; @@ -809,7 +809,7 @@ static const char* const automount_state_table[_AUTOMOUNT_STATE_MAX] = { [AUTOMOUNT_DEAD] = "dead", [AUTOMOUNT_WAITING] = "waiting", [AUTOMOUNT_RUNNING] = "running", - [AUTOMOUNT_MAINTENANCE] = "maintenance" + [AUTOMOUNT_FAILED] = "failed" }; DEFINE_STRING_TABLE_LOOKUP(automount_state, AutomountState); @@ -841,7 +841,7 @@ const UnitVTable automount_vtable = { .fd_event = automount_fd_event, - .reset_maintenance = automount_reset_maintenance, + .reset_failed = automount_reset_failed, .bus_interface = "org.freedesktop.systemd1.Automount", .bus_message_handler = bus_automount_message_handler, diff --git a/src/automount.h b/src/automount.h index 9786222d11..1a6cc98fd1 100644 --- a/src/automount.h +++ b/src/automount.h @@ -30,7 +30,7 @@ typedef enum AutomountState { AUTOMOUNT_DEAD, AUTOMOUNT_WAITING, AUTOMOUNT_RUNNING, - AUTOMOUNT_MAINTENANCE, + AUTOMOUNT_FAILED, _AUTOMOUNT_STATE_MAX, _AUTOMOUNT_STATE_INVALID = -1 } AutomountState; |