Skip to content

Commit 17e2fd3

Browse files
xdch47behlendorf
authored andcommitted
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
1 parent 55de40f commit 17e2fd3

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

cmd/mount_zfs/mount_zfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ main(int argc, char **argv)
182182
int error, c;
183183

184184
(void) setlocale(LC_ALL, "");
185+
(void) setlocale(LC_NUMERIC, "C");
185186
(void) textdomain(TEXT_DOMAIN);
186187

187188
opterr = 0;

cmd/zfs/zfs_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8468,6 +8468,7 @@ main(int argc, char **argv)
84688468
char **newargv;
84698469

84708470
(void) setlocale(LC_ALL, "");
8471+
(void) setlocale(LC_NUMERIC, "C");
84718472
(void) textdomain(TEXT_DOMAIN);
84728473

84738474
opterr = 0;

cmd/zpool/zpool_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10229,6 +10229,7 @@ main(int argc, char **argv)
1022910229
char **newargv;
1023010230

1023110231
(void) setlocale(LC_ALL, "");
10232+
(void) setlocale(LC_NUMERIC, "C");
1023210233
(void) textdomain(TEXT_DOMAIN);
1023310234
srand(time(NULL));
1023410235

0 commit comments

Comments
 (0)