diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-06-28 16:33:13 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-06-28 16:33:24 -0400 |
commit | f384c954c9fe3d3c6fce5ae66b67f2ddd947d098 (patch) | |
tree | a38541b8083a2304435e9a153d408bd7cd44116e /tools/perf/util/newt.c | |
parent | 9a15a07fe2175dc25cd928a354b3839f562ac8cc (diff) | |
parent | 5904b3b81d25166e5e39b9727645bb47937618e3 (diff) |
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.c | 15 |
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) | |||
43 | 43 | ||
44 | if (self != NULL) { | 44 | if (self != NULL) { |
45 | int cols; | 45 | int cols; |
46 | |||
47 | if (use_browser <= 0) | ||
48 | return self; | ||
46 | newtGetScreenSize(&cols, NULL); | 49 | newtGetScreenSize(&cols, NULL); |
47 | cols -= 4; | 50 | cols -= 4; |
48 | newtCenteredWindow(cols, 1, title); | 51 | newtCenteredWindow(cols, 1, title); |
@@ -67,14 +70,22 @@ out_free_self: | |||
67 | 70 | ||
68 | void ui_progress__update(struct ui_progress *self, u64 curr) | 71 | void ui_progress__update(struct ui_progress *self, u64 curr) |
69 | { | 72 | { |
73 | /* | ||
74 | * FIXME: We should have a per UI backend way of showing progress, | ||
75 | * stdio will just show a percentage as NN%, etc. | ||
76 | */ | ||
77 | if (use_browser <= 0) | ||
78 | return; | ||
70 | newtScaleSet(self->scale, curr); | 79 | newtScaleSet(self->scale, curr); |
71 | newtRefresh(); | 80 | newtRefresh(); |
72 | } | 81 | } |
73 | 82 | ||
74 | void ui_progress__delete(struct ui_progress *self) | 83 | void ui_progress__delete(struct ui_progress *self) |
75 | { | 84 | { |
76 | newtFormDestroy(self->form); | 85 | if (use_browser > 0) { |
77 | newtPopWindow(); | 86 | newtFormDestroy(self->form); |
87 | newtPopWindow(); | ||
88 | } | ||
78 | free(self); | 89 | free(self); |
79 | } | 90 | } |
80 | 91 | ||