diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-04-26 21:45:35 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-04-27 01:35:06 +0100 |
commit | 637d57ddfd2e908f9508ac9a822d09063f0c146e (patch) | |
tree | 44d13ba671cf3199658e92e0b46401191f1b5643 /units | |
parent | 048bcb9d1f813df344a4aaed31c5687856ecf6e5 (diff) | |
download | systemd-637d57ddfd2e908f9508ac9a822d09063f0c146e.tar.gz |
image-policy: split out code that "extends" underspecified partition policy flags
When encoding partition policy flags we allow parts of the flags to be
"unspecified" (i.e. entirely zeros), which when actually checking the
policy we'll automatically consider equivalent to "any" (i.e. entirely
ones). This "extension" of the flags was so far done as part of
partition_policy_normalized_flags(). Let's split this logic out into a
new function partition_policy_flags_extend() that simply sets all bits
in a specific part of the flags field if they were entirely zeroes so
far.
When comparing policy objects for equivalence we so far used
partition_policy_normalized_flags() to compare the per-designator flags,
which thus meant that "underspecified" flags, and fully specified ones
that are set to "any" were considered equivalent. Which is great.
However, we forgot to do that for the fallback policy flags, the flags
that apply to all partitions for which no explicit policy flags are
specified.
Let's use the new partition_policy_flags_extend() call to compare them
in extended form, so that there two we can hide the difference between
"underspecified" and "any" flags.
Diffstat (limited to 'units')
0 files changed, 0 insertions, 0 deletions