76cbafcdd4
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. |
||
---|---|---|
.github | ||
.lgtm/cpp-queries | ||
.mkosi | ||
catalog | ||
coccinelle | ||
docs | ||
factory/etc | ||
hwdb.d | ||
man | ||
modprobe.d | ||
network | ||
po | ||
presets | ||
rules.d | ||
semaphoreci | ||
shell-completion | ||
src | ||
sysctl.d | ||
sysusers.d | ||
test | ||
tmpfiles.d | ||
tools | ||
travis-ci | ||
units | ||
xorg | ||
.clang-format | ||
.ctags | ||
.dir-locals.el | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.mailmap | ||
.travis.yml | ||
.vimrc | ||
.ycm_extra_conf.py | ||
azure-pipelines.yml | ||
configure | ||
LICENSE.GPL2 | ||
LICENSE.LGPL2.1 | ||
Makefile | ||
meson_options.txt | ||
meson.build | ||
mkosi.build | ||
mkosi.default | ||
NEWS | ||
README | ||
README.md | ||
TODO | ||
zanata.xml |
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.