]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
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)
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

index 34a87376694bb251e2a27ce5d2f98270dba1eb97..38b7346698093a91a4bb3a0804af6cb2a95cfd7e 100644 (file)
@@ -51,7 +51,6 @@
 #include "virnetlink.h"
 #include "virnetserver.h"
 #include "remote.h"
-#include "remote_driver.h"
 #include "virhook.h"
 #include "viraudit.h"
 #include "locking/lock_manager.h"
index b4d8cb3169631b39c52a388bd44ad819767a7330..8fe4e0350d88c8dff4241db86083a0414dcbd4e0 100644 (file)
@@ -31,7 +31,6 @@
 #include "viralloc.h"
 
 #include "node_device_conf.h"
-#include "viralloc.h"
 #include "virxml.h"
 #include "virutil.h"
 #include "virbuffer.h"
index 9980b38036e78910c3535fc77d3e23e397a160b8..30541ce17cc2cbfa4e535498355f00e121d9e162 100644 (file)
@@ -39,7 +39,6 @@
 #include "viralloc.h"
 #include "viruuid.h"
 #include "vircommand.h"
-#include "libxl.h"
 #include "libxl_driver.h"
 #include "libxl_conf.h"
 #include "xen_xm.h"
index e8b314a891917dc00f32b1ff32b7f1e80fa41f49..3b279801f1698937cb467b331588b1a86e3a274f 100644 (file)
@@ -39,7 +39,6 @@
 #include <signal.h>
 #include <paths.h>
 #include <pwd.h>
-#include <stdio.h>
 #include <sys/wait.h>
 #include <sys/ioctl.h>
 #include <net/if.h>
index 4b21c4e30113e939598d4cd32d5465bf4636e0f6..a6f96c717f9eb6763859fc9cdb18494937a1c7d5 100644 (file)
@@ -36,7 +36,6 @@
 #include <dirent.h>
 #include <time.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <limits.h>
 #include <errno.h>
 #include <string.h>
index 9b1062464b09082a1b75741fa825599180bc88cd..5d22c6314853d1db3f9cec9cc306c2cc043d1ec1 100644 (file)
@@ -41,7 +41,6 @@
 #include <fcntl.h>
 #include <paths.h>
 #include <pwd.h>
-#include <stdio.h>
 #include <sys/wait.h>
 
 #include "virerror.h"
index 5b8d85fb7c7ae2e5cbea35f5efbd8e26f9f8bbeb..0c0bfcbb14567ac792a7a33dc6b1532c58fe2eb8 100644 (file)
@@ -35,7 +35,6 @@
 #include <fcntl.h>
 #include <paths.h>
 #include <pwd.h>
-#include <stdio.h>
 #include <sys/wait.h>
 #include <sys/time.h>
 #include <sys/statvfs.h>
index 50e8216805d7eee9cd235a0d39c19d5ddb7bafa3..3057345fbfe9ef91ab787dd52e451259a46d17b1 100644 (file)
@@ -33,7 +33,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
-#include <stdio.h>
 #include <libssh2.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 728add5620571454487a9c00228a3bd0c0df3bd2..4e76799343de9faec7b60492f2d5c289c1a67d3e 100644 (file)
@@ -27,7 +27,6 @@
 # include "virobject.h"
 # include "capabilities.h"
 # include "vircommand.h"
-# include "virobject.h"
 # include "qemu_monitor.h"
 
 /* Internal flags to keep track of qemu command line capabilities */
index 7c167b7c655896d850bd5e245e8361ab7c720c80..cee5557d8570d4c03890a6f53627cd5caa807dfe 100644 (file)
@@ -38,7 +38,6 @@
 #include <fcntl.h>
 #include <signal.h>
 #include <paths.h>
-#include <stdio.h>
 #include <sys/wait.h>
 #include <sys/ioctl.h>
 #include <sys/un.h>
index 7333a1fccb0aadcb866c4e5de46a21054c770ae1..c620a2ed25c3f74f99c61635c26f43993a4cbe27 100644 (file)
@@ -43,7 +43,6 @@
 #include "virfile.h"
 #include "virhash.h"
 #include "virrandom.h"
-#include "virutil.h"
 #include "virconf.h"
 #include "virtpm.h"
 
index 4fc2315cbbe95bcf5fcc9c964a0e7b20f52f50ab..498d1d9e30316cff5d82d214e16cfc5ca7ead1d4 100644 (file)
@@ -38,7 +38,6 @@
 #include <signal.h>
 #include <paths.h>
 #include <pwd.h>
-#include <stdio.h>
 #include <sys/wait.h>
 #include <sys/ioctl.h>
 #include <sys/inotify.h>
index 871376e51fef6087ca8dca55bcde2e5f3bf1df99..e4ce223657758d981d870cb5b4d7863413219618 100644 (file)
@@ -29,7 +29,6 @@
 #include "virnetdevopenvswitch.h"
 #include "virerror.h"
 #include "virfile.h"
-#include "virerror.h"
 #include "viralloc.h"
 #include "virlog.h"
 #include "virutil.h"
index e16fffe7e397de29d08a6ad56cbf75bbb64f8da2..9dbbe0745b36419b0123add53e7b82b2cdbbedcf 100644 (file)
@@ -33,7 +33,6 @@
 #include <sys/mman.h>
 #include <sys/ioctl.h>
 #include <limits.h>
-#include <stdint.h>
 #include <regex.h>
 #include <errno.h>