Skip to content
Commit 348e27fe authored by Michal Schmidt's avatar Michal Schmidt
Browse files

job: use a lookup table for merging of job types

It is easier to see what job_type_merge() is doing when the merging
rules are written in the form of a table.

job_type_is_superset() contained redundant information. It can be
simplified to a simple rule: Type A is a superset of B iff merging A
with B gives A.

Two job types are conflicting iff they are not mergeable.

Make job_type_lookup_merge() the core function to decide the type
merging. All other job_type_*() are just short wrappers around it.
They can be inline.

test-job-type gives the same results as before.
btw, the systemd binary is smaller by almost 1 KB.
parent b8217b7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment