chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udev: timeout - warn after a third of the timeout before killing
[elogind.git]
/
src
/
core
/
manager.c
diff --git
a/src/core/manager.c
b/src/core/manager.c
index 7639aeef19ca54db631b7f5b6e3aa5dfe9b1dea6..095111e8c656f93b0ea5fdd876e8bfb1b0a641e2 100644
(file)
--- a/
src/core/manager.c
+++ b/
src/core/manager.c
@@
-896,7
+896,7
@@
static int manager_coldplug(Manager *m) {
static void manager_build_unit_path_cache(Manager *m) {
char **i;
static void manager_build_unit_path_cache(Manager *m) {
char **i;
- _cleanup_
free
_ DIR *d = NULL;
+ _cleanup_
closedir
_ DIR *d = NULL;
int r;
assert(m);
int r;
assert(m);
@@
-2837,7
+2837,7
@@
static bool manager_get_show_status(Manager *m) {
if (m->no_console_output)
return false;
if (m->no_console_output)
return false;
- if (!IN_SET(manager_state(m), MANAGER_STARTING, MANAGER_STOPPING))
+ if (!IN_SET(manager_state(m), MANAGER_
INITIALIZING, MANAGER_
STARTING, MANAGER_STOPPING))
return false;
if (m->show_status > 0)
return false;
if (m->show_status > 0)
@@
-2928,8
+2928,14
@@
ManagerState manager_state(Manager *m) {
assert(m);
/* Did we ever finish booting? If not then we are still starting up */
assert(m);
/* Did we ever finish booting? If not then we are still starting up */
- if (!dual_timestamp_is_set(&m->finish_timestamp))
+ if (!dual_timestamp_is_set(&m->finish_timestamp)) {
+
+ u = manager_get_unit(m, SPECIAL_BASIC_TARGET);
+ if (!u || !UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u)))
+ return MANAGER_INITIALIZING;
+
return MANAGER_STARTING;
return MANAGER_STARTING;
+ }
/* Is the special shutdown target queued? If so, we are in shutdown state */
u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET);
/* Is the special shutdown target queued? If so, we are in shutdown state */
u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET);
@@
-2955,6
+2961,7
@@
ManagerState manager_state(Manager *m) {
}
static const char *const manager_state_table[_MANAGER_STATE_MAX] = {
}
static const char *const manager_state_table[_MANAGER_STATE_MAX] = {
+ [MANAGER_INITIALIZING] = "initializing",
[MANAGER_STARTING] = "starting",
[MANAGER_RUNNING] = "running",
[MANAGER_DEGRADED] = "degraded",
[MANAGER_STARTING] = "starting",
[MANAGER_RUNNING] = "running",
[MANAGER_DEGRADED] = "degraded",