X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=e33824be4a0a704c57f263b313aa80e92c3485c2;hb=c73d180dc4bbd87c945a524b42b672af2ffe2609;hp=e30e6865ac646dd42bf46efd3f555db222af1c25;hpb=a62e83b48cda6a709a796a361abaf6b129650b3c;p=elogind.git diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index e30e6865a..e33824be4 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -365,7 +365,7 @@ static int output_short( fprintf(f, " %.*s", (int) comm_len, comm); n += comm_len + 1; } else - fputc(' ', f); + fputs(" unknown", f); if (pid && shall_print(pid, pid_len, flags)) { fprintf(f, "[%.*s]", (int) pid_len, pid); @@ -447,7 +447,9 @@ static int output_verbose( } fprintf(f, "%s [%s]\n", - format_timestamp_us(ts, sizeof(ts), realtime, flags & OUTPUT_UTC), + flags & OUTPUT_UTC ? + format_timestamp_us_utc(ts, sizeof(ts), realtime) : + format_timestamp_us(ts, sizeof(ts), realtime), cursor); JOURNAL_FOREACH_DATA_RETVAL(j, data, length, r) { @@ -1153,7 +1155,7 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) { assert(machine); assert(boot_id); - if (!filename_is_safe(machine)) + if (!machine_name_is_valid(machine)) return -EINVAL; r = container_get_leader(machine, &pid);