diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/kmod-setup.c | 9 | ||||
-rw-r--r-- | src/core/loopback-setup.c | 2 | ||||
-rw-r--r-- | src/core/service.c | 9 | ||||
-rw-r--r-- | src/core/umount.c | 2 | ||||
-rw-r--r-- | src/core/unit.c | 11 |
5 files changed, 28 insertions, 5 deletions
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c index cf543c81a3..f5584b6b14 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -117,9 +117,12 @@ int kmod_setup(void) { log_info("Inserted module '%s'", kmod_module_get_name(mod)); else if (r == KMOD_PROBE_APPLY_BLACKLIST) log_info("Module '%s' is blacklisted", kmod_module_get_name(mod)); - else - log_full((kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOENT)) ? LOG_ERR : LOG_DEBUG, - "Failed to insert module '%s'", kmod_module_get_name(mod)); + else { + bool print_warning = kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOSYS); + + log_full_errno(print_warning ? LOG_WARNING : LOG_DEBUG, r, + "Failed to insert module '%s': %m", kmod_module_get_name(mod)); + } kmod_module_unref(mod); } diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c index 63b15c1200..938f3ab068 100644 --- a/src/core/loopback-setup.c +++ b/src/core/loopback-setup.c @@ -70,7 +70,7 @@ int loopback_setup(void) { _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL; int r; - r = sd_rtnl_open(&rtnl, 0); + r = sd_rtnl_open(&rtnl); if (r < 0) return r; diff --git a/src/core/service.c b/src/core/service.c index c7e65772ea..71252e29e2 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2008,6 +2008,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) { unit_serialize_item_format(u, f, "main-pid", PID_FMT, s->main_pid); unit_serialize_item(u, f, "main-pid-known", yes_no(s->main_pid_known)); + unit_serialize_item(u, f, "bus-name-good", yes_no(s->bus_name_good)); if (s->status_text) { _cleanup_free_ char *c = NULL; @@ -2131,6 +2132,14 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, log_unit_debug(u, "Failed to parse main-pid-known value: %s", value); else s->main_pid_known = b; + } else if (streq(key, "bus-name-good")) { + int b; + + b = parse_boolean(value); + if (b < 0) + log_unit_debug(u, "Failed to parse bus-name-good value: %s", value); + else + s->bus_name_good = b; } else if (streq(key, "status-text")) { char *t; diff --git a/src/core/umount.c b/src/core/umount.c index bee267a5ad..d59b5d0ffb 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -385,7 +385,7 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e * alias read-only we hence should be * relatively safe regarding keeping the fs we * can otherwise not see dirty. */ - mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, NULL); + (void) mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, NULL); } /* Skip / and /usr since we cannot unmount that diff --git a/src/core/unit.c b/src/core/unit.c index e380276d49..7bb2afc9f2 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2596,6 +2596,7 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) { if (u->cgroup_path) unit_serialize_item(u, f, "cgroup", u->cgroup_path); + unit_serialize_item(u, f, "cgroup-realized", yes_no(u->cgroup_realized)); if (serialize_jobs) { if (u->job) { @@ -2806,6 +2807,16 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { log_unit_debug_errno(u, r, "Failed to set cgroup path %s, ignoring: %m", v); continue; + } else if (streq(l, "cgroup-realized")) { + int b; + + b = parse_boolean(v); + if (b < 0) + log_unit_debug(u, "Failed to parse cgroup-realized bool %s, ignoring.", v); + else + u->cgroup_realized = b; + + continue; } if (unit_can_serialize(u)) { |