0ce727 time-util: Introduce parse_sec_def_infinity

5 files Authored by Filipe Brandenburger 4 years ago, Committed by Packit Service 4 years ago,
    time-util: Introduce parse_sec_def_infinity
    
    This works like parse_sec() but defaults to USEC_INFINITY when passed an
    empty string or only whitespace.
    
    Also introduce config_parse_sec_def_infinity, which can be used to parse
    config options using this function.
    
    This is useful for time options that use "infinity" for default and that
    can be reset by unsetting them.
    
    Introduce a test case to ensure it works as expected.
    
    (cherry picked from commit 7b61ce3c44ef5908e817009ce4f9d2a7a37722be)
    
    Related: #1770379
    
    patch_name: 0396-time-util-Introduce-parse_sec_def_infinity.patch
    present_in_specfile: true
    location_in_specfile: 396
    squash_commits: true
    
        
file modified
+9 -0
file modified
+1 -0
file modified
+1 -0
file modified
+1 -0
file modified
+21 -0