gpu: forced LANG environement variable to en_US before running lshw
Before, as my system is configured with LANG=fr_FR so, lshw would output in french, and the program couldn't find the right strings in the output, and so, my GPU wasn't properly detected. There may be other instances of similar issues in the code, but for now, everything shows up correctly for me.
This commit is contained in:
parent
9e373494fe
commit
208c40c19e
1 changed files with 1 additions and 0 deletions
|
@ -205,6 +205,7 @@ void get_info() { // get all necessary info
|
|||
|
||||
// gpu
|
||||
int gpun = 0; // number of the gpu that the program is searching for to put in the array
|
||||
setenv("LANG", "en_US", 1); // force language to english
|
||||
FILE *gpu;
|
||||
gpu = popen("lshw -class display 2> /dev/null", "r");
|
||||
|
||||
|
|
Loading…
Reference in a new issue