mirror of
https://git.yoctoproject.org/poky
synced 2026-04-09 02:02:26 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b3d1a8ac9b
commit
daa2b49a23
@@ -0,0 +1,52 @@
|
||||
From 76d3f0851520bc8488e432f423941f1e72cc7405 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Mon, 25 Oct 2021 17:47:23 +0200
|
||||
Subject: [PATCH] src: fix compatibility with ncurses 6.3
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/fenrus75/powertop/pull/92]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
src/devices/devfreq.cpp | 2 +-
|
||||
src/display.cpp | 2 +-
|
||||
src/lib.cpp | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
|
||||
index 0509d0f..b194ac4 100644
|
||||
--- a/src/devices/devfreq.cpp
|
||||
+++ b/src/devices/devfreq.cpp
|
||||
@@ -297,7 +297,7 @@ void display_devfreq_devices(void)
|
||||
df->fill_freq_utilization(j, buf);
|
||||
strcat(fline, buf);
|
||||
strcat(fline, "\n");
|
||||
- wprintw(win, fline);
|
||||
+ wprintw(win, "%s", fline);
|
||||
}
|
||||
wprintw(win, "\n");
|
||||
}
|
||||
diff --git a/src/display.cpp b/src/display.cpp
|
||||
index 7131144..cc03919 100644
|
||||
--- a/src/display.cpp
|
||||
+++ b/src/display.cpp
|
||||
@@ -125,7 +125,7 @@ void show_tab(unsigned int tab)
|
||||
|
||||
c = bottom_lines[tab_names[tab]].c_str();
|
||||
if (c && strlen(c) > 0)
|
||||
- mvwprintw(bottom_line, 0,0, c);
|
||||
+ mvwprintw(bottom_line, 0,0, "%s", c);
|
||||
else
|
||||
mvwprintw(bottom_line, 0, 0,
|
||||
"<ESC> %s | <TAB> / <Shift + TAB> %s | ", _("Exit"),
|
||||
diff --git a/src/lib.cpp b/src/lib.cpp
|
||||
index 5e48f37..5cd1c4a 100644
|
||||
--- a/src/lib.cpp
|
||||
+++ b/src/lib.cpp
|
||||
@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *frmt, ...)
|
||||
* buffer */
|
||||
vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list);
|
||||
va_end(list);
|
||||
- mvprintw(1, 0, notify);
|
||||
+ mvprintw(1, 0, "%s", notify);
|
||||
attroff(COLOR_PAIR(1));
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@ LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
|
||||
|
||||
SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \
|
||||
file://0001-wakeup_xxx.h-include-limits.h.patch \
|
||||
"
|
||||
file://0001-wakeup_xxx.h-include-limits.h.patch \
|
||||
file://0001-src-fix-compatibility-with-ncurses-6.3.patch \
|
||||
"
|
||||
SRCREV = "52f022f9bbe6e060fba11701d657a8d9762702ba"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Reference in New Issue
Block a user