[systemd-commits] src/core

Kay Sievers kay at kemper.freedesktop.org
Tue Jan 28 03:05:37 PST 2014


 src/core/job.c     |    5 +----
 src/core/manager.c |   17 +++--------------
 2 files changed, 4 insertions(+), 18 deletions(-)

New commits:
commit 28c758de94bc8ba97b89d9dab3f517cf466978d0
Author: Kay Sievers <kay at vrfy.org>
Date:   Tue Jan 28 12:03:23 2014 +0100

    Revert "manager: print ephemeral information about running jobs' timeouts"
    
    This reverts commit 2cba2e03524ec0922ddc70f933e8a89b7d23b4ec.
    
    It breaks bootup with dracut, the transition to the real rootfs fails.

diff --git a/src/core/job.c b/src/core/job.c
index 93fa44a..1bcf496 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -864,14 +864,11 @@ static int job_dispatch_timer(sd_event_source *s, uint64_t monotonic, void *user
 int job_start_timer(Job *j) {
         int r;
 
-        if (j->timer_event_source)
+        if (j->unit->job_timeout <= 0 || j->timer_event_source)
                 return 0;
 
         j->begin_usec = now(CLOCK_MONOTONIC);
 
-        if (j->unit->job_timeout <= 0)
-                return 0;
-
         r = sd_event_add_monotonic(j->manager->event, j->begin_usec + j->unit->job_timeout, 0, job_dispatch_timer, j, &j->timer_event_source);
         if (r < 0)
                 return r;
diff --git a/src/core/manager.c b/src/core/manager.c
index edde109..f7f8fa6 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -153,8 +153,6 @@ static void manager_print_jobs_in_progress(Manager *m) {
         unsigned counter = 0, print_nr;
         char cylon[6 + CYLON_BUFFER_EXTRA + 1];
         unsigned cylon_pos;
-        char time[FORMAT_TIMESPAN_MAX], limit[FORMAT_TIMESPAN_MAX] = "no limit";
-        uint64_t x;
 
         assert(m);
 
@@ -176,23 +174,14 @@ static void manager_print_jobs_in_progress(Manager *m) {
                 cylon_pos = 14 - cylon_pos;
         draw_cylon(cylon, sizeof(cylon), 6, cylon_pos);
 
-        m->jobs_in_progress_iteration++;
-
         if (m->n_running_jobs > 1)
                 if (asprintf(&job_of_n, "(%u of %u) ", counter, m->n_running_jobs) < 0)
                         job_of_n = NULL;
 
-        format_timespan(time, sizeof(time), now(CLOCK_MONOTONIC) - j->begin_usec, 1*USEC_PER_SEC);
-        if (job_get_timeout(j, &x) > 0)
-                format_timespan(limit, sizeof(limit), x - j->begin_usec, 1*USEC_PER_SEC);
-
-        manager_status_printf(m, true, cylon,
-                              "%sA %s job is running for %s (%s / %s)",
-                              strempty(job_of_n),
-                              job_type_to_string(j->type),
-                              unit_description(j->unit),
-                              time, limit);
+        manager_status_printf(m, true, cylon, "%sA %s job is running for %s",
+                              strempty(job_of_n), job_type_to_string(j->type), unit_description(j->unit));
 
+        m->jobs_in_progress_iteration++;
 }
 
 static int manager_watch_idle_pipe(Manager *m) {



More information about the systemd-commits mailing list