If root has locales with different decimal point then '.'
(i.e. Czech with ',') lets be tolerant and retry with
"C" locales in the case '.' is found during parse of number.
Locales are then restored back.
Version 2.02.112 -
=====================================
+ Add extra support for '.' as decimal point in size args.
Configurable support for creation of sparse volumes with thin-pools.
Update and correct lvcreate and lvcovert man pages.
Mark pools and snapshots as unzeroable volumes.
#include <sys/resource.h>
#include <dirent.h>
#include <paths.h>
+#include <locale.h>
#ifdef HAVE_GETOPTLONG
# include <getopt.h>
v = strtod(val, &ptr);
+ if (*ptr == '.') {
+ /*
+ * Maybe user has non-C locale with different decimal point ?
+ * Lets be toleran and retry with standard C locales
+ */
+ if (setlocale(LC_ALL, "C")) {
+ v = strtod(val, &ptr);
+ setlocale(LC_ALL, "");
+ }
+ }
+
if (ptr == val)
return 0;