From 90b2de37b80603168f4e9c9c81cff7eea4efa21a Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 3 Feb 2014 19:31:53 -0500 Subject: 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. --- src/machine/machine.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/machine') 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; } -- cgit v1.2.3-54-g00ecf