chiark / gitweb /
systemctl: suppress duplicate newline if there's not log output in "systemctl status"
[elogind.git] / src / systemctl / systemctl.c
index 3cb10964fd22f504513c453d46e274d655efa5a7..21bf51bb3eb30617751f0d8afb5bcc54cd01cab7 100644 (file)
@@ -3226,7 +3226,6 @@ static void print_status_info(
         }
 
         if (i->id && arg_transport == BUS_TRANSPORT_LOCAL) {
         }
 
         if (i->id && arg_transport == BUS_TRANSPORT_LOCAL) {
-                printf("\n");
                 show_journal_by_unit(stdout,
                                      i->id,
                                      arg_output,
                 show_journal_by_unit(stdout,
                                      i->id,
                                      arg_output,
@@ -3234,7 +3233,7 @@ static void print_status_info(
                                      i->inactive_exit_timestamp_monotonic,
                                      arg_lines,
                                      getuid(),
                                      i->inactive_exit_timestamp_monotonic,
                                      arg_lines,
                                      getuid(),
-                                     flags,
+                                     flags | OUTPUT_BEGIN_NEWLINE,
                                      arg_scope == UNIT_FILE_SYSTEM,
                                      ellipsized);
         }
                                      arg_scope == UNIT_FILE_SYSTEM,
                                      ellipsized);
         }