[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 3/4] Rename hash.h and hash.c to virhash.h and virhash.c



From: "Daniel P. Berrange" <berrange redhat com>

In preparation for the patch to include Murmurhash3, which
introduces a virhashcode.h and virhashcode.c files, rename
the existing hash.h and hash.c to virhash.h and virhash.c
respectively.
---
 po/POTFILES.in                      |    2 +-
 src/Makefile.am                     |    2 +-
 src/conf/domain_conf.h              |    2 +-
 src/conf/nwfilter_conf.h            |    2 +-
 src/conf/nwfilter_params.h          |    2 +-
 src/cpu/cpu_generic.c               |    2 +-
 src/qemu/qemu_monitor.h             |    2 +-
 src/qemu/qemu_monitor_text.h        |    1 -
 src/uml/uml_conf.h                  |    2 +-
 src/util/cgroup.c                   |    2 +-
 src/util/{hash.c => virhash.c}      |    2 +-
 src/util/{hash.h => virhash.h}      |    0
 src/xen/xen_driver.h                |    2 +-
 src/xen/xm_internal.c               |    2 +-
 tests/Makefile.am                   |   10 +++++-----
 tests/{hashdata.h => virhashdata.h} |    0
 tests/{hashtest.c => virhashtest.c} |    4 ++--
 17 files changed, 19 insertions(+), 20 deletions(-)
 rename src/util/{hash.c => virhash.c} (99%)
 rename src/util/{hash.h => virhash.h} (100%)
 rename tests/{hashdata.h => virhashdata.h} (100%)
 rename tests/{hashtest.c => virhashtest.c} (99%)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0126320..674d6df 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -110,7 +110,6 @@ src/util/command.c
 src/util/conf.c
 src/util/dnsmasq.c
 src/util/event_poll.c
-src/util/hash.c
 src/util/hooks.c
 src/util/hostusb.c
 src/util/iohelper.c
@@ -126,6 +125,7 @@ src/util/sysinfo.c
 src/util/util.c
 src/util/viraudit.c
 src/util/virfile.c
+src/util/virhash.c
 src/util/virnetdev.c
 src/util/virnetdevbridge.c
 src/util/virnetdevmacvlan.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 4629700..eacc741 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,7 +60,6 @@ UTIL_SOURCES =							\
 		util/cgroup.c util/cgroup.h			\
 		util/event.c util/event.h			\
 		util/event_poll.c util/event_poll.h		\
-		util/hash.c util/hash.h				\
 		util/hooks.c util/hooks.h			\
 		util/iptables.c util/iptables.h			\
 		util/ebtables.c util/ebtables.h			\
@@ -90,6 +89,7 @@ UTIL_SOURCES =							\
 		util/virtypedparam.c util/virtypedparam.h	\
 		util/xml.c util/xml.h				\
 		util/virterror.c util/virterror_internal.h	\
+		util/virhash.c util/virhash.h			\
 		util/virkeycode.c util/virkeycode.h		\
 		util/virkeymaps.h				\
 		util/virnetdev.h util/virnetdev.c		\
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 3b522a9..7a8f12d 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -34,7 +34,7 @@
 # include "cpu_conf.h"
 # include "util.h"
 # include "threads.h"
-# include "hash.h"
+# include "virhash.h"
 # include "virsocketaddr.h"
 # include "nwfilter_params.h"
 # include "nwfilter_conf.h"
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 4331ab1..3cb4b82 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -32,7 +32,7 @@
 # include "internal.h"
 
 # include "util.h"
-# include "hash.h"
+# include "virhash.h"
 # include "xml.h"
 # include "buf.h"
 # include "virsocketaddr.h"
diff --git a/src/conf/nwfilter_params.h b/src/conf/nwfilter_params.h
index fa8f770..eab46ec 100644
--- a/src/conf/nwfilter_params.h
+++ b/src/conf/nwfilter_params.h
@@ -23,7 +23,7 @@
 #ifndef NWFILTER_PARAMS_H
 # define NWFILTER_PARAMS_H
 
-# include "hash.h"
+# include "virhash.h"
 # include "buf.h"
 
 enum virNWFilterVarValueType {
diff --git a/src/cpu/cpu_generic.c b/src/cpu/cpu_generic.c
index a98b109..2a31b49 100644
--- a/src/cpu/cpu_generic.c
+++ b/src/cpu/cpu_generic.c
@@ -25,7 +25,7 @@
 #include <config.h>
 
 #include "memory.h"
-#include "hash.h"
+#include "virhash.h"
 #include "cpu.h"
 #include "cpu_generic.h"
 
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 15acf8b..88ce303 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -29,7 +29,7 @@
 
 # include "domain_conf.h"
 # include "qemu_conf.h"
-# include "hash.h"
+# include "virhash.h"
 
 typedef struct _qemuMonitor qemuMonitor;
 typedef qemuMonitor *qemuMonitorPtr;
diff --git a/src/qemu/qemu_monitor_text.h b/src/qemu/qemu_monitor_text.h
index dee2980..47a946d 100644
--- a/src/qemu/qemu_monitor_text.h
+++ b/src/qemu/qemu_monitor_text.h
@@ -28,7 +28,6 @@
 # include "internal.h"
 
 # include "qemu_monitor.h"
-# include "hash.h"
 
 int qemuMonitorTextIOProcess(qemuMonitorPtr mon,
                              const char *data,
diff --git a/src/uml/uml_conf.h b/src/uml/uml_conf.h
index 383ae66..f942116 100644
--- a/src/uml/uml_conf.h
+++ b/src/uml/uml_conf.h
@@ -32,7 +32,7 @@
 # include "virterror_internal.h"
 # include "threads.h"
 # include "command.h"
-# include "hash.h"
+# include "virhash.h"
 
 # define umlDebug(fmt, ...) do {} while(0)
 
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index a270965..7d7570a 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -32,7 +32,7 @@
 #include "cgroup.h"
 #include "logging.h"
 #include "virfile.h"
-#include "hash.h"
+#include "virhash.h"
 
 #define CGROUP_MAX_VAL 512
 
diff --git a/src/util/hash.c b/src/util/virhash.c
similarity index 99%
rename from src/util/hash.c
rename to src/util/virhash.c
index 20d3a12..7294c7e 100644
--- a/src/util/hash.c
+++ b/src/util/virhash.c
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 
 #include "virterror_internal.h"
-#include "hash.h"
+#include "virhash.h"
 #include "memory.h"
 #include "logging.h"
 
diff --git a/src/util/hash.h b/src/util/virhash.h
similarity index 100%
rename from src/util/hash.h
rename to src/util/virhash.h
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index 4122378..3cefea3 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -20,7 +20,7 @@
 #  include "xen_inotify.h"
 # endif
 # include "domain_event.h"
-# include "hash.h"
+# include "virhash.h"
 
 # ifndef HAVE_WINSOCK2_H
 #  include <sys/un.h>
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 9c376fb..a34e906 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -42,7 +42,7 @@
 #include "xend_internal.h"
 #include "xen_sxpr.h"
 #include "xen_xm.h"
-#include "hash.h"
+#include "virhash.h"
 #include "buf.h"
 #include "uuid.h"
 #include "util.h"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f3b0c09..ed47779 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -95,7 +95,7 @@ EXTRA_DIST =		\
 check_PROGRAMS = virshtest conftest sockettest \
 	nodeinfotest qparamtest virbuftest \
 	commandtest commandhelper seclabeltest \
-	hashtest virnetmessagetest virnetsockettest ssh \
+	virhashtest virnetmessagetest virnetsockettest ssh \
 	utiltest virnettlscontexttest shunloadtest \
 	virtimetest
 
@@ -214,7 +214,7 @@ TESTS = virshtest \
 	sockettest \
 	commandtest \
 	seclabeltest \
-	hashtest \
+	virhashtest \
 	virnetmessagetest \
 	virnetsockettest \
 	virnettlscontexttest \
@@ -515,9 +515,9 @@ virbuftest_SOURCES = \
 	virbuftest.c testutils.h testutils.c
 virbuftest_LDADD = $(LDADDS)
 
-hashtest_SOURCES = \
-	hashtest.c hashdata.h testutils.h testutils.c
-hashtest_LDADD = $(LDADDS)
+virhashtest_SOURCES = \
+	virhashtest.c virhashdata.h testutils.h testutils.c
+virhashtest_LDADD = $(LDADDS)
 
 jsontest_SOURCES = \
 	jsontest.c testutils.h testutils.c
diff --git a/tests/hashdata.h b/tests/virhashdata.h
similarity index 100%
rename from tests/hashdata.h
rename to tests/virhashdata.h
diff --git a/tests/hashtest.c b/tests/virhashtest.c
similarity index 99%
rename from tests/hashtest.c
rename to tests/virhashtest.c
index 441672c..70d0452 100644
--- a/tests/hashtest.c
+++ b/tests/virhashtest.c
@@ -6,8 +6,8 @@
 #include <time.h>
 
 #include "internal.h"
-#include "hash.h"
-#include "hashdata.h"
+#include "virhash.h"
+#include "virhashdata.h"
 #include "testutils.h"
 #include "memory.h"
 
-- 
1.7.7.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]