X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=8edf4087c68f337ab76aed2c85f9d9a9dd0448e7;hb=4d40d39cdf127a83acf80cd0275e36b4a9a2a246;hp=72c9ad2eba1e9e52abf7a19af2c25741071df73e;hpb=de0671ee7fe465e108f62dcbbbe9366f81dd9e9a;p=elogind.git diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 72c9ad2eb..8edf4087c 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -301,8 +301,8 @@ static int output_short( } fprintf(f, "[%5llu.%06llu]", - t / USEC_PER_SEC, - t % USEC_PER_SEC); + (unsigned long long) (t / USEC_PER_SEC), + (unsigned long long) (t % USEC_PER_SEC)); n += 1 + 5 + 1 + 6 + 1; @@ -335,7 +335,7 @@ static int output_short( r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", localtime_r(&t, &tm)); if (r > 0) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - ".%06llu", x % USEC_PER_SEC); + ".%06llu", (unsigned long long) (x % USEC_PER_SEC)); } break; default: @@ -1158,7 +1158,7 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) { if (r < 0) return r; - r = namespace_open(pid, &pidnsfd, &mntnsfd, &rootfd); + r = namespace_open(pid, &pidnsfd, &mntnsfd, NULL, &rootfd); if (r < 0) return r; @@ -1174,7 +1174,7 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) { pair[0] = safe_close(pair[0]); - r = namespace_enter(pidnsfd, mntnsfd, rootfd); + r = namespace_enter(pidnsfd, mntnsfd, -1, rootfd); if (r < 0) _exit(EXIT_FAILURE);