chiark / gitweb /
util: simplify proc_cmdline() to reuse get_process_cmdline()
[elogind.git] / src / shared / logs-show.c
index d5d9d090b5c41a30a943af1b2c8c18034c1ec06c..e33824be4a0a704c57f263b313aa80e92c3485c2 100644 (file)
@@ -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,6 +447,8 @@ static int output_verbose(
         }
 
         fprintf(f, "%s [%s]\n",
+                flags & OUTPUT_UTC ?
+                format_timestamp_us_utc(ts, sizeof(ts), realtime) :
                 format_timestamp_us(ts, sizeof(ts), realtime),
                 cursor);
 
@@ -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);