generic-poky/meta/recipes-kernel/powertop/powertop-1.13/stub_out_the_ncurses_calls_...

34 lines
1.3 KiB
Diff
Raw Normal View History

recpies: add Upstream-Status for multiple recipes' patches tcf-agent: update its patch's Upstream-Status screen: update its patch's Upstream-Status which (GPLv2): update its patch's Upstream-Status gnome-vfs: update its patch's Upstream-Status libart-lgpl: update its patch's Upstream-Status librsvg: update its patch's Upstream-Status fontconfig: update its patch's Upstream-Status freetype: update its patch's Upstream-Status libxsettings-client: update its patch's Upstream-Status libxcb: update its patch's Upstream-Status libx11: update its patch's Upstream-Status - remove 2 unused xim.patch. libx11-trim: update its patch's Upstream-Status libxcalibrate: update its patch's Upstream-Status libxcomposite: update its patch's Upstream-Status libxfont: update its patch's Upstream-Status xtrans: update its patch's Upstream-Status - remove abstract_socket_fix.patch as it's not used at all for long. calibrateproto: update its patch's Upstream-Status latencytop: update its patch's Upstream-Status powertop: update its patch's Upstream-Status settings-daemon: update its patch's Upstream-Status gnome-settings-daemon: update its patch's Upstream-Status libxklavier: update its patch's Upstream-Status liblbxutil: update its patch's Upstream-Status oprofile: update its patch's Upstream-Status and remove an unused patch - delete xml_callgraph_details.patch as it's not used at all. (From OE-Core rev: 94991fb73586887bfc740eacf190032dfb206a65) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-11 03:01:38 +00:00
Upstream-Status: Inappropriate [this patch is 1.13 specific and 2.0 will be coming.]
Running PowerTop in Poky in dump mode (with --dump) always ends with a
segmentation fault.
The cause is: in dump mode, setup_windows() is not invoked so the
*_window variables, like cstate_window, are still NULL; later in
main() -> show_cstates(), the functions, like wrefresh(), will trigger
segfault.
After discussing in PowerTop mailling list, I think the right solution is
we should stub out the ncurses calls in dump mode.
(The patch was also sent to upstream PowerTop mailling list.)
Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
(this patch is licensed under GPLv2)
--- a/display.c
+++ b/display.c
@@ -44,6 +44,12 @@
static WINDOW *status_bar_window;
#define print(win, y, x, fmt, args...) do { if (dump) printf(fmt, ## args); else mvwprintw(win, y, x, fmt, ## args); } while (0)
+#define wattrset(win, c) do { if (!dump ) wattrset(win, c); } while (0)
+#define wbkgd(win, c) do { if (!dump ) wbkgd(win, c); } while (0)
+#define werase(win) do { if (!dump ) werase(win); } while (0)
+#define wrefresh(win) do { if (!dump ) wrefresh(win); } while (0)
+#define wattron(win, a) do { if (!dump ) wattron(win, a); } while (0)
+#define wattroff(win, a) do { if (!dump ) wattroff(win, a); } while (0)
char status_bar_slots[10][40];