Skip to content

Commit bfee2b2

Browse files
ikegami-tigaw
authored andcommitted
nvme-print: use LC_MEASUREMENT to check fahrenheit temperature
Previously used LC_ALL so not checked correctly if LC_MEASUREMENT set. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
1 parent 3a1048e commit bfee2b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nvme-print.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,8 @@ static bool is_temperature_fahrenheit(void)
789789
const char *locale, *underscore;
790790
char country[3] = { 0 };
791791

792-
setlocale(LC_ALL, "");
793-
locale = setlocale(LC_ALL, NULL);
792+
setlocale(LC_MEASUREMENT, "");
793+
locale = setlocale(LC_MEASUREMENT, NULL);
794794

795795
if (!locale || strlen(locale) < 2)
796796
return false;

0 commit comments

Comments
 (0)