chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ask-password-tty: properly handle SIGINT/SIGTERM
[elogind.git]
/
src
/
manager.c
diff --git
a/src/manager.c
b/src/manager.c
index fb2656eb3ddf30c141e90e167c498c191b407a44..e90757eacd76873a4e844cef11762463f19816aa 100644
(file)
--- a/
src/manager.c
+++ b/
src/manager.c
@@
-2490,15
+2490,17
@@
int manager_serialize(Manager *m, FILE *f, FDSet *fds) {
assert(f);
assert(fds);
assert(f);
assert(fds);
- fprintf(f, "startup-timestamp=%llu %llu\n
\n
",
+ fprintf(f, "startup-timestamp=%llu %llu\n",
(unsigned long long) m->startup_timestamp.realtime,
(unsigned long long) m->startup_timestamp.monotonic);
if (dual_timestamp_is_set(&m->finish_timestamp))
(unsigned long long) m->startup_timestamp.realtime,
(unsigned long long) m->startup_timestamp.monotonic);
if (dual_timestamp_is_set(&m->finish_timestamp))
- fprintf(f, "finish-timestamp=%llu %llu\n
\n
",
+ fprintf(f, "finish-timestamp=%llu %llu\n",
(unsigned long long) m->finish_timestamp.realtime,
(unsigned long long) m->finish_timestamp.monotonic);
(unsigned long long) m->finish_timestamp.realtime,
(unsigned long long) m->finish_timestamp.monotonic);
+ fputc('\n', f);
+
HASHMAP_FOREACH_KEY(u, t, m->units, i) {
if (u->meta.id != t)
continue;
HASHMAP_FOREACH_KEY(u, t, m->units, i) {
if (u->meta.id != t)
continue;
@@
-2560,8
+2562,8
@@
int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
} else if (startswith(l, "finish-timestamp=")) {
unsigned long long a, b;
} else if (startswith(l, "finish-timestamp=")) {
unsigned long long a, b;
- if (sscanf(l+1
8
, "%lli %llu", &a, &b) != 2)
- log_debug("Failed to parse finish timestamp value %s", l+1
8
);
+ if (sscanf(l+1
7
, "%lli %llu", &a, &b) != 2)
+ log_debug("Failed to parse finish timestamp value %s", l+1
7
);
else {
m->finish_timestamp.realtime = a;
m->finish_timestamp.monotonic = b;
else {
m->finish_timestamp.realtime = a;
m->finish_timestamp.monotonic = b;