mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-15 23:24:12 +03:00
manager: raise level of notices about failed deserialization
This is something that shouldn't happen. If it does, we want to know about it.
This commit is contained in:
parent
a462478539
commit
62c460c6e2
@ -2610,7 +2610,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
||||||
if (safe_atou32(val, &id) < 0)
|
if (safe_atou32(val, &id) < 0)
|
||||||
log_debug("Failed to parse current job id value %s", val);
|
log_notice("Failed to parse current job id value %s", val);
|
||||||
else
|
else
|
||||||
m->current_job_id = MAX(m->current_job_id, id);
|
m->current_job_id = MAX(m->current_job_id, id);
|
||||||
|
|
||||||
@ -2618,7 +2618,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
uint32_t n;
|
uint32_t n;
|
||||||
|
|
||||||
if (safe_atou32(val, &n) < 0)
|
if (safe_atou32(val, &n) < 0)
|
||||||
log_debug("Failed to parse installed jobs counter %s", val);
|
log_notice("Failed to parse installed jobs counter %s", val);
|
||||||
else
|
else
|
||||||
m->n_installed_jobs += n;
|
m->n_installed_jobs += n;
|
||||||
|
|
||||||
@ -2626,7 +2626,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
uint32_t n;
|
uint32_t n;
|
||||||
|
|
||||||
if (safe_atou32(val, &n) < 0)
|
if (safe_atou32(val, &n) < 0)
|
||||||
log_debug("Failed to parse failed jobs counter %s", val);
|
log_notice("Failed to parse failed jobs counter %s", val);
|
||||||
else
|
else
|
||||||
m->n_failed_jobs += n;
|
m->n_failed_jobs += n;
|
||||||
|
|
||||||
@ -2635,7 +2635,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
|
|
||||||
b = parse_boolean(val);
|
b = parse_boolean(val);
|
||||||
if (b < 0)
|
if (b < 0)
|
||||||
log_debug("Failed to parse taint /usr flag %s", val);
|
log_notice("Failed to parse taint /usr flag %s", val);
|
||||||
else
|
else
|
||||||
m->taint_usr = m->taint_usr || b;
|
m->taint_usr = m->taint_usr || b;
|
||||||
|
|
||||||
@ -2672,7 +2672,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (safe_atoi(val, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
|
if (safe_atoi(val, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
|
||||||
log_debug("Failed to parse notify fd: %s", val);
|
log_notice("Failed to parse notify fd: \"%s\"", val);
|
||||||
else {
|
else {
|
||||||
m->notify_event_source = sd_event_source_unref(m->notify_event_source);
|
m->notify_event_source = sd_event_source_unref(m->notify_event_source);
|
||||||
safe_close(m->notify_fd);
|
safe_close(m->notify_fd);
|
||||||
@ -2695,7 +2695,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (safe_atoi(val, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
|
if (safe_atoi(val, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
|
||||||
log_debug("Failed to parse cgroups agent fd: %s", val);
|
log_notice("Failed to parse cgroups agent fd: %s", val);
|
||||||
else {
|
else {
|
||||||
m->cgroups_agent_event_source = sd_event_source_unref(m->cgroups_agent_event_source);
|
m->cgroups_agent_event_source = sd_event_source_unref(m->cgroups_agent_event_source);
|
||||||
safe_close(m->cgroups_agent_fd);
|
safe_close(m->cgroups_agent_fd);
|
||||||
@ -2706,7 +2706,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
int fd0, fd1;
|
int fd0, fd1;
|
||||||
|
|
||||||
if (sscanf(val, "%i %i", &fd0, &fd1) != 2 || fd0 < 0 || fd1 < 0 || fd0 == fd1 || !fdset_contains(fds, fd0) || !fdset_contains(fds, fd1))
|
if (sscanf(val, "%i %i", &fd0, &fd1) != 2 || fd0 < 0 || fd1 < 0 || fd0 == fd1 || !fdset_contains(fds, fd0) || !fdset_contains(fds, fd1))
|
||||||
log_debug("Failed to parse user lookup fd: %s", val);
|
log_notice("Failed to parse user lookup fd: %s", val);
|
||||||
else {
|
else {
|
||||||
m->user_lookup_event_source = sd_event_source_unref(m->user_lookup_event_source);
|
m->user_lookup_event_source = sd_event_source_unref(m->user_lookup_event_source);
|
||||||
safe_close_pair(m->user_lookup_fds);
|
safe_close_pair(m->user_lookup_fds);
|
||||||
@ -2726,7 +2726,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||||||
log_oom();
|
log_oom();
|
||||||
|
|
||||||
} else if (!startswith(l, "kdbus-fd=")) /* ignore this one */
|
} else if (!startswith(l, "kdbus-fd=")) /* ignore this one */
|
||||||
log_debug("Unknown serialization item '%s'", l);
|
log_notice("Unknown serialization item '%s'", l);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user