1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/device_mapper
Peter Rajnoha c36e012926
libdm: report: fix invalid JSON if using DM_REPORT_OUTPUT_MULTIPLE_TIMES and selection
When reporting in JSON format, we need to be able to find the 'last
displayed row', not just 'last row' as we did before. This is used
to decide whether to put the JSON_SEPARATOR (the ',' character)
between the lines when reporting in JSON format.

This is mainly important in case we use a combination of JSON format
and a report marked with DM_REPORT_OUTPUT_MULTIPLE_TIMES flag.
Such report may be reused several times with different selection
criteria each time. In that case, the report always contains all lines
in memory, even though some of them do not need to pass the selection
criteria that are currently used.

Without DM_REPORT_OUTPUT_MULTIPLE_TIMES flag, the report only contains
the lines that have passed the selection criteria, so the this wasn't
an issue in this case.

Fix suggested by Lars Ellenberg and reported here: https://github.com/lvmteam/lvm2/issues/130
2023-10-23 14:18:21 +02:00
..
datastruct gcc: match types 2021-09-22 17:18:50 +02:00
ioctl device_mapper: pair with libdm _create_and_load_v4 2023-10-13 14:24:49 +02:00
misc devicemapper: in sync with libdm 2021-09-23 16:49:58 +02:00
mm gcc: use apropriate type for reading and printing values 2020-08-28 21:43:03 +02:00
regex build: get separate builddir working again 2018-06-04 13:22:14 +01:00
vdo vdo: support version 4 2023-07-10 17:13:32 +02:00
all.h libdm: report: support reporting field IDs in headings 2023-08-28 15:44:57 +02:00
libdm-common.c cleanup: use spelling synchronize 2023-07-10 17:13:32 +02:00
libdm-common.h device_mapper: rename libdevmapper.h -> all.h 2018-06-08 12:31:45 +01:00
libdm-config.c libdm-config: replace check for 0 2021-03-08 15:43:27 +01:00
libdm-deptree.c device_mapper: reactivate siblings for snapshot 2023-02-01 11:47:47 +01:00
libdm-file.c cov: hide some false positives 2023-05-10 16:19:46 +02:00
libdm-report.c libdm: report: fix invalid JSON if using DM_REPORT_OUTPUT_MULTIPLE_TIMES and selection 2023-10-23 14:18:21 +02:00
libdm-string.c typos: misc 2023-09-19 14:54:51 +02:00
libdm-targets.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
libdm-timestamp.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
Makefile device_mapper: add parser for vdo metadata 2022-11-02 13:59:34 +01:00