summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-03 19:31:53 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-05 19:00:36 -0500
commit90b2de37b80603168f4e9c9c81cff7eea4efa21a (patch)
treec94767aff1f78fe52fc33ba697d265dcccb4786c /src/machine
parent284c0b917697fb0271381f331ffee28403278e72 (diff)
Update some message formats
Use PID_FMT/USEC_FMT/... in more places. Also update logind error messages to print the full path to a file that failed. This should make debugging easier for people who do not know off the top of their head where logind stores it state.
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c
index cf3ef15456..0791ba8a9a 100644
--- a/src/machine/machine.c
+++ b/src/machine/machine.c
@@ -139,17 +139,17 @@ int machine_save(Machine *m) {
fprintf(f, "ID=" SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(m->id));
if (m->leader != 0)
- fprintf(f, "LEADER=%lu\n", (unsigned long) m->leader);
+ fprintf(f, "LEADER="PID_FMT"\n", m->leader);
if (m->class != _MACHINE_CLASS_INVALID)
fprintf(f, "CLASS=%s\n", machine_class_to_string(m->class));
if (dual_timestamp_is_set(&m->timestamp))
fprintf(f,
- "REALTIME=%llu\n"
- "MONOTONIC=%llu\n",
- (unsigned long long) m->timestamp.realtime,
- (unsigned long long) m->timestamp.monotonic);
+ "REALTIME="USEC_FMT"\n"
+ "MONOTONIC="USEC_FMT"\n",
+ m->timestamp.realtime,
+ m->timestamp.monotonic);
fflush(f);
@@ -161,7 +161,7 @@ int machine_save(Machine *m) {
finish:
if (r < 0)
- log_error("Failed to save machine data for %s: %s", m->name, strerror(-r));
+ log_error("Failed to save machine data %s: %s", m->state_file, strerror(-r));
return r;
}