Fixed host info for termux
This commit is contained in:
parent
664fa5c8c2
commit
dc451cd550
1 changed files with 6 additions and 3 deletions
|
@ -375,10 +375,13 @@ void get_info()
|
||||||
while (fgets(line, sizeof(line), os_release))
|
while (fgets(line, sizeof(line), os_release))
|
||||||
if (sscanf(line, "\nID=%s", version_name))
|
if (sscanf(line, "\nID=%s", version_name))
|
||||||
break;
|
break;
|
||||||
|
if (host_model_info)
|
||||||
|
{
|
||||||
while (fgets(line, sizeof(line), host_model_info))
|
while (fgets(line, sizeof(line), host_model_info))
|
||||||
if (sscanf(line, "%[^\n]", host_model))
|
if (sscanf(line, "%[^\n]", host_model))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
while (fgets(line, sizeof(line), cpuinfo))
|
while (fgets(line, sizeof(line), cpuinfo))
|
||||||
if (sscanf(line, "model name : %[^\n]", cpu_model))
|
if (sscanf(line, "model name : %[^\n]", cpu_model))
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue