From: Daniel Vetter Subject: [PATCH] lib/aux: Print progress output with igt_info Date: Tue, 30 Sep 2014 18:45:52 +0200 Message-ID: <1412095552-27429-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 348144A350 for ; Tue, 30 Sep 2014 09:46:02 -0700 (PDT) Received: by mail-wi0-f176.google.com with SMTP id hi2so307165wib.3 for ; Tue, 30 Sep 2014 09:46:01 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Intel Graphics Development Cc: Daniel Vetter , Thomas Wood , Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org With the structured logging it makes more sense to tune this down a bit. Also, this way it is consistent with Thomas Wood's new activity indicator helper. Spotted while discussing Thomas' patch with him. Cc: Thomas Wood Signed-off-by: Daniel Vetter --- lib/igt_aux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/igt_aux.c b/lib/igt_aux.c index 180c2742ab10..f6fef5875c69 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -229,11 +229,11 @@ void igt_progress(const char *header, uint64_t i, uint64_t total) { int divider = 200; - if (!isatty(fileno(stderr))) + if (!isatty(STDOUT_FILENO)) return; if (i+1 >= total) { - igt_warn("\r%s100%%\n", header); + igt_info("\r%s100%%\n", header); return; } @@ -242,7 +242,7 @@ void igt_progress(const char *header, uint64_t i, uint64_t total) /* only bother updating about every 0.5% */ if (i % (total / divider) == 0) - igt_warn("\r%s%3llu%%", header, + igt_info("\r%s%3llu%%", header, (long long unsigned)i * 100 / total); } -- 2.1.1