[libvirt] PATCH [1/2]: Use internal.h consistently everywhere

Richard W.M. Jones rjones at redhat.com
Thu May 22 17:42:21 UTC 2008


One thing to note about this patch is that qemud/internal.h has been
renamed to qemud/qemud.h.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
-------------- next part --------------
Index: HACKING
===================================================================
RCS file: /data/cvs/libvirt/HACKING,v
retrieving revision 1.2
diff -u -r1.2 HACKING
--- HACKING	8 May 2008 14:49:53 -0000	1.2
+++ HACKING	22 May 2008 16:56:51 -0000
@@ -158,3 +158,44 @@
 
      return virBufferContentAndReset(&buf);
   }
+
+
+Include files
+=============
+
+There are now quite a large number of include files, both libvirt
+internal and external, and system includes.  To manage all this
+complexity it's best to stick to the following general plan for all
+*.c source files:
+
+  /*
+   * Copyright notice
+   * ....
+   * ....
+   * ....
+   *
+   */
+
+  #include <config.h>             Must come first in every file.
+
+  #include <stdio.h>              Any system includes you need.
+  #include <string.h>
+  #include <limits.h>
+
+  #if HAVE_NUMACTL                Some system includes aren't supported
+  #include <numa.h>               everywhere so need these #if defences.
+  #endif
+
+  #include "internal.h"           Include this first, after system includes.
+
+  #include "util.h"               Any libvirt internal header files.
+  #include "buf.h"
+
+  static myInternalFunc ()        The actual code.
+  {
+    ...
+
+Of particular note: *DO NOT* include libvirt/libvirt.h or
+libvirt/virterror.h.  It is included by "internal.h" already and there
+are some special reasons why you cannot include these files
+explicitly.
\ No newline at end of file
Index: qemud/Makefile.am
===================================================================
RCS file: /data/cvs/libvirt/qemud/Makefile.am,v
retrieving revision 1.46
diff -u -r1.46 Makefile.am
--- qemud/Makefile.am	22 May 2008 15:20:25 -0000	1.46
+++ qemud/Makefile.am	22 May 2008 17:01:14 -0000
@@ -53,6 +53,7 @@
 libvirtd_CFLAGS = \
 	-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
 	-I$(top_srcdir)/include -I$(top_builddir)/include \
+	-I$(top_srcdir)/src \
 	$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
 	$(POLKIT_CFLAGS) \
 	$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
Index: qemud/event.c
===================================================================
RCS file: /data/cvs/libvirt/qemud/event.c,v
retrieving revision 1.9
diff -u -r1.9 event.c
--- qemud/event.c	15 May 2008 06:12:32 -0000	1.9
+++ qemud/event.c	22 May 2008 17:01:15 -0000
@@ -29,7 +29,7 @@
 #include <sys/time.h>
 #include <errno.h>
 
-#include "internal.h"
+#include "qemud.h"
 #include "event.h"
 
 #define EVENT_DEBUG(fmt, ...) qemudDebug("EVENT: " fmt, __VA_ARGS__)
Index: qemud/internal.h
===================================================================
RCS file: qemud/internal.h
diff -N qemud/internal.h
--- qemud/internal.h	10 Apr 2008 16:53:29 -0000	1.44
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,186 +0,0 @@
-/*
- * internal.h: daemon data structure definitions
- *
- * Copyright (C) 2006, 2007 Red Hat, Inc.
- * Copyright (C) 2006 Daniel P. Berrange
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- *
- * Author: Daniel P. Berrange <berrange at redhat.com>
- */
-
-
-#ifndef QEMUD_INTERNAL_H__
-#define QEMUD_INTERNAL_H__
-
-#include <config.h>
-
-#include "../src/socketcompat.h"
-
-#include <gnutls/gnutls.h>
-#include <gnutls/x509.h>
-#include "../src/gnutls_1_0_compat.h"
-#if HAVE_SASL
-#include <sasl/sasl.h>
-#endif
-
-#ifdef HAVE_POLKIT
-#include <dbus/dbus.h>
-#endif
-
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include "remote_protocol.h"
-
-#ifdef __GNUC__
-#ifdef HAVE_ANSIDECL_H
-#include <ansidecl.h>
-#endif
-#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__((__unused__))
-#endif
-#ifndef ATTRIBUTE_FORMAT
-#define ATTRIBUTE_FORMAT(args...) __attribute__((__format__ (args)))
-#endif
-#else
-#define ATTRIBUTE_UNUSED
-#define ATTRIBUTE_FORMAT(...)
-#endif
-
-typedef enum {
-    QEMUD_ERR,
-    QEMUD_WARN,
-    QEMUD_INFO,
-#ifdef ENABLE_DEBUG
-    QEMUD_DEBUG
-#endif
-} qemudLogPriority;
-
-
-enum qemud_mode {
-    QEMUD_MODE_RX_HEADER,
-    QEMUD_MODE_RX_PAYLOAD,
-    QEMUD_MODE_TX_PACKET,
-    QEMUD_MODE_TLS_HANDSHAKE,
-};
-
-/* Whether we're passing reads & writes through a sasl SSF */
-enum qemud_sasl_ssf {
-    QEMUD_SASL_SSF_NONE = 0,
-    QEMUD_SASL_SSF_READ = 1,
-    QEMUD_SASL_SSF_WRITE = 2,
-};
-
-enum qemud_sock_type {
-    QEMUD_SOCK_TYPE_UNIX = 0,
-    QEMUD_SOCK_TYPE_TCP = 1,
-    QEMUD_SOCK_TYPE_TLS = 2,
-};
-
-/* Stores the per-client connection state */
-struct qemud_client {
-    int magic;
-
-    int fd;
-    int readonly;
-    enum qemud_mode mode;
-
-    struct sockaddr_storage addr;
-    socklen_t addrlen;
-
-    int type; /* qemud_sock_type */
-    gnutls_session_t tlssession;
-    int auth;
-#if HAVE_SASL
-    sasl_conn_t *saslconn;
-    int saslSSF;
-    const char *saslDecoded;
-    unsigned int saslDecodedLength;
-    unsigned int saslDecodedOffset;
-    const char *saslEncoded;
-    unsigned int saslEncodedLength;
-    unsigned int saslEncodedOffset;
-    char *saslUsername;
-#endif
-
-    unsigned int incomingSerial;
-    unsigned int outgoingSerial;
-
-    char buffer [REMOTE_MESSAGE_MAX];
-    unsigned int bufferLength;
-    unsigned int bufferOffset;
-
-    /* This is only valid if a remote open call has been made on this
-     * connection, otherwise it will be NULL.  Also if remote close is
-     * called, it will be set back to NULL if that succeeds.
-     */
-    virConnectPtr conn;
-
-    struct qemud_client *next;
-};
-
-#define QEMUD_CLIENT_MAGIC 0x7788aaee
-
-
-struct qemud_socket {
-    int fd;
-    int readonly;
-    int type; /* qemud_sock_type */
-    int auth;
-    int port;
-    struct qemud_socket *next;
-};
-
-/* Main server state */
-struct qemud_server {
-    int nsockets;
-    struct qemud_socket *sockets;
-    int nclients;
-    struct qemud_client *clients;
-    int sigread;
-    char logDir[PATH_MAX];
-    unsigned int shutdown : 1;
-#ifdef HAVE_AVAHI
-    struct libvirtd_mdns *mdns;
-#endif
-#if HAVE_SASL
-    char **saslUsernameWhitelist;
-#endif
-#if HAVE_POLKIT
-    DBusConnection *sysbus;
-#endif
-};
-
-void qemudLog(int priority, const char *fmt, ...)
-    ATTRIBUTE_FORMAT(printf,2,3);
-
-#ifdef ENABLE_DEBUG
-#define qemudDebug(...) qemudLog(QEMUD_DEBUG, __VA_ARGS__)
-#else
-#define qemudDebug(fmt, ...) do {} while(0)
-#endif
-
-void remoteDispatchClientRequest (struct qemud_server *server,
-                                  struct qemud_client *client);
-
-#if HAVE_POLKIT
-int qemudGetSocketIdentity(int fd, uid_t *uid, pid_t *pid);
-#endif
-
-#endif
Index: qemud/mdns.c
===================================================================
RCS file: /data/cvs/libvirt/qemud/mdns.c,v
retrieving revision 1.7
diff -u -r1.7 mdns.c
--- qemud/mdns.c	10 Apr 2008 16:53:29 -0000	1.7
+++ qemud/mdns.c	22 May 2008 17:01:15 -0000
@@ -37,10 +37,11 @@
 #include <avahi-common/error.h>
 #include <avahi-common/timeval.h>
 
+#include "internal.h"
+#include "qemud.h"
 #include "mdns.h"
 #include "event.h"
-#include "../src/remote_internal.h"
-#include "../src/internal.h"
+#include "remote_internal.h"
 
 #define AVAHI_DEBUG(fmt, ...) qemudDebug("AVAHI: " fmt, __VA_ARGS__)
 
Index: qemud/qemud.c
===================================================================
RCS file: /data/cvs/libvirt/qemud/qemud.c,v
retrieving revision 1.101
diff -u -r1.101 qemud.c
--- qemud/qemud.c	20 May 2008 16:17:36 -0000	1.101
+++ qemud/qemud.c	22 May 2008 17:01:16 -0000
@@ -48,13 +48,13 @@
 #include <grp.h>
 #include <signal.h>
 
-#include "libvirt/virterror.h"
-
 #include "internal.h"
+
+#include "qemud.h"
 #include "getaddrinfo.h"
-#include "../src/util.h"
-#include "../src/remote_internal.h"
-#include "../src/conf.h"
+#include "util.h"
+#include "remote_internal.h"
+#include "conf.h"
 #include "event.h"
 #ifdef HAVE_AVAHI
 #include "mdns.h"
Index: qemud/qemud.h
===================================================================
RCS file: qemud/qemud.h
diff -N qemud/qemud.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ qemud/qemud.h	22 May 2008 17:01:16 -0000
@@ -0,0 +1,186 @@
+/*
+ * internal.h: daemon data structure definitions
+ *
+ * Copyright (C) 2006, 2007 Red Hat, Inc.
+ * Copyright (C) 2006 Daniel P. Berrange
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Daniel P. Berrange <berrange at redhat.com>
+ */
+
+
+#ifndef QEMUD_INTERNAL_H__
+#define QEMUD_INTERNAL_H__
+
+#include <config.h>
+
+#include "socketcompat.h"
+
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+#include "../src/gnutls_1_0_compat.h"
+#if HAVE_SASL
+#include <sasl/sasl.h>
+#endif
+
+#ifdef HAVE_POLKIT
+#include <dbus/dbus.h>
+#endif
+
+#ifdef HAVE_SYS_SYSLIMITS_H
+#include <sys/syslimits.h>
+#endif
+
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include "remote_protocol.h"
+
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#endif
+#ifndef ATTRIBUTE_FORMAT
+#define ATTRIBUTE_FORMAT(args...) __attribute__((__format__ (args)))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#define ATTRIBUTE_FORMAT(...)
+#endif
+
+typedef enum {
+    QEMUD_ERR,
+    QEMUD_WARN,
+    QEMUD_INFO,
+#ifdef ENABLE_DEBUG
+    QEMUD_DEBUG
+#endif
+} qemudLogPriority;
+
+
+enum qemud_mode {
+    QEMUD_MODE_RX_HEADER,
+    QEMUD_MODE_RX_PAYLOAD,
+    QEMUD_MODE_TX_PACKET,
+    QEMUD_MODE_TLS_HANDSHAKE,
+};
+
+/* Whether we're passing reads & writes through a sasl SSF */
+enum qemud_sasl_ssf {
+    QEMUD_SASL_SSF_NONE = 0,
+    QEMUD_SASL_SSF_READ = 1,
+    QEMUD_SASL_SSF_WRITE = 2,
+};
+
+enum qemud_sock_type {
+    QEMUD_SOCK_TYPE_UNIX = 0,
+    QEMUD_SOCK_TYPE_TCP = 1,
+    QEMUD_SOCK_TYPE_TLS = 2,
+};
+
+/* Stores the per-client connection state */
+struct qemud_client {
+    int magic;
+
+    int fd;
+    int readonly;
+    enum qemud_mode mode;
+
+    struct sockaddr_storage addr;
+    socklen_t addrlen;
+
+    int type; /* qemud_sock_type */
+    gnutls_session_t tlssession;
+    int auth;
+#if HAVE_SASL
+    sasl_conn_t *saslconn;
+    int saslSSF;
+    const char *saslDecoded;
+    unsigned int saslDecodedLength;
+    unsigned int saslDecodedOffset;
+    const char *saslEncoded;
+    unsigned int saslEncodedLength;
+    unsigned int saslEncodedOffset;
+    char *saslUsername;
+#endif
+
+    unsigned int incomingSerial;
+    unsigned int outgoingSerial;
+
+    char buffer [REMOTE_MESSAGE_MAX];
+    unsigned int bufferLength;
+    unsigned int bufferOffset;
+
+    /* This is only valid if a remote open call has been made on this
+     * connection, otherwise it will be NULL.  Also if remote close is
+     * called, it will be set back to NULL if that succeeds.
+     */
+    virConnectPtr conn;
+
+    struct qemud_client *next;
+};
+
+#define QEMUD_CLIENT_MAGIC 0x7788aaee
+
+
+struct qemud_socket {
+    int fd;
+    int readonly;
+    int type; /* qemud_sock_type */
+    int auth;
+    int port;
+    struct qemud_socket *next;
+};
+
+/* Main server state */
+struct qemud_server {
+    int nsockets;
+    struct qemud_socket *sockets;
+    int nclients;
+    struct qemud_client *clients;
+    int sigread;
+    char logDir[PATH_MAX];
+    unsigned int shutdown : 1;
+#ifdef HAVE_AVAHI
+    struct libvirtd_mdns *mdns;
+#endif
+#if HAVE_SASL
+    char **saslUsernameWhitelist;
+#endif
+#if HAVE_POLKIT
+    DBusConnection *sysbus;
+#endif
+};
+
+void qemudLog(int priority, const char *fmt, ...)
+    ATTRIBUTE_FORMAT(printf,2,3);
+
+#ifdef ENABLE_DEBUG
+#define qemudDebug(...) qemudLog(QEMUD_DEBUG, __VA_ARGS__)
+#else
+#define qemudDebug(fmt, ...) do {} while(0)
+#endif
+
+void remoteDispatchClientRequest (struct qemud_server *server,
+                                  struct qemud_client *client);
+
+#if HAVE_POLKIT
+int qemudGetSocketIdentity(int fd, uid_t *uid, pid_t *pid);
+#endif
+
+#endif
Index: qemud/remote.c
===================================================================
RCS file: /data/cvs/libvirt/qemud/remote.c,v
retrieving revision 1.34
diff -u -r1.34 remote.c
--- qemud/remote.c	22 May 2008 15:20:25 -0000	1.34
+++ qemud/remote.c	22 May 2008 17:01:19 -0000
@@ -48,10 +48,8 @@
 #include <polkit-dbus/polkit-dbus.h>
 #endif
 
-#include "libvirt/virterror.h"
-
 #include "internal.h"
-#include "../src/internal.h"
+#include "qemud.h"
 
 #define DEBUG 0
 
Index: qemud/remote_protocol.c
===================================================================
RCS file: /data/cvs/libvirt/qemud/remote_protocol.c,v
retrieving revision 1.11
diff -u -r1.11 remote_protocol.c
--- qemud/remote_protocol.c	22 May 2008 15:20:25 -0000	1.11
+++ qemud/remote_protocol.c	22 May 2008 17:01:20 -0000
@@ -4,7 +4,7 @@
  */
 
 #include "remote_protocol.h"
-#include "libvirt/libvirt.h"
+#include "internal.h"
 
 bool_t
 xdr_remote_nonnull_string (XDR *xdrs, remote_nonnull_string *objp)
Index: qemud/remote_protocol.h
===================================================================
RCS file: /data/cvs/libvirt/qemud/remote_protocol.h,v
retrieving revision 1.12
diff -u -r1.12 remote_protocol.h
--- qemud/remote_protocol.h	22 May 2008 15:20:25 -0000	1.12
+++ qemud/remote_protocol.h	22 May 2008 17:01:21 -0000
@@ -13,7 +13,7 @@
 extern "C" {
 #endif
 
-#include "libvirt/libvirt.h"
+#include "internal.h"
 #define REMOTE_MESSAGE_MAX 262144
 #define REMOTE_STRING_MAX 65536
 
Index: qemud/remote_protocol.x
===================================================================
RCS file: /data/cvs/libvirt/qemud/remote_protocol.x,v
retrieving revision 1.12
diff -u -r1.12 remote_protocol.x
--- qemud/remote_protocol.x	22 May 2008 15:20:25 -0000	1.12
+++ qemud/remote_protocol.x	22 May 2008 17:01:22 -0000
@@ -36,7 +36,7 @@
  * 'REMOTE_'.  This makes names quite long.
  */
 
-%#include "libvirt/libvirt.h"
+%#include "internal.h"
 
 /*----- Data types. -----*/
 
Index: src/buf.c
===================================================================
RCS file: /data/cvs/libvirt/src/buf.c,v
retrieving revision 1.18
diff -u -r1.18 buf.c
--- src/buf.c	16 May 2008 09:37:44 -0000	1.18
+++ src/buf.c	22 May 2008 17:01:23 -0000
@@ -10,8 +10,6 @@
 
 #include <config.h>
 
-#include "libvirt/libvirt.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Index: src/libvirt.c
===================================================================
RCS file: /data/cvs/libvirt/src/libvirt.c,v
retrieving revision 1.141
diff -u -r1.141 libvirt.c
--- src/libvirt.c	22 May 2008 15:12:25 -0000	1.141
+++ src/libvirt.c	22 May 2008 17:01:26 -0000
@@ -10,7 +10,6 @@
  */
 
 #include <config.h>
-#include "libvirt/libvirt.h"
 
 #include <stdio.h>
 #include <stdlib.h>
Index: src/nodeinfo.c
===================================================================
RCS file: /data/cvs/libvirt/src/nodeinfo.c,v
retrieving revision 1.12
diff -u -r1.12 nodeinfo.c
--- src/nodeinfo.c	16 May 2008 09:37:44 -0000	1.12
+++ src/nodeinfo.c	22 May 2008 17:01:26 -0000
@@ -33,6 +33,7 @@
 #include <sys/utsname.h>
 #endif
 
+#include "internal.h"
 #include "nodeinfo.h"
 #include "physmem.h"
 #include "util.h"
Index: src/qemu_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/qemu_conf.c,v
retrieving revision 1.72
diff -u -r1.72 qemu_conf.c
--- src/qemu_conf.c	22 May 2008 16:27:21 -0000	1.72
+++ src/qemu_conf.c	22 May 2008 17:01:29 -0000
@@ -46,8 +46,7 @@
 #include <numa.h>
 #endif
 
-#include "libvirt/virterror.h"
-
+#include "internal.h"
 #include "qemu_conf.h"
 #include "uuid.h"
 #include "buf.h"
Index: src/qemu_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/qemu_driver.c,v
retrieving revision 1.80
diff -u -r1.80 qemu_driver.c
--- src/qemu_driver.c	22 May 2008 16:27:21 -0000	1.80
+++ src/qemu_driver.c	22 May 2008 17:01:32 -0000
@@ -54,8 +54,7 @@
 #include <sched.h>
 #endif
 
-#include "libvirt/virterror.h"
-
+#include "internal.h"
 #include "c-ctype.h"
 #include "event.h"
 #include "buf.h"
Index: src/stats_linux.c
===================================================================
RCS file: /data/cvs/libvirt/src/stats_linux.c,v
retrieving revision 1.14
diff -u -r1.14 stats_linux.c
--- src/stats_linux.c	16 May 2008 09:37:44 -0000	1.14
+++ src/stats_linux.c	22 May 2008 17:01:32 -0000
@@ -24,6 +24,7 @@
 #include <xs.h>
 #endif
 
+#include "internal.h"
 #include "util.h"
 #include "xen_unified.h"
 #include "stats_linux.h"
Index: src/storage_backend.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_backend.c,v
retrieving revision 1.12
diff -u -r1.12 storage_backend.c
--- src/storage_backend.c	10 Apr 2008 16:53:29 -0000	1.12
+++ src/storage_backend.c	22 May 2008 17:01:33 -0000
@@ -36,6 +36,9 @@
 #if HAVE_SELINUX
 #include <selinux/selinux.h>
 #endif
+
+#include "internal.h"
+
 #if WITH_STORAGE_LVM
 #include "storage_backend_logical.h"
 #endif
@@ -46,7 +49,6 @@
 #include "storage_backend_disk.h"
 #endif
 
-
 #include "util.h"
 
 #include "storage_backend.h"
Index: src/storage_backend_fs.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_backend_fs.c,v
retrieving revision 1.7
diff -u -r1.7 storage_backend_fs.c
--- src/storage_backend_fs.c	9 May 2008 08:06:50 -0000	1.7
+++ src/storage_backend_fs.c	22 May 2008 17:01:34 -0000
@@ -36,6 +36,7 @@
 #include <mntent.h>
 #include <string.h>
 
+#include "internal.h"
 #include "storage_backend_fs.h"
 #include "storage_conf.h"
 #include "util.h"
Index: src/storage_backend_iscsi.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_backend_iscsi.c,v
retrieving revision 1.5
diff -u -r1.5 storage_backend_iscsi.c
--- src/storage_backend_iscsi.c	10 Apr 2008 16:53:29 -0000	1.5
+++ src/storage_backend_iscsi.c	22 May 2008 17:01:34 -0000
@@ -34,6 +34,7 @@
 #include <unistd.h>
 #include <dirent.h>
 
+#include "internal.h"
 #include "storage_backend_iscsi.h"
 #include "util.h"
 
Index: src/storage_backend_logical.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_backend_logical.c,v
retrieving revision 1.4
diff -u -r1.4 storage_backend_logical.c
--- src/storage_backend_logical.c	10 Apr 2008 16:53:29 -0000	1.4
+++ src/storage_backend_logical.c	22 May 2008 17:01:34 -0000
@@ -31,6 +31,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#include "internal.h"
 #include "storage_backend_logical.h"
 #include "storage_conf.h"
 #include "util.h"
Index: src/storage_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_conf.c,v
retrieving revision 1.7
diff -u -r1.7 storage_conf.c
--- src/storage_conf.c	29 Apr 2008 19:43:57 -0000	1.7
+++ src/storage_conf.c	22 May 2008 17:01:36 -0000
@@ -23,9 +23,6 @@
 
 #include <config.h>
 
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
-
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
@@ -41,6 +38,7 @@
 #include <fcntl.h>
 #include <string.h>
 
+#include "internal.h"
 #include "storage_conf.h"
 #include "storage_backend.h"
 #include "xml.h"
Index: src/storage_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_driver.c,v
retrieving revision 1.6
diff -u -r1.6 storage_driver.c
--- src/storage_driver.c	13 May 2008 06:30:58 -0000	1.6
+++ src/storage_driver.c	22 May 2008 17:01:36 -0000
@@ -32,6 +32,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include "internal.h"
 #include "driver.h"
 #include "util.h"
 #include "storage_driver.h"
Index: src/util.c
===================================================================
RCS file: /data/cvs/libvirt/src/util.c,v
retrieving revision 1.39
diff -u -r1.39 util.c
--- src/util.c	16 May 2008 09:37:44 -0000	1.39
+++ src/util.c	22 May 2008 17:01:37 -0000
@@ -43,7 +43,6 @@
 #include <paths.h>
 #endif
 
-#include "libvirt/virterror.h"
 #include "internal.h"
 #include "event.h"
 #include "buf.h"
Index: src/util.h
===================================================================
RCS file: /data/cvs/libvirt/src/util.h,v
retrieving revision 1.18
diff -u -r1.18 util.h
--- src/util.h	9 May 2008 16:41:20 -0000	1.18
+++ src/util.h	22 May 2008 17:01:37 -0000
@@ -24,7 +24,6 @@
 #ifndef __VIR_UTIL_H__
 #define __VIR_UTIL_H__
 
-#include "internal.h"
 #include "util-lib.h"
 
 int virExec(virConnectPtr conn, char **argv, int *retpid,
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.152
diff -u -r1.152 virsh.c
--- src/virsh.c	21 May 2008 20:53:31 -0000	1.152
+++ src/virsh.c	22 May 2008 17:01:41 -0000
@@ -15,8 +15,6 @@
 
 #include <config.h>
 
-#include "libvirt/libvirt.h"
-#include "libvirt/virterror.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,7 +33,6 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <inttypes.h>
-#include <test.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
@@ -46,6 +43,7 @@
 #include <readline/history.h>
 #endif
 
+#include "internal.h"
 #include "buf.h"
 #include "console.h"
 #include "util.h"
Index: src/virterror.c
===================================================================
RCS file: /data/cvs/libvirt/src/virterror.c,v
retrieving revision 1.44
diff -u -r1.44 virterror.c
--- src/virterror.c	10 Apr 2008 16:54:54 -0000	1.44
+++ src/virterror.c	22 May 2008 17:01:42 -0000
@@ -14,9 +14,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
-#include "libvirt/libvirt.h"
-#include "libvirt/virterror.h"
+
 #include "internal.h"
+#include "libvirt/virterror.h"
 
 virError __lastErr =       /* the last error */
   { .code = 0, .domain = 0, .message = NULL, .level = VIR_ERR_NONE,
Index: src/xend_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xend_internal.c,v
retrieving revision 1.191
diff -u -r1.191 xend_internal.c
--- src/xend_internal.c	15 May 2008 14:21:34 -0000	1.191
+++ src/xend_internal.c	22 May 2008 17:01:45 -0000
@@ -32,7 +32,7 @@
 #include <libxml/uri.h>
 #include <errno.h>
 
-#include "libvirt/libvirt.h"
+#include "internal.h"
 #include "driver.h"
 #include "util.h"
 #include "sexpr.h"
Index: src/xml.c
===================================================================
RCS file: /data/cvs/libvirt/src/xml.c,v
retrieving revision 1.127
diff -u -r1.127 xml.c
--- src/xml.c	22 May 2008 16:27:21 -0000	1.127
+++ src/xml.c	22 May 2008 17:01:46 -0000
@@ -10,8 +10,6 @@
 
 #include <config.h>
 
-#include "libvirt/libvirt.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Index: tests/reconnect.c
===================================================================
RCS file: /data/cvs/libvirt/tests/reconnect.c,v
retrieving revision 1.9
diff -u -r1.9 reconnect.c
--- tests/reconnect.c	10 Apr 2008 16:54:54 -0000	1.9
+++ tests/reconnect.c	22 May 2008 17:01:46 -0000
@@ -3,8 +3,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "libvirt/libvirt.h"
-#include "libvirt/virterror.h"
 #include "internal.h"
 
 static void errorHandler(void *userData ATTRIBUTE_UNUSED,
Index: tests/xmlrpctest.c
===================================================================
RCS file: /data/cvs/libvirt/tests/xmlrpctest.c,v
retrieving revision 1.13
diff -u -r1.13 xmlrpctest.c
--- tests/xmlrpctest.c	14 May 2008 19:51:24 -0000	1.13
+++ tests/xmlrpctest.c	22 May 2008 17:01:46 -0000
@@ -21,7 +21,7 @@
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
 
-#include "libvirt/libvirt.h"
+#include "internal.h"
 #include "buf.h"
 #include "xmlrpc.h"
 


More information about the libvir-list mailing list