1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- suser/sysinfo.c.orig 2020-07-12 09:44:16 UTC
+++ suser/sysinfo.c
@@ -48,9 +48,9 @@ struct sy_block {
unsigned int display_width, display_height;
};
-static const char *sy_osrelease_file = "/etc/os-release";
-static const char *sy_cpuinfo_file = "/proc/cpuinfo";
-static const char sysfs_cpu_dir[] = "/sys/devices/system/cpu";
+static const char *sy_osrelease_file = "/var/run/os-release";
+static const char *sy_cpuinfo_file = "/compat/linux/proc/cpuinfo";
+static const char sysfs_cpu_dir[] = "/compat/linux/sys/devices/system/cpu";
static unsigned int sy_verbose;
static void sy_num_cpu_threads(struct sy_block *sib)
@@ -190,7 +190,7 @@ static void sy_loadavg(struct sy_block *sib)
{
double avg5, avg15;
unsigned int run;
- FILE *fp = fopen("/proc/loadavg", "r");
+ FILE *fp = fopen("/compat/linux/proc/loadavg", "r");
if (fp == NULL)
return;
@@ -202,7 +202,7 @@ static void sy_loadavg(struct sy_block *sib)
static void sy_memory(struct sy_block *sib)
{
unsigned long long mem_free = 0, mem_buf = 0, mem_cac = 0, mem_shm = 0;
- FILE *fp = fopen("/proc/meminfo", "r");
+ FILE *fp = fopen("/compat/linux/proc/meminfo", "r");
hxmc_t *line = NULL;
char *key, *value;
|