]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cleanup: Remove the duplicate header
authorOsier Yang <jyang@redhat.com>
Tue, 16 Apr 2013 13:41:43 +0000 (21:41 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 17 Apr 2013 07:49:35 +0000 (15:49 +0800)
commitbc95be5dead68b7deba2fe121c3fbba4dc41bcdd
treef9128e21b4a68f69b8b009a6b285b26816da2ac8
parent2beae9c202bf80bffdbc4768b946c9eb93a26c7e
cleanup: Remove the duplicate header

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.
14 files changed:
daemon/libvirtd.c
src/conf/node_device_conf.c
src/libxl/libxl_driver.c
src/network/bridge_driver.c
src/openvz/openvz_conf.c
src/openvz/openvz_driver.c
src/parallels/parallels_driver.c
src/phyp/phyp_driver.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_driver.c
src/security/security_selinux.c
src/uml/uml_driver.c
src/util/virnetdevtap.c
src/xen/xen_hypervisor.c