mirror of
git://sourceware.org/git/lvm2.git
synced 2025-06-21 07:16:54 +03:00
When a report is under DM_REPORT_GROUP_JSON_STD, the formatting of the report follows more standard form of the JSON output. This includes unquoted numbers (as opposed to the DM_REPORT_GROUP_JSON). The JSON standard dictates the radix character (decimal point) must be '.' only (https://www.rfc-editor.org/rfc/rfc7158#section-6). However, some locales may use other character for the radix delimiter, like ','. This character also interferes with ',' used as delimiter for json items. Therefore, we need to check whether current locale is not posing an issue when using DM_REPORT_GROUP_JSON_STD. If that's the case, simply error out from dm_report_group_create as we don't want to override current locale in libdm or do anything else at this level. The libdm caller is responsible here for setting the proper locale. Related: https://gitlab.com/lvmteam/lvm2/-/issues/33