summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-26 15:26:21 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-26 21:29:14 +0200
commit1649ef0d1f5c0e4f995a437bd24f1574a8b5100f (patch)
tree50ecbd5332de79a325e5338c166c9c8a07ee7a8e /lib/igt_aux.c
parent71ac5de5a4473d20fb11cb454f62d8e5c90f020c (diff)
lib/igt_* Use igt macros in igt libaries
Except in igt_core since that would lead to some hilarious recursions. v2: Don't fflush any more, spotted by Chris. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r--lib/igt_aux.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 3357f1f0..5ddc8b61 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -233,7 +233,7 @@ void igt_progress(const char *header, uint64_t i, uint64_t total)
return;
if (i+1 >= total) {
- fprintf(stderr, "\r%s100%%\n", header);
+ igt_warn("\r%s100%%\n", header);
return;
}
@@ -241,10 +241,9 @@ void igt_progress(const char *header, uint64_t i, uint64_t total)
divider = 1;
/* only bother updating about every 0.5% */
- if (i % (total / divider) == 0 || i+1 >= total) {
- fprintf(stderr, "\r%s%3llu%%", header,
- (long long unsigned) i * 100 / total);
- }
+ igt_warn_on_f(i % (total / divider) == 0 || i + 1 >= total,
+ "\r%s%3llu%%", header,
+ (long long unsigned)i * 100 / total);
}
/* mappable aperture trasher helper */