Skip to content

Commit

Permalink
Force the use of '.' as decimal separator.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
xdch47 authored Sep 9, 2020
1 parent a74259c commit c2c7ca0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/mount_zfs/mount_zfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit c2c7ca0

Please sign in to comment.