Two cleanups (#40587)

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-02-09 11:02:41 +01:00
committed by GitHub
3 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ Thus code that is used by "higher-level" components (e.g. our binaries which are
would go to a subdirectory specific to that component if it is only used there.
If the code is to be shared between components, it'd go to `src/shared/`.
Shared code that is used by multiple components that do not link to `libsystemd-shared-<nnn>.so` may live either in `src/libsystemd/`, `src/basic/`, or `src/fundamental/`.
Any code that is used only for EFI goes under `src/boot/efi/`, and in `src/fundamental/` if it is shared with non-EFI components.
Code used only for EFI goes under `src/boot/`, and under `src/fundamental/` if it is shared with non-EFI components.
To summarize:
+7 -8
View File
@@ -266,12 +266,12 @@ def check_matches(groups):
if gr:
# we check this first to provide an easy error message
if rest[-1] not in '*:':
error('Pattern {} does not end with "*" or ":"', match)
error('Pattern {!r} does not end with "*" or ":"', match)
try:
gr.parseString(rest)
except ParseBaseException as e:
error('Pattern {} is invalid: {}', match, e)
error('Pattern {!r} is invalid: {}', match, e)
continue
matches.sort()
@@ -353,12 +353,11 @@ def print_summary(fname, groups):
error(f'{fname}: no matches or props')
if __name__ == '__main__':
args = sys.argv[1:] or sorted(
[
os.path.dirname(sys.argv[0]) + '/20-dmi-id.hwdb',
os.path.dirname(sys.argv[0]) + '/20-net-ifname.hwdb',
] + glob.glob(os.path.dirname(sys.argv[0]) + '/[678][0-9]-*.hwdb')
)
args = sys.argv[1:] or sorted([
os.path.dirname(sys.argv[0]) + '/20-dmi-id.hwdb',
os.path.dirname(sys.argv[0]) + '/20-net-ifname.hwdb',
*glob.glob(os.path.dirname(sys.argv[0]) + '/[678][0-9]-*.hwdb'),
])
for fname in args:
groups = parse(fname)
+1 -1
View File
@@ -26,7 +26,7 @@ int verb_preset_all(int argc, char *argv[], void *userdata) {
CLEANUP_ARRAY(changes, n_changes, install_changes_free);
r = unit_file_preset_all(arg_runtime_scope, unit_file_flags_from_args(), arg_root, arg_preset_mode, &changes, &n_changes);
/* We do not treat propagate failure of individual units here. */
/* We do not propagate failure for individual units here. */
(void) install_changes_dump(r, "preset all", changes, n_changes, arg_quiet);
if (r < 0)
return r;