Files
systemd/man
Luca Boccassi c0b3b855b7 coredumpctll: avoid unnecessary heap copy and decompression for field existence checks (#41520)
`print_list()` and `print_info()` used `RETRIEVE()` to `strndup()` the
entire
`COREDUMP` field into a heap-allocated string, only to check whether it
exists.
With `sd_journal_set_data_threshold(j, 0)` in `print_info()`, this
copies the
full coredump binary (potentially hundreds of MB) to heap just to print
"Storage: journal".

This PR:

1. Makes `sd_journal_get_data()` output parameters optional
(`NULL`-safe), so
   callers can do pure existence checks without receiving the data.
2. Short-circuits `maybe_decompress_payload()` after
`decompress_startswith()`
   succeeds when neither output pointer is requested, skipping full blob
   decompression for compressed journal entries.
3. Switches coredumpctl to pass `NULL, NULL` for the existence checks
instead
   of heap-copying via `RETRIEVE()`.
2026-04-08 21:34:47 +01:00
..
2024-12-25 17:00:31 +01:00
2023-12-25 09:15:53 +01:00
2024-11-24 01:11:42 +09:00
2025-09-18 10:57:38 +01:00
2025-08-10 13:40:32 +02:00
2025-08-11 10:30:26 +02:00
2025-10-04 18:13:27 +02:00
2025-08-11 10:30:26 +02:00
2025-08-11 10:30:26 +02:00
2026-01-21 21:32:49 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2026-02-18 01:00:04 +09:00
2024-12-25 17:00:31 +01:00
2025-08-10 13:40:32 +02:00
2024-12-25 17:00:31 +01:00
2023-12-26 08:59:53 +01:00
2023-12-26 08:59:53 +01:00
2026-01-06 08:48:05 +09:00
2023-12-26 13:10:36 +01:00
2026-02-20 01:18:54 +09:00
2026-02-21 03:00:51 +09:00
2026-03-18 14:58:43 +01:00
2025-07-16 05:47:38 +09:00
2023-12-24 09:32:26 +01:00
2024-11-06 19:06:40 +09:00
2025-09-18 10:57:38 +01:00