chiark / gitweb /
systemctl: suppress duplicate newline if there's not log output in "systemctl status"
[elogind.git] / src / systemctl / systemctl.c
index 3cb1096..21bf51b 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);
         }