]> git.ipfire.org Git - thirdparty/systemd.git/commit
analyze: use DumpUnitsMatchingPatternsByFileDescriptor 25007/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Oct 2022 13:03:16 +0000 (15:03 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Oct 2022 06:45:45 +0000 (08:45 +0200)
commitb08d86dc4a5179ca879074a83de48c69f289612e
treec0ec0d797048201edc2d001c2b3c52f1c481aa66
parentf6cce15bb30af0d28670e443ced9db7f402f1404
analyze: use DumpUnitsMatchingPatternsByFileDescriptor

Similarly to DumpByFileDescriptor vs Dump,
DumpUnitsMatchingPatternsByFileDescriptor is used in preference. Dissimilarly,
a fallback to DumpUnitsMatchingPatterns is not done on error, because there is
no need for backwards compatibility.

The code is still more verbose than I'd like, but there are four different code
paths with slightly different rules in each case, so it's hard to make this all
very brief. Since we have a separate file dedicated to making those calls, the
verbose-but-easy-to-follow implementation should be OK.

Closes #24989.

I only did a quick test that all both variants works locally and over ssh.
src/analyze/analyze-dump.c