Skip to content
  • Michal Schmidt's avatar
    job: use a lookup table for merging of job types · 348e27fe
    Michal Schmidt authored
    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.
    348e27fe