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. 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 ## Currently supported distros
### Full support (Both ASCII art + images are provided for the given distribution) ### Full support (Both ASCII art + images are provided for the given distribution)
@ -98,7 +102,3 @@ See [COPYRIGHT.md](/res/COPYRIGHT.md).
## License ## License
This program is provided under the [GPL-3.0 License](/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).

View file

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