!11 fix compatibility with ncurses-6.3
From: @wangchen2020 Reviewed-by: @xiezhipeng1 Signed-off-by: @xiezhipeng1
This commit is contained in:
commit
8e7f83fafa
54
backport-src-fix-compatibility-with-ncurses-6.3.patch
Normal file
54
backport-src-fix-compatibility-with-ncurses-6.3.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From 9ef1559a1582f23d599c149601c3a8e06809296c 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
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: powertop
|
Name: powertop
|
||||||
Version: 2.14
|
Version: 2.14
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Power consumption tool for Linux
|
Summary: Power consumption tool for Linux
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://01.org/powertop/
|
URL: http://01.org/powertop/
|
||||||
@ -9,6 +9,7 @@ Source1: powertop.service
|
|||||||
|
|
||||||
Patch1: backport-powertop-2.7-always-create-params.patch
|
Patch1: backport-powertop-2.7-always-create-params.patch
|
||||||
Patch2: backport-powertop-2.14-pthread.patch
|
Patch2: backport-powertop-2.14-pthread.patch
|
||||||
|
Patch3: backport-src-fix-compatibility-with-ncurses-6.3.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake libtool
|
BuildRequires: autoconf automake libtool
|
||||||
BuildRequires: gcc gcc-c++ systemd
|
BuildRequires: gcc gcc-c++ systemd
|
||||||
@ -71,6 +72,9 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 24 2022 wangchen <wangchen137@h-partners.com> - 2.14-2
|
||||||
|
- fix compatibility with ncurses-6.3
|
||||||
|
|
||||||
* Mon Feb 21 2022 panxiaohe <panxh.life@foxmail.com> - 2.14-1
|
* Mon Feb 21 2022 panxiaohe <panxh.life@foxmail.com> - 2.14-1
|
||||||
- update to 2.14
|
- update to 2.14
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user