Commit fdf20a31 authored by Matthew Miller's avatar Matthew Miller Committed by Lennart Poettering
Browse files

manager: add missing second part of s/maintenance/failed/

parent 74ac3cbd
......@@ -76,7 +76,7 @@
" <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
" <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
" </method>\n" \
" <method name=\"ResetMaintenanceUnit\">\n" \
" <method name=\"ResetFailedUnit\">\n" \
" <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
" </method>\n" \
" <method name=\"GetJob\">\n" \
......@@ -84,7 +84,7 @@
" <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
" </method>\n" \
" <method name=\"ClearJobs\"/>\n" \
" <method name=\"ResetMaintenance\"/>\n" \
" <method name=\"ResetFailed\"/>\n" \
" <method name=\"ListUnits\">\n" \
" <arg name=\"units\" type=\"a(ssssssouso)\" direction=\"out\"/>\n" \
" </method>\n" \
......@@ -403,14 +403,14 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
if (!(reply = dbus_message_new_method_return(message)))
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetMaintenance")) {
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetFailed")) {
manager_reset_maintenance(m);
manager_reset_failed(m);
if (!(reply = dbus_message_new_method_return(message)))
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetMaintenanceUnit")) {
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetFailedUnit")) {
const char *name;
Unit *u;
......@@ -426,7 +426,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
return bus_send_error_reply(m, connection, message, &error, -ENOENT);
}
unit_reset_maintenance(u);
unit_reset_failed(u);
if (!(reply = dbus_message_new_method_return(message)))
goto oom;
......
......@@ -367,9 +367,9 @@ static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusConnection *conn
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Unit", "ReloadOrTryRestart")) {
reload_if_possible = true;
job_type = JOB_TRY_RESTART;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Unit", "ResetMaintenance")) {
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Unit", "ResetFailed")) {
unit_reset_maintenance(u);
unit_reset_failed(u);
if (!(reply = dbus_message_new_method_return(message)))
goto oom;
......
......@@ -56,7 +56,7 @@
" <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
" <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
" </method>\n" \
" <method name=\"ResetMaintenance\"/>\n" \
" <method name=\"ResetFailed\"/>\n" \
" <property name=\"Id\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"Names\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"Following\" type=\"s\" access=\"read\"/>\n" \
......
......@@ -271,7 +271,7 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) {
case JOB_STOP:
return
b == UNIT_INACTIVE ||
b == UNIT_MAINTENANCE;
b == UNIT_FAILED;
case JOB_VERIFY_ACTIVE:
return
......@@ -417,7 +417,7 @@ int job_run_and_invalidate(Job *j) {
case JOB_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_ACTIVATING) {
if (t == UNIT_INACTIVE || t == UNIT_FAILED || t == UNIT_ACTIVATING) {
j->type = JOB_START;
r = unit_start(j->unit);
} else
......@@ -427,7 +427,7 @@ int job_run_and_invalidate(Job *j) {
case JOB_TRY_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_DEACTIVATING)
if (t == UNIT_INACTIVE || t == UNIT_FAILED || t == UNIT_DEACTIVATING)
r = -ENOEXEC;
else if (t == UNIT_ACTIVATING) {
j->type = JOB_START;
......
......@@ -1397,12 +1397,12 @@ static int transaction_add_job_and_dependencies(
assert(type < _JOB_TYPE_MAX);
assert(unit);
if (unit->meta.load_state != UNIT_LOADED && unit->meta.load_state != UNIT_FAILED) {
if (unit->meta.load_state != UNIT_LOADED && unit->meta.load_state != UNIT_ERROR) {
dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s is not loaded properly.", unit->meta.id);
return -EINVAL;
}
if (type != JOB_STOP && unit->meta.load_state == UNIT_FAILED) {
if (type != JOB_STOP && unit->meta.load_state == UNIT_ERROR) {
dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s failed to load: %s. You might find more information in the logs.",
unit->meta.id,
strerror(-unit->meta.load_error));
......@@ -1496,7 +1496,7 @@ static int transaction_add_isolate_jobs(Manager *m) {
continue;
/* No need to stop inactive jobs */
if (UNIT_IS_INACTIVE_OR_MAINTENANCE(unit_active_state(u)))
if (UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(u)))
continue;
/* Is there already something listed for this? */
......@@ -2552,14 +2552,14 @@ bool manager_is_booting_or_shutting_down(Manager *m) {
return false;
}
void manager_reset_maintenance(Manager *m) {
void manager_reset_failed(Manager *m) {
Unit *u;
Iterator i;
assert(m);
HASHMAP_FOREACH(u, m->units, i)
unit_reset_maintenance(u);
unit_reset_failed(u);
}
int manager_set_console(Manager *m, const char *console) {
......
......@@ -255,7 +255,7 @@ int manager_reload(Manager *m);
bool manager_is_booting_or_shutting_down(Manager *m);
void manager_reset_maintenance(Manager *m);
void manager_reset_failed(Manager *m);
void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success);
......
......@@ -50,7 +50,7 @@ static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
[MOUNT_REMOUNTING_SIGKILL] = UNIT_RELOADING,
[MOUNT_UNMOUNTING_SIGTERM] = UNIT_DEACTIVATING,
[MOUNT_UNMOUNTING_SIGKILL] = UNIT_DEACTIVATING,
[MOUNT_MAINTENANCE] = UNIT_MAINTENANCE
[MOUNT_FAILED] = UNIT_FAILED
};
static void mount_init(Unit *u) {
......@@ -468,7 +468,7 @@ static void mount_set_state(Mount *m, MountState state) {
state == MOUNT_REMOUNTING_SIGKILL ||
state == MOUNT_UNMOUNTING_SIGTERM ||
state == MOUNT_UNMOUNTING_SIGKILL ||
state == MOUNT_MAINTENANCE)
state == MOUNT_FAILED)
mount_notify_automount(m, -ENODEV);
if (state != old_state)
......@@ -608,7 +608,7 @@ static void mount_enter_dead(Mount *m, bool success) {
if (!success)
m->failure = true;
mount_set_state(m, m->failure ? MOUNT_MAINTENANCE : MOUNT_DEAD);
mount_set_state(m, m->failure ? MOUNT_FAILED : MOUNT_DEAD);
}
static void mount_enter_mounted(Mount *m, bool success) {
......@@ -839,7 +839,7 @@ static int mount_start(Unit *u) {
m->state == MOUNT_MOUNTING_SIGKILL)
return 0;
assert(m->state == MOUNT_DEAD || m->state == MOUNT_MAINTENANCE);
assert(m->state == MOUNT_DEAD || m->state == MOUNT_FAILED);
m->failure = false;
mount_enter_mounting(m);
......@@ -1507,7 +1507,7 @@ void mount_fd_event(Manager *m, int events) {
switch (mount->state) {
case MOUNT_DEAD:
case MOUNT_MAINTENANCE:
case MOUNT_FAILED:
mount_enter_mounted(mount, true);
break;
......@@ -1531,12 +1531,12 @@ void mount_fd_event(Manager *m, int events) {
}
}
static void mount_reset_maintenance(Unit *u) {
static void mount_reset_failed(Unit *u) {
Mount *m = MOUNT(u);
assert(m);
if (m->state == MOUNT_MAINTENANCE)
if (m->state == MOUNT_FAILED)
mount_set_state(m, MOUNT_DEAD);
m->failure = false;
......@@ -1555,7 +1555,7 @@ static const char* const mount_state_table[_MOUNT_STATE_MAX] = {
[MOUNT_REMOUNTING_SIGKILL] = "remounting-sigkill",
[MOUNT_UNMOUNTING_SIGTERM] = "unmounting-sigterm",
[MOUNT_UNMOUNTING_SIGKILL] = "unmounting-sigkill",
[MOUNT_MAINTENANCE] = "maintenance"
[MOUNT_FAILED] = "failed"
};
DEFINE_STRING_TABLE_LOOKUP(mount_state, MountState);
......@@ -1599,7 +1599,7 @@ const UnitVTable mount_vtable = {
.sigchld_event = mount_sigchld_event,
.timer_event = mount_timer_event,
.reset_maintenance = mount_reset_maintenance,
.reset_failed = mount_reset_failed,
.bus_interface = "org.freedesktop.systemd1.Mount",
.bus_message_handler = bus_mount_message_handler,
......
......@@ -39,7 +39,7 @@ typedef enum MountState {
MOUNT_REMOUNTING_SIGKILL,
MOUNT_UNMOUNTING_SIGTERM,
MOUNT_UNMOUNTING_SIGKILL,
MOUNT_MAINTENANCE,
MOUNT_FAILED,
_MOUNT_STATE_MAX,
_MOUNT_STATE_INVALID = -1
} MountState;
......
......@@ -36,7 +36,7 @@ static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = {
[PATH_DEAD] = UNIT_INACTIVE,
[PATH_WAITING] = UNIT_ACTIVE,
[PATH_RUNNING] = UNIT_ACTIVE,
[PATH_MAINTENANCE] = UNIT_MAINTENANCE
[PATH_FAILED] = UNIT_FAILED
};
static void path_done(Unit *u) {
......@@ -301,7 +301,7 @@ static void path_enter_dead(Path *p, bool success) {
if (!success)
p->failure = true;
path_set_state(p, p->failure ? PATH_MAINTENANCE : PATH_DEAD);
path_set_state(p, p->failure ? PATH_FAILED : PATH_DEAD);
}
static void path_enter_running(Path *p) {
......@@ -383,7 +383,7 @@ static int path_start(Unit *u) {
Path *p = PATH(u);
assert(p);
assert(p->state == PATH_DEAD || p->state == PATH_MAINTENANCE);
assert(p->state == PATH_DEAD || p->state == PATH_FAILED);
if (p->unit->meta.load_state != UNIT_LOADED)
return -ENOENT;
......@@ -556,12 +556,12 @@ fail:
log_error("Failed find path unit: %s", strerror(-r));
}
static void path_reset_maintenance(Unit *u) {
static void path_reset_failed(Unit *u) {
Path *p = PATH(u);
assert(p);
if (p->state == PATH_MAINTENANCE)
if (p->state == PATH_FAILED)
path_set_state(p, PATH_DEAD);
p->failure = false;
......@@ -571,7 +571,7 @@ static const char* const path_state_table[_PATH_STATE_MAX] = {
[PATH_DEAD] = "dead",
[PATH_WAITING] = "waiting",
[PATH_RUNNING] = "running",
[PATH_MAINTENANCE] = "maintenance"
[PATH_FAILED] = "failed"
};
DEFINE_STRING_TABLE_LOOKUP(path_state, PathState);
......@@ -605,7 +605,7 @@ const UnitVTable path_vtable = {
.fd_event = path_fd_event,
.reset_maintenance = path_reset_maintenance,
.reset_failed = path_reset_failed,
.bus_interface = "org.freedesktop.systemd1.Path",
.bus_message_handler = bus_path_message_handler
......
......@@ -31,7 +31,7 @@ typedef enum PathState {
PATH_DEAD,
PATH_WAITING,
PATH_RUNNING,
PATH_MAINTENANCE,
PATH_FAILED,
_PATH_STATE_MAX,
_PATH_STATE_INVALID = -1
} PathState;
......
......@@ -95,7 +95,7 @@ static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_STOP_POST] = UNIT_DEACTIVATING,
[SERVICE_FINAL_SIGTERM] = UNIT_DEACTIVATING,
[SERVICE_FINAL_SIGKILL] = UNIT_DEACTIVATING,
[SERVICE_MAINTENANCE] = UNIT_MAINTENANCE,
[SERVICE_FAILED] = UNIT_FAILED,
[SERVICE_AUTO_RESTART] = UNIT_ACTIVATING
};
......@@ -1197,7 +1197,7 @@ static void service_set_state(Service *s, ServiceState state) {
state == SERVICE_STOP_POST ||
state == SERVICE_FINAL_SIGTERM ||
state == SERVICE_FINAL_SIGKILL ||
state == SERVICE_MAINTENANCE ||
state == SERVICE_FAILED ||
state == SERVICE_AUTO_RESTART)
service_notify_sockets_dead(s);
......@@ -1521,7 +1521,7 @@ static void service_enter_dead(Service *s, bool success, bool allow_restart) {
service_set_state(s, SERVICE_AUTO_RESTART);
} else
service_set_state(s, s->failure ? SERVICE_MAINTENANCE : SERVICE_DEAD);
service_set_state(s, s->failure ? SERVICE_FAILED : SERVICE_DEAD);
s->forbid_restart = false;
......@@ -1966,7 +1966,7 @@ static int service_start(Unit *u) {
s->state == SERVICE_START_POST)
return 0;
assert(s->state == SERVICE_DEAD || s->state == SERVICE_MAINTENANCE || s->state == SERVICE_AUTO_RESTART);
assert(s->state == SERVICE_DEAD || s->state == SERVICE_FAILED || s->state == SERVICE_AUTO_RESTART);
/* Make sure we don't enter a busy loop of some kind. */
if (!ratelimit_test(&s->ratelimit)) {
......@@ -2520,7 +2520,7 @@ static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) {
break;
case SERVICE_FINAL_SIGKILL:
log_warning("%s still around after SIGKILL (2). Entering maintenance mode.", u->meta.id);
log_warning("%s still around after SIGKILL (2). Entering failed mode.", u->meta.id);
service_enter_dead(s, false, true);
break;
......@@ -2853,12 +2853,12 @@ int service_set_socket_fd(Service *s, int fd, Socket *sock) {
return 0;
}
static void service_reset_maintenance(Unit *u) {
static void service_reset_failed(Unit *u) {
Service *s = SERVICE(u);
assert(s);
if (s->state == SERVICE_MAINTENANCE)
if (s->state == SERVICE_FAILED)
service_set_state(s, SERVICE_DEAD);
s->failure = false;
......@@ -2878,7 +2878,7 @@ static const char* const service_state_table[_SERVICE_STATE_MAX] = {
[SERVICE_STOP_POST] = "stop-post",
[SERVICE_FINAL_SIGTERM] = "final-sigterm",
[SERVICE_FINAL_SIGKILL] = "final-sigkill",
[SERVICE_MAINTENANCE] = "maintenance",
[SERVICE_FAILED] = "failed",
[SERVICE_AUTO_RESTART] = "auto-restart",
};
......@@ -2951,7 +2951,7 @@ const UnitVTable service_vtable = {
.sigchld_event = service_sigchld_event,
.timer_event = service_timer_event,
.reset_maintenance = service_reset_maintenance,
.reset_failed = service_reset_failed,
.cgroup_notify_empty = service_cgroup_notify_event,
.notify_message = service_notify_message,
......
......@@ -41,7 +41,7 @@ typedef enum ServiceState {
SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, /* In case the STOP_POST executable hangs, we shoot that down, too */
SERVICE_FINAL_SIGKILL,
SERVICE_MAINTENANCE,
SERVICE_FAILED,
SERVICE_AUTO_RESTART,
_SERVICE_STATE_MAX,
_SERVICE_STATE_INVALID = -1
......
......@@ -54,7 +54,7 @@ static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
[SOCKET_STOP_POST] = UNIT_DEACTIVATING,
[SOCKET_FINAL_SIGTERM] = UNIT_DEACTIVATING,
[SOCKET_FINAL_SIGKILL] = UNIT_DEACTIVATING,
[SOCKET_MAINTENANCE] = UNIT_MAINTENANCE
[SOCKET_FAILED] = UNIT_FAILED
};
static void socket_init(Unit *u) {
......@@ -964,7 +964,7 @@ static void socket_enter_dead(Socket *s, bool success) {
if (!success)
s->failure = true;
socket_set_state(s, s->failure ? SOCKET_MAINTENANCE : SOCKET_DEAD);
socket_set_state(s, s->failure ? SOCKET_FAILED : SOCKET_DEAD);
}
static void socket_enter_signal(Socket *s, SocketState state, bool success);
......@@ -1295,12 +1295,12 @@ static int socket_start(Unit *u) {
/* If the service is alredy actvie we cannot start the
* socket */
if (s->service->state != SERVICE_DEAD &&
s->service->state != SERVICE_MAINTENANCE &&
s->service->state != SERVICE_FAILED &&
s->service->state != SERVICE_AUTO_RESTART)
return -EBUSY;
}
assert(s->state == SOCKET_DEAD || s->state == SOCKET_MAINTENANCE);
assert(s->state == SOCKET_DEAD || s->state == SOCKET_FAILED);
s->failure = false;
socket_enter_start_pre(s);
......@@ -1650,7 +1650,7 @@ static void socket_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
break;
case SOCKET_FINAL_SIGKILL:
log_warning("%s still around after SIGKILL (2). Entering maintenance mode.", u->meta.id);
log_warning("%s still around after SIGKILL (2). Entering failed mode.", u->meta.id);
socket_enter_dead(s, false);
break;
......@@ -1719,12 +1719,12 @@ void socket_connection_unref(Socket *s) {
log_debug("%s: One connection closed, %u left.", s->meta.id, s->n_connections);
}
static void socket_reset_maintenance(Unit *u) {
static void socket_reset_failed(Unit *u) {
Socket *s = SOCKET(u);
assert(s);
if (s->state == SOCKET_MAINTENANCE)
if (s->state == SOCKET_FAILED)
socket_set_state(s, SOCKET_DEAD);
s->failure = false;
......@@ -1742,7 +1742,7 @@ static const char* const socket_state_table[_SOCKET_STATE_MAX] = {
[SOCKET_STOP_POST] = "stop-post",
[SOCKET_FINAL_SIGTERM] = "final-sigterm",
[SOCKET_FINAL_SIGKILL] = "final-sigkill",
[SOCKET_MAINTENANCE] = "maintenance"
[SOCKET_FAILED] = "failed"
};
DEFINE_STRING_TABLE_LOOKUP(socket_state, SocketState);
......@@ -1782,7 +1782,7 @@ const UnitVTable socket_vtable = {
.sigchld_event = socket_sigchld_event,
.timer_event = socket_timer_event,
.reset_maintenance = socket_reset_maintenance,
.reset_failed = socket_reset_failed,
.bus_interface = "org.freedesktop.systemd1.Socket",
.bus_message_handler = bus_socket_message_handler,
......
......@@ -41,7 +41,7 @@ typedef enum SocketState {
SOCKET_STOP_POST,
SOCKET_FINAL_SIGTERM,
SOCKET_FINAL_SIGKILL,
SOCKET_MAINTENANCE,
SOCKET_FAILED,
_SOCKET_STATE_MAX,
_SOCKET_STATE_INVALID = -1
} SocketState;
......
......@@ -38,7 +38,7 @@
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
[SWAP_ACTIVE] = UNIT_ACTIVE,
[SWAP_MAINTENANCE] = UNIT_MAINTENANCE
[SWAP_FAILED] = UNIT_FAILED
};
static void swap_init(Unit *u) {
......@@ -428,7 +428,7 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) {
static void swap_enter_dead(Swap *s, bool success) {
assert(s);
swap_set_state(s, success ? SWAP_DEAD : SWAP_MAINTENANCE);
swap_set_state(s, success ? SWAP_DEAD : SWAP_FAILED);
}
static int swap_start(Unit *u) {
......@@ -437,7 +437,7 @@ static int swap_start(Unit *u) {
int r;
assert(s);
assert(s->state == SWAP_DEAD || s->state == SWAP_MAINTENANCE);
assert(s->state == SWAP_DEAD || s->state == SWAP_FAILED);
if (s->from_fragment)
priority = s->parameters_fragment.priority;
......@@ -584,19 +584,19 @@ static int swap_enumerate(Manager *m) {
return r;
}
static void swap_reset_maintenance(Unit *u) {
static void swap_reset_failed(Unit *u) {
Swap *s = SWAP(u);
assert(s);
if (s->state == SWAP_MAINTENANCE)
if (s->state == SWAP_FAILED)
swap_set_state(s, SWAP_DEAD);
}
static const char* const swap_state_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = "dead",
[SWAP_ACTIVE] = "active",
[SWAP_MAINTENANCE] = "maintenance"
[SWAP_FAILED] = "failed"
};
DEFINE_STRING_TABLE_LOOKUP(swap_state, SwapState);
......@@ -631,7 +631,7 @@ const UnitVTable swap_vtable = {
.bus_message_handler = bus_swap_message_handler,
.bus_invalidating_properties = bus_swap_invalidating_properties,
.reset_maintenance = swap_reset_maintenance,
.reset_failed = swap_reset_failed,
.enumerate = swap_enumerate,
.shutdown = swap_shutdown
......
......@@ -30,7 +30,7 @@ typedef struct Swap Swap;
typedef enum SwapState {
SWAP_DEAD,
SWAP_ACTIVE,
SWAP_MAINTENANCE,
SWAP_FAILED,
_SWAP_STATE_MAX,
_SWAP_STATE_INVALID = -1
} SwapState;
......
......@@ -327,7 +327,7 @@ static int list_units(DBusConnection *bus, char **args, unsigned n) {
int a = 0, b = 0;
const char *on, *off;
if (streq(u->active_state, "maintenance")) {
if (streq(u->active_state, "failed")) {
on = ansi_highlight(true);
off = ansi_highlight(false);
} else
......@@ -1557,7 +1557,7 @@ static void print_status_info(UnitStatusInfo *i) {
ss = streq_ptr(i->active_state, i->sub_state) ? NULL : i->sub_state;
if (streq_ptr(i->active_state, "maintenance")) {
if (streq_ptr(i->active_state, "failed")) {
on = ansi_highlight(true);
off = ansi_highlight(false);
} else if (streq_ptr(i->active_state, "active") || streq_ptr(i->active_state, "reloading")) {
......@@ -1581,7 +1581,7 @@ static void print_status_info(UnitStatusInfo *i) {
timestamp = (streq_ptr(i->active_state, "active") ||
streq_ptr(i->active_state, "reloading")) ? i->active_enter_timestamp :
(streq_ptr(i->active_state, "inactive") ||
streq_ptr(i->active_state, "maintenance")) ? i->inactive_enter_timestamp :
streq_ptr(i->active_state, "failed")) ? i->inactive_enter_timestamp :
streq_ptr(i->active_state, "activating") ? i->inactive_exit_timestamp :
i->active_exit_timestamp;
......@@ -2864,7 +2864,7 @@ static int daemon_reload(DBusConnection *bus, char **args, unsigned n) {
streq(args[0], "clear-jobs") ||
streq(args[0], "cancel") ? "ClearJobs" :
streq(args[0], "daemon-reexec") ? "Reexecute" :
streq(args[0], "reset-maintenance") ? "ResetMaintenance" :
streq(args[0], "reset-failed") ? "ResetFailed" :
streq(args[0], "daemon-exit") ? "Exit" :
"Reload";
}
......@@ -2906,7 +2906,7 @@ finish:
return r;
}
static int reset_maintenance(DBusConnection *bus, char **args, unsigned n) {
static int reset_failed(DBusConnection *bus, char **args, unsigned n) {
DBusMessage *m = NULL, *reply = NULL;
unsigned i;
int r;
......@@ -2924,7 +2924,7 @@ static int reset_maintenance(DBusConnection *bus, char **args, unsigned n) {
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
"ResetMaintenanceUnit"))) {
"ResetFailedUnit"))) {
log_error("Could not allocate message.");
r = -ENOMEM;
goto finish;
......@@ -3834,8 +3834,8 @@ static int systemctl_help(void) {
" status [NAME...|PID...] Show runtime status of one or more units\n"
" show [NAME...|JOB...] Show properties of one or more\n"
" units/jobs or the manager\n"
" reset-maintenance [NAME...] Reset maintenance state for all, one,\n"
" or more units\n"
" reset-failed [NAME...] Reset failed state for all, one, or more\n"
" units\n"
" enable [NAME...] Enable one or more unit files\n"
" disable [NAME...] Disable one or more unit files\n"
" is-enabled [NAME...] Check whether unit files are enabled\n"
......@@ -4677,7 +4677,7 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
{ "default", EQUAL, 1, start_special },
{ "rescue", EQUAL, 1, start_special },
{ "emergency", EQUAL, 1, start_special },
{ "reset-maintenance", MORE, 1, reset_maintenance },
{ "reset-failed", MORE, 1, reset_failed },
{ "enable", MORE, 2, enable_unit },
{ "disable", MORE, 2, enable_unit },
{ "is-enabled", MORE, 2, enable_unit }
......
......@@ -62,7 +62,7 @@ public interface Manager : DBus.Object {
public abstract ObjectPath reload_or_restart_unit(string name, string mode = "replace") throws DBus.Error;
public abstract ObjectPath reload_or_try_restart_unit(string name, string mode = "replace") throws DBus.Error;
public abstract void reset_maintenance_unit(string name = "") throws DBus.Error;
public abstract void reset_failed_unit(string name = "") throws DBus.Error;
public abstract void clear_jobs() throws DBus.Error;
......@@ -140,7 +140,7 @@ public interface Unit : DBus.Object {
public abstract ObjectPath reload_or_restart(string mode = "replace") throws DBus.Error;
public abstract ObjectPath reload_or_try_restart(string mode = "replace") throws DBus.Error;
public abstract void reset_maintenance() throws DBus.Error;
public abstract void reset_failed() throws DBus.Error;
}
[DBus (name = "org.freedesktop.systemd1.Job")]
......