diff options
author | xdch47 <[email protected]> | 2020-09-09 19:14:04 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-09 10:14:04 -0700 |
commit | c2c7ca0d6d6d4e4351f8819afc2ae4d8b804672e (patch) | |
tree | 10cd730ddcc013a2c4d95a76afe5cb49de5c749b /cmd | |
parent | a74259cea063704622b7f3329bef3eadb13ab8b7 (diff) |
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 <[email protected]>
Signed-off-by: Felix Neumärker <[email protected]>
Closes #10878
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mount_zfs/mount_zfs.c | 1 | ||||
-rw-r--r-- | cmd/zfs/zfs_main.c | 1 | ||||
-rw-r--r-- | cmd/zpool/zpool_main.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c index 87d2ccadc..ed9f167cc 100644 --- a/cmd/mount_zfs/mount_zfs.c +++ b/cmd/mount_zfs/mount_zfs.c @@ -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; diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 1a113c5c0..20579157d 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -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; diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index adbb78a8e..cd1c66323 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -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)); |