• O
    cleanup: Remove the duplicate header · bc95be5d
    Osier Yang 提交于
    Detected by a simple Shell script:
    
    for i in $(git ls-files -- '*.[ch]'); do
        awk 'BEGIN {
            fail=0
        }
        /# *include.*\.h/{
            match($0, /["<][^">]*[">]/)
            arr[substr($0, RSTART+1, RLENGTH-2)]++
        }
        END {
            for (key in arr) {
                if (arr[key] > 1) {
                    fail=1
                    printf("%d %s\n", arr[key], key)
                }
            }
            if (fail == 1)
                exit 1
        }' $i
    
        if test $? != 0; then
            echo "Duplicate header(s) in $i"
        fi
    done;
    
    A later patch will add the syntax-check to avoid duplicate
    headers.
    bc95be5d
xen_hypervisor.c 109.4 KB