diff --git a/[refs] b/[refs] index 6e6f6601a89d..fefeaf480689 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a8fb2608053547bc3152ea61a5ec7cdfce5d942c +refs/heads/master: 174787cb5144e5a45141ec7cb9d95ea29bbe22bb diff --git a/trunk/tools/perf/util/newt.c b/trunk/tools/perf/util/newt.c index cf182ca132fe..7537ca15900b 100644 --- a/trunk/tools/perf/util/newt.c +++ b/trunk/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 @@ struct ui_progress *ui_progress__new(const char *title, u64 total) 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); }