Fixed host info for termux

This commit is contained in:
TheDarkBug 2021-06-13 13:57:28 +02:00
parent 664fa5c8c2
commit dc451cd550

View file

@ -375,9 +375,12 @@ 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;
while (fgets(line, sizeof(line), host_model_info)) if (host_model_info)
if (sscanf(line, "%[^\n]", host_model)) {
break; while (fgets(line, sizeof(line), host_model_info))
if (sscanf(line, "%[^\n]", host_model))
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))