summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/powertop
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-10-27 11:07:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-28 14:16:31 +0100
commitdaa2b49a23a88af5a7652031d4e93ea4ff8217a4 (patch)
tree865bbd8b753b973cdb89e1a1ecc44592e58b233b /meta/recipes-kernel/powertop
parentb3d1a8ac9b496c2faca39fe35e947445adb3055a (diff)
downloadpoky-daa2b49a23a88af5a7652031d4e93ea4ff8217a4.tar.gz
powertop: address ncurses 6.3 compatibility
(From OE-Core rev: 0b6e9db98b69d931f965d32a57ca67afea8f4f11) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/powertop')
-rw-r--r--meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch52
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.14.bb5
2 files changed, 55 insertions, 2 deletions
diff --git a/meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch b/meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch
new file mode 100644
index 0000000000..84b05ac971
--- /dev/null
+++ b/meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch
@@ -0,0 +1,52 @@
1From 76d3f0851520bc8488e432f423941f1e72cc7405 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 25 Oct 2021 17:47:23 +0200
4Subject: [PATCH] src: fix compatibility with ncurses 6.3
5
6Upstream-Status: Submitted [https://github.com/fenrus75/powertop/pull/92]
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 src/devices/devfreq.cpp | 2 +-
10 src/display.cpp | 2 +-
11 src/lib.cpp | 2 +-
12 3 files changed, 3 insertions(+), 3 deletions(-)
13
14diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
15index 0509d0f..b194ac4 100644
16--- a/src/devices/devfreq.cpp
17+++ b/src/devices/devfreq.cpp
18@@ -297,7 +297,7 @@ void display_devfreq_devices(void)
19 df->fill_freq_utilization(j, buf);
20 strcat(fline, buf);
21 strcat(fline, "\n");
22- wprintw(win, fline);
23+ wprintw(win, "%s", fline);
24 }
25 wprintw(win, "\n");
26 }
27diff --git a/src/display.cpp b/src/display.cpp
28index 7131144..cc03919 100644
29--- a/src/display.cpp
30+++ b/src/display.cpp
31@@ -125,7 +125,7 @@ void show_tab(unsigned int tab)
32
33 c = bottom_lines[tab_names[tab]].c_str();
34 if (c && strlen(c) > 0)
35- mvwprintw(bottom_line, 0,0, c);
36+ mvwprintw(bottom_line, 0,0, "%s", c);
37 else
38 mvwprintw(bottom_line, 0, 0,
39 "<ESC> %s | <TAB> / <Shift + TAB> %s | ", _("Exit"),
40diff --git a/src/lib.cpp b/src/lib.cpp
41index 5e48f37..5cd1c4a 100644
42--- a/src/lib.cpp
43+++ b/src/lib.cpp
44@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *frmt, ...)
45 * buffer */
46 vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list);
47 va_end(list);
48- mvprintw(1, 0, notify);
49+ mvprintw(1, 0, "%s", notify);
50 attroff(COLOR_PAIR(1));
51 }
52
diff --git a/meta/recipes-kernel/powertop/powertop_2.14.bb b/meta/recipes-kernel/powertop/powertop_2.14.bb
index c176cba388..3a7c3ba31e 100644
--- a/meta/recipes-kernel/powertop/powertop_2.14.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.14.bb
@@ -7,8 +7,9 @@ LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" 7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
8 8
9SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \ 9SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \
10 file://0001-wakeup_xxx.h-include-limits.h.patch \ 10 file://0001-wakeup_xxx.h-include-limits.h.patch \
11" 11 file://0001-src-fix-compatibility-with-ncurses-6.3.patch \
12 "
12SRCREV = "52f022f9bbe6e060fba11701d657a8d9762702ba" 13SRCREV = "52f022f9bbe6e060fba11701d657a8d9762702ba"
13 14
14S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"