modify code
This commit is contained in:
parent
1438dcce3d
commit
5a633ddf66
@ -986,10 +986,20 @@ void GetSysStatusCMT(int& cpu_use,int& mem_use,int& disk_remain,int& cpu_temp)
|
||||
}
|
||||
char hardTotal[32];
|
||||
char hardFree[32];
|
||||
char rateHardUse[32];
|
||||
char chRes[100];
|
||||
memset(chRes, 0, 100);
|
||||
getDiskInfo(hardTotal, hardFree);
|
||||
|
||||
char hardName[32];
|
||||
char hardUse[32];
|
||||
const char *getEmmcInfo = "df -h | grep /opt";
|
||||
system_custom(getEmmcInfo, chRes);
|
||||
sscanf(chRes, "%s%s%s%s%s", hardName, hardTotal, hardUse, hardFree, rateHardUse);
|
||||
|
||||
std::string strhardTotal(hardTotal);
|
||||
std::string strhardFree(hardFree);
|
||||
std::string strrateHardUse(rateHardUse);
|
||||
|
||||
char key[128] = {0};
|
||||
memset(key, 0, sizeof(key));
|
||||
sprintf(key, "/sys/class/thermal/thermal_zone0/temp");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user