summaryrefslogtreecommitdiffstats
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-30 23:22:26 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-03 01:45:47 +0100
commitccd06097c79218f7d5ea4c21721bbcbc7c467dca (patch)
tree168bee7d15161c2c1cba3926447162b84c761898 /src/core/mount.c
parentMove bus path definitions to def.h (diff)
downloadsystemd-ccd06097c79218f7d5ea4c21721bbcbc7c467dca.tar.xz
systemd-ccd06097c79218f7d5ea4c21721bbcbc7c467dca.zip
Use format patterns for usec_t, pid_t, nsec_t, usec_t
It is nicer to predefine patterns using configure time check instead of using casts everywhere. Since we do not need to use any flags, include "%" in the format instead of excluding it like PRI* macros.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 09efa1b6e0..41185c0c1d 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -750,8 +750,8 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
if (m->control_pid > 0)
fprintf(f,
- "%sControl PID: %lu\n",
- prefix, (unsigned long) m->control_pid);
+ "%sControl PID: "PID_FMT"\n",
+ prefix, m->control_pid);
exec_context_dump(&m->exec_context, f, prefix);
kill_context_dump(&m->kill_context, f, prefix);
@@ -1093,7 +1093,7 @@ static int mount_serialize(Unit *u, FILE *f, FDSet *fds) {
unit_serialize_item(u, f, "reload-result", mount_result_to_string(m->reload_result));
if (m->control_pid > 0)
- unit_serialize_item_format(u, f, "control-pid", "%lu", (unsigned long) m->control_pid);
+ unit_serialize_item_format(u, f, "control-pid", PID_FMT, m->control_pid);
if (m->control_command_id >= 0)
unit_serialize_item(u, f, "control-command", mount_exec_command_to_string(m->control_command_id));