From 1fa2f38f0f011010bf57522b42fcc168856a7003 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 20 Jan 2015 22:22:15 -0500 Subject: Assorted format fixes Types used for pids and uids in various interfaces are unpredictable. Too bad. --- src/login/logind-seat.c | 2 +- src/login/pam_systemd.c | 4 ++-- src/login/test-inhibit.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/login') diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 8eb5e3ee0a..197138c4e0 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -201,7 +201,7 @@ int seat_preallocate_vts(Seat *s) { q = vt_allocate(i); if (q < 0) { - log_error_errno(q, "Failed to preallocate VT %i: %m", i); + log_error_errno(q, "Failed to preallocate VT %u: %m", i); r = q; } } diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index d5b29c8af4..d7a708fd0a 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -344,7 +344,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( } if (seat && !streq(seat, "seat0") && vtnr != 0) { - pam_syslog(handle, LOG_DEBUG, "Ignoring vtnr %d for %s which is not seat0", vtnr, seat); + pam_syslog(handle, LOG_DEBUG, "Ignoring vtnr %"PRIu32" for %s which is not seat0", vtnr, seat); vtnr = 0; } @@ -367,7 +367,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( if (debug) pam_syslog(handle, LOG_DEBUG, "Asking logind to create session: " - "uid=%u pid=%u service=%s type=%s class=%s desktop=%s seat=%s vtnr=%u tty=%s display=%s remote=%s remote_user=%s remote_host=%s", + "uid="UID_FMT" pid="PID_FMT" service=%s type=%s class=%s desktop=%s seat=%s vtnr=%"PRIu32" tty=%s display=%s remote=%s remote_user=%s remote_host=%s", pw->pw_uid, getpid(), strempty(service), type, class, strempty(desktop), diff --git a/src/login/test-inhibit.c b/src/login/test-inhibit.c index 5379ffcaa1..274687d20f 100644 --- a/src/login/test-inhibit.c +++ b/src/login/test-inhibit.c @@ -73,7 +73,7 @@ static void print_inhibitors(sd_bus *bus) { assert_se(r >= 0); while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) { - printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<"UID_FMT"> pid=<"PID_FMT">\n", + printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<%"PRIu32"> pid=<%"PRIu32">\n", what, who, why, mode, uid, pid); n++; -- cgit v1.2.3-54-g00ecf