Force the use of '.' as decimal separator.

This solves issues occurring with a different decimal operator and
keeps the command line interface consistent for all locales .
E.g. `zfs set quota=0.5T`

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Felix Neumärker <xdch47@posteo.de>
Closes #10878
This commit is contained in:
xdch47 2020-09-09 19:14:04 +02:00 committed by Brian Behlendorf
parent 55de40fe47
commit 17e2fd3bfd
3 changed files with 3 additions and 0 deletions

View File

@ -182,6 +182,7 @@ main(int argc, char **argv)
int error, c;
(void) setlocale(LC_ALL, "");
(void) setlocale(LC_NUMERIC, "C");
(void) textdomain(TEXT_DOMAIN);
opterr = 0;

View File

@ -8468,6 +8468,7 @@ main(int argc, char **argv)
char **newargv;
(void) setlocale(LC_ALL, "");
(void) setlocale(LC_NUMERIC, "C");
(void) textdomain(TEXT_DOMAIN);
opterr = 0;

View File

@ -10229,6 +10229,7 @@ main(int argc, char **argv)
char **newargv;
(void) setlocale(LC_ALL, "");
(void) setlocale(LC_NUMERIC, "C");
(void) textdomain(TEXT_DOMAIN);
srand(time(NULL));