Systemd/src
Zbigniew Jędrzejewski-Szmek 76cbafcdd4 sd-journal: when enumerating, continue even after an inaccessible field
SD_JOURNAL_FOREACH_DATA() and SD_JOURNAL_FOREACH_UNIQUE() would immediately
terminate when a field couldn't be accessed. This can happen for example when a
field is compressed with an unavailable compression format. But it's likely
that this is the wrong thing to do: the caller for example might want to
iterate over the fields but isn't interested in all of them. coredumpctl is
like this: it uses SD_JOURNAL_FOREACH_DATA() but only uses a subset of the
fields.

Add two new functions sd_journal_enumerate_good_data() and
sd_journal_enumerate_good_unique() that retry sd_journal_enumerate_data() and
sd_journal_enumerate_unique() if the return value is something that applies to
a single field: ENOBUS, E2BIG, EOPNOTSUPP.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1856037.

An alternative would be to make the macros themselves smarter instead of adding
new symbols, and do the looping internally in the macro. I don't like that
approach for two reasons. First, it would embed the logic in the macro, so
recompilation would be required if we decide to update the logic. With the
current version of the patch, recompilation is required to use the new symbols,
but after that, library upgrades are enough. So the current approach is safer
in case further updates are needed. Second, our headers use primitive C, and it
is hard to do the macros without using newer features.
2020-07-21 17:42:11 +02:00
..
ac-power
activate
analyze analyze: CAP_RAWIO -> CAP_SYS_RAWIO 2020-07-16 21:14:59 +02:00
ask-password
backlight backlight: read current backlight brightness from 'actual_brightness' attribute 2020-06-30 22:19:21 +09:00
basic Merge pull request #16491 from keszybz/udev-logging 2020-07-17 07:12:58 +02:00
binfmt
boot sd-boot: Add small comments after device-specific key macros 2020-06-18 15:57:11 +02:00
busctl bus: use bus_log_parse_error to print message 2020-07-12 06:33:48 +09:00
cgls log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
cgroups-agent
cgtop log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
core Merge pull request #16482 from poettering/coverity-246 2020-07-16 20:23:23 +09:00
coredump coredump: use log_error_errno() where appropriate 2020-06-25 15:03:13 +02:00
cryptsetup tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
debug-generator
delta log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
detect-virt log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
dissect dissect/nspawn: add support for dm-verity root hash signature 2020-06-25 08:45:21 +01:00
environment-d-generator
escape log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
firstboot firstboot: add option to turn off welcome text display 2020-07-07 11:20:42 +02:00
fsck
fstab-generator fstab-generator: introduce an helper to write extra dependencies specified via the mount options 2020-07-01 16:35:13 +02:00
fuzz fuzz-udev-rules: -ENOBUFS should be accepted too 2020-06-25 08:51:21 +02:00
getty-generator
gpt-auto-generator dissect: support single-filesystem verity images with external verity hash 2020-06-09 12:19:21 +01:00
hibernate-resume
home Merge pull request #16385 from JackFangXN/master 2020-07-08 12:12:29 +02:00
hostname shared: split out code that maps properties to local structs 2020-06-30 15:09:35 +02:00
hwdb Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
id128 table use table_log_print_error() instead of table_log_show_error 2020-07-08 15:16:52 +08:00
import shared: split out property get helpers 2020-06-30 15:10:17 +02:00
initctl initctl: use _cleanup_ and run() 2020-07-02 17:12:23 +02:00
journal sd-journal: when enumerating, continue even after an inaccessible field 2020-07-21 17:42:11 +02:00
journal-remote various daemons: emit Stopping... notification before destructing the manager object 2020-07-02 17:12:23 +02:00
kernel-install kernel-install: extend --help 2020-06-05 16:34:05 +02:00
libsystemd sd-journal: when enumerating, continue even after an inaccessible field 2020-07-21 17:42:11 +02:00
libsystemd-network dhcp4: only renewing lease when the client already has a lease 2020-07-16 14:58:54 +09:00
libudev tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
locale shared: split out code that maps properties to local structs 2020-06-30 15:09:35 +02:00
login Merge pull request #16385 from JackFangXN/master 2020-07-08 12:12:29 +02:00
machine machine: fix if check 2020-07-16 08:35:26 +02:00
machine-id-setup
modules-load
mount tree-wide: use SYNTHETIC_ERRNO with log_device_* in more places 2020-07-16 22:08:12 +02:00
network network: ndisc: any failures in processing event make the link in failed state 2020-07-17 01:18:44 +09:00
notify
nspawn nspawn: mount os-release in two steps to make it read-only 2020-07-16 09:59:59 +01:00
nss-myhostname
nss-mymachines nss-mymachines: drop support for UID/GID resolving 2020-07-14 17:08:12 +02:00
nss-resolve shared: actually move all BusLocator related calls to bus-locator.c 2020-06-30 15:09:19 +02:00
nss-systemd userdb: replace recursion lock 2020-06-23 17:24:24 +02:00
partition repart: include more relevant information in the warning message, fix test 2020-07-13 03:43:26 +09:00
path sd-path: drop "-dir" and "-path" suffixes from path enums 2020-05-28 23:54:35 +02:00
portable Merge pull request #15891 from bluca/host_os_release 2020-07-08 23:52:13 +02:00
pstore Merge pull request #16057 from keszybz/resolvectl-sorted-no-nta 2020-06-04 11:30:14 +09:00
quotacheck
random-seed random-util: add common helper random_write_entropy() for crediting entropy to the kernel's pool 2020-06-24 15:33:27 +02:00
rc-local-generator
remount-fs
reply-password
resolve bus: use bus_log_parse_error to print message 2020-07-12 06:33:48 +09:00
rfkill
run shared: split out code that maps properties to local structs 2020-06-30 15:09:35 +02:00
run-generator
shared network: downgrade log level in conf parsers 2020-07-17 00:40:09 +09:00
shutdown
sleep sleep: one spelling unification 2020-07-07 10:02:02 +02:00
socket-proxy socket-proxy: use structured initialization in one place 2020-06-24 10:38:15 +02:00
stdio-bridge tree-wide: check POLLNVAL everywhere 2020-06-10 08:57:31 +02:00
sulogin-shell
sysctl
system-update-generator
systemctl table use table_log_print_error() instead of table_log_show_error 2020-07-08 15:16:52 +08:00
systemd sd-journal: when enumerating, continue even after an inaccessible field 2020-07-21 17:42:11 +02:00
sysusers Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
sysv-generator sysv-generator: reduce scope of variables 2020-06-24 10:38:15 +02:00
test Merge pull request #16468 from keszybz/two-unrelated-patches 2020-07-15 13:40:22 +02:00
time-wait-sync
timedate bus: use bus_log_parse_error to print message 2020-07-12 06:33:48 +09:00
timesync various daemons: emit Stopping... notification before destructing the manager object 2020-07-02 17:12:23 +02:00
tmpfiles tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
tty-ask-password-agent tree-wide: check POLLNVAL everywhere 2020-06-10 08:57:31 +02:00
udev tree-wide: use SYNTHETIC_ERRNO with log_device_* in more places 2020-07-16 22:08:12 +02:00
update-done Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
update-utmp initctl,update-utmp: define iterator variable in loop 2020-07-02 17:12:23 +02:00
user-sessions Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
userdb Merge pull request #16385 from JackFangXN/master 2020-07-08 12:12:29 +02:00
vconsole
veritysetup veritysetup: add support for dm-verity root hash signature 2020-06-25 08:44:49 +01:00
version
volatile-root
xdg-autostart-generator xdg-autostart: ignore all empty entries in multi-string entries 2020-07-07 14:02:16 +02:00