• Eric W. Biederman's avatar
    sysctl: Move sysctl_check_dups into insert_header · e54012ce
    Eric W. Biederman authored
    Simplify the callers of insert_header by removing explicit calls to check
    for duplicates and instead have insert_header do the work.
    
    This makes the code slightly more maintainable by enabling changes to
    data structures where the insertion of new entries without duplicate
    suppression is not possible.
    
    There is not always a convenient path string where insert_header
    is called so modify sysctl_check_dups to use sysctl_print_dir
    when printing the full path when a duplicate is discovered.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    e54012ce
proc_sysctl.c 36.5 KB