Fixed android model (#182)

This commit is contained in:
TheDarkBug 2021-12-28 22:36:57 +01:00
parent 48fa5825b7
commit c8365f8106
2 changed files with 8 additions and 8 deletions

View file

@ -2,6 +2,10 @@
A meme system info tool for (almost) all your Linux/Unix-based systems, based on the nyan/UwU trend on r/linuxmasterrace.
## Contributing
All kinds of contributions are welcome, but before contributing **please** read [CONTRIBUTING.md](/CONTRIBUTING.md).
## Currently supported distros
### Full support (Both ASCII art + images are provided for the given distribution)
@ -97,8 +101,4 @@ See [COPYRIGHT.md](/res/COPYRIGHT.md).
## License
This program is provided under the [GPL-3.0 License](/LICENSE).
## Contributing
All kinds of contributions are welcome, but before contributing please read [CONTRIBUTING.md](/CONTRIBUTING.md).
This program is provided under the [GPL-3.0 License](/LICENSE).

View file

@ -998,9 +998,9 @@ struct info get_info()
sprintf(user_info.user, "unknown");
fclose(whoami);
// model name
// model_fp = popen("getprop ro.product.model", "r");
// while (fgets(buffer, sizeof(buffer), model_fp) && !sscanf(buffer, "%[^\n]", user_info.model))
// ;
model_fp = popen("getprop ro.product.model", "r");
while (fgets(buffer, sizeof(buffer), model_fp) && !sscanf(buffer, "%[^\n]", user_info.model))
;
#ifndef __FREEBSD__
while (fgets(buffer, sizeof(buffer), cpuinfo) && !sscanf(buffer, "Hardware : %[^\n]", user_info.cpu_model))
;