htop: update message for /proc/stat access denial
Only engineering builds of Lineage OS allow free access to /proc/stat. Remove the mention of "install Lineage OS" to avoid confusion since official releases restrict /proc/stat access just like stock Android.
This commit is contained in:
parent
41a5d5efd6
commit
d9bf81ed12
|
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://htop.dev/
|
||||||
TERMUX_PKG_DESCRIPTION="Interactive process viewer for Linux"
|
TERMUX_PKG_DESCRIPTION="Interactive process viewer for Linux"
|
||||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||||
TERMUX_PKG_VERSION=3.0.0
|
TERMUX_PKG_VERSION=3.0.0
|
||||||
TERMUX_PKG_REVISION=1
|
TERMUX_PKG_REVISION=2
|
||||||
TERMUX_PKG_SRCURL=https://github.com/htop-dev/htop/archive/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz
|
TERMUX_PKG_SRCURL=https://github.com/htop-dev/htop/archive/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_SHA256=1c0661f0ae5f4e2874da250b60cd515e4ac4c041583221adfe95f10e18d1a4e6
|
TERMUX_PKG_SHA256=1c0661f0ae5f4e2874da250b60cd515e4ac4c041583221adfe95f10e18d1a4e6
|
||||||
# htop checks setlocale() return value for UTF-8 support, so use libandroid-support.
|
# htop checks setlocale() return value for UTF-8 support, so use libandroid-support.
|
||||||
|
|
|
@ -6,7 +6,7 @@ diff -uNr htop-3.0.0/linux/LinuxProcessList.c htop-3.0.0.mod/linux/LinuxProcessL
|
||||||
file = fopen(PROCSTATFILE, "r");
|
file = fopen(PROCSTATFILE, "r");
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
- CRT_fatalError("Cannot open " PROCSTATFILE);
|
- CRT_fatalError("Cannot open " PROCSTATFILE);
|
||||||
+ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device and/or install Lineage OS in order to get 'htop' working properly.\n");
|
+ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device in order to get 'htop' working properly.\n");
|
||||||
}
|
}
|
||||||
int cpus = 0;
|
int cpus = 0;
|
||||||
do {
|
do {
|
||||||
|
@ -15,7 +15,7 @@ diff -uNr htop-3.0.0/linux/LinuxProcessList.c htop-3.0.0.mod/linux/LinuxProcessL
|
||||||
FILE* file = fopen(PROCSTATFILE, "r");
|
FILE* file = fopen(PROCSTATFILE, "r");
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
- CRT_fatalError("Cannot open " PROCSTATFILE);
|
- CRT_fatalError("Cannot open " PROCSTATFILE);
|
||||||
+ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device and/or install Lineage OS in order to get 'htop' working properly.\n");
|
+ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device in order to get 'htop' working properly.\n");
|
||||||
}
|
}
|
||||||
int cpus = this->super.cpuCount;
|
int cpus = this->super.cpuCount;
|
||||||
assert(cpus > 0);
|
assert(cpus > 0);
|
||||||
|
|
Loading…
Reference in New Issue