summaryrefslogtreecommitdiff
path: root/tools/perf/util/newt.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-06-29 00:33:13 +0400
committerThomas Gleixner <tglx@linutronix.de>2010-06-29 00:33:24 +0400
commitf384c954c9fe3d3c6fce5ae66b67f2ddd947d098 (patch)
treea38541b8083a2304435e9a153d408bd7cd44116e /tools/perf/util/newt.c
parent9a15a07fe2175dc25cd928a354b3839f562ac8cc (diff)
parent5904b3b81d25166e5e39b9727645bb47937618e3 (diff)
downloadlinux-f384c954c9fe3d3c6fce5ae66b67f2ddd947d098.tar.xz
Merge branch 'linus' into perf/core
Reason: Further changes conflict with upstream fixes Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'tools/perf/util/newt.c')
-rw-r--r--tools/perf/util/newt.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 7bdbfd3e24d2..89c52fc9b22e 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -43,6 +43,9 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)
if (self != NULL) {
int cols;
+
+ if (use_browser <= 0)
+ return self;
newtGetScreenSize(&cols, NULL);
cols -= 4;
newtCenteredWindow(cols, 1, title);
@@ -67,14 +70,22 @@ out_free_self:
void ui_progress__update(struct ui_progress *self, u64 curr)
{
+ /*
+ * FIXME: We should have a per UI backend way of showing progress,
+ * stdio will just show a percentage as NN%, etc.
+ */
+ if (use_browser <= 0)
+ return;
newtScaleSet(self->scale, curr);
newtRefresh();
}
void ui_progress__delete(struct ui_progress *self)
{
- newtFormDestroy(self->form);
- newtPopWindow();
+ if (use_browser > 0) {
+ newtFormDestroy(self->form);
+ newtPopWindow();
+ }
free(self);
}