1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-06-21 07:16:54 +03:00
lvm2/device_mapper
Peter Rajnoha f110b32239
libdm: report: require '.' radix char for DM_REPORT_GROUP_JSON_STD
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
2025-06-12 10:12:59 +02:00
..
2021-09-22 17:18:50 +02:00
2025-02-17 15:51:03 +01:00
2025-02-17 15:51:03 +01:00
2025-02-17 15:51:03 +01:00
2025-01-30 13:38:31 +01:00
2025-02-17 15:51:02 +01:00
2023-05-10 16:19:46 +02:00