From 556cf5f617ed4742a0ccc1fa23fc7e29d696ec00 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 13 Dec 2012 18:13:21 +0000 Subject: [PATCH] Rename xml.{c,h} to virxml.{c,h} --- cfg.mk | 2 +- po/POTFILES.in | 2 +- src/Makefile.am | 2 +- src/conf/cpu_conf.h | 2 +- src/conf/device_conf.c | 2 +- src/conf/domain_conf.c | 2 +- src/conf/interface_conf.c | 2 +- src/conf/netdev_bandwidth_conf.h | 2 +- src/conf/netdev_vlan_conf.h | 2 +- src/conf/netdev_vport_profile_conf.h | 2 +- src/conf/network_conf.c | 2 +- src/conf/node_device_conf.c | 2 +- src/conf/nwfilter_conf.h | 2 +- src/conf/secret_conf.c | 2 +- src/conf/snapshot_conf.c | 2 +- src/conf/storage_conf.c | 2 +- src/conf/storage_encryption_conf.c | 2 +- src/cpu/cpu.c | 2 +- src/cpu/cpu_map.h | 2 +- src/esx/esx_vi.c | 2 +- src/qemu/qemu_conf.c | 2 +- src/qemu/qemu_driver.c | 2 +- src/security/virt-aa-helper.c | 2 +- src/storage/storage_backend_fs.c | 2 +- src/test/test_driver.c | 2 +- src/util/{xml.c => virxml.c} | 4 ++-- src/util/{xml.h => virxml.h} | 20 +++++++++++++++++++- src/xen/xen_driver.c | 2 +- tests/cputest.c | 2 +- tests/nwfilterxml2xmltest.c | 2 +- tests/sexpr2xmltest.c | 2 +- tests/virshtest.c | 2 +- tests/xencapstest.c | 2 +- tools/virsh-domain-monitor.c | 2 +- tools/virsh-domain.c | 2 +- tools/virsh-host.c | 2 +- tools/virsh-interface.c | 2 +- tools/virsh-network.c | 2 +- tools/virsh-nodedev.c | 2 +- tools/virsh-nwfilter.c | 2 +- tools/virsh-pool.c | 2 +- tools/virsh-secret.c | 2 +- tools/virsh-snapshot.c | 2 +- tools/virsh-volume.c | 2 +- tools/virsh.c | 2 +- 45 files changed, 64 insertions(+), 46 deletions(-) rename src/util/{xml.c => virxml.c} (99%) rename src/util/{xml.h => virxml.h} (87%) diff --git a/cfg.mk b/cfg.mk index 289567f77b..38d72e839c 100644 --- a/cfg.mk +++ b/cfg.mk @@ -809,7 +809,7 @@ exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virutil\.c$$ exclude_file_name_regexp--sc_prohibit_strtol = \ ^src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c$$ -exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$ +exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$ exclude_file_name_regexp--sc_prohibit_xmlURI = ^src/util/viruri\.c$$ diff --git a/po/POTFILES.in b/po/POTFILES.in index 2cda7a9c22..34290e114d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -181,7 +181,7 @@ src/util/virtypedparam.c src/util/viruri.c src/util/virusb.c src/util/virutil.c -src/util/xml.c +src/util/virxml.c src/vbox/vbox_MSCOMGlue.c src/vbox/vbox_XPCOMCGlue.c src/vbox/vbox_driver.c diff --git a/src/Makefile.am b/src/Makefile.am index e8fd56ec18..7ebfabeedb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -86,7 +86,6 @@ UTIL_SOURCES = \ util/virthreadwin32.h \ util/virthreadpool.c util/virthreadpool.h \ util/virtypedparam.c util/virtypedparam.h \ - util/xml.c util/xml.h \ util/virterror.c util/virterror_internal.h \ util/vircgroup.c util/vircgroup.h \ util/virdbus.c util/virdbus.h \ @@ -116,6 +115,7 @@ UTIL_SOURCES = \ util/viruri.h util/viruri.c \ util/virutil.c util/virutil.h \ util/viruuid.c util/viruuid.h \ + util/virxml.c util/virxml.h \ $(NULL) EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \ diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h index 12865b434d..23ea455a2d 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -26,7 +26,7 @@ # include "virutil.h" # include "virbuffer.h" -# include "xml.h" +# include "virxml.h" # include "virbitmap.h" # include "virarch.h" diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index ecfaf30840..45ecb28776 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -24,7 +24,7 @@ #include "virterror_internal.h" #include "datatypes.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #include "virutil.h" #include "virbuffer.h" diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a807c4d03e..f979cfcb6d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -36,7 +36,7 @@ #include "snapshot_conf.h" #include "viralloc.h" #include "verify.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #include "virutil.h" #include "virbuffer.h" diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 6a53bda0eb..38672746ca 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -28,7 +28,7 @@ #include "interface_conf.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #include "virutil.h" #include "virbuffer.h" diff --git a/src/conf/netdev_bandwidth_conf.h b/src/conf/netdev_bandwidth_conf.h index 216a540c6d..23aaaf319a 100644 --- a/src/conf/netdev_bandwidth_conf.h +++ b/src/conf/netdev_bandwidth_conf.h @@ -26,7 +26,7 @@ # include "internal.h" # include "virnetdevbandwidth.h" # include "virbuffer.h" -# include "xml.h" +# include "virxml.h" virNetDevBandwidthPtr virNetDevBandwidthParse(xmlNodePtr node, int net_type) diff --git a/src/conf/netdev_vlan_conf.h b/src/conf/netdev_vlan_conf.h index 19b50ccdbc..480d6c6204 100644 --- a/src/conf/netdev_vlan_conf.h +++ b/src/conf/netdev_vlan_conf.h @@ -25,7 +25,7 @@ # include "internal.h" # include "virnetdevvlan.h" # include "virbuffer.h" -# include "xml.h" +# include "virxml.h" int virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr def); int virNetDevVlanFormat(virNetDevVlanPtr def, virBufferPtr buf); diff --git a/src/conf/netdev_vport_profile_conf.h b/src/conf/netdev_vport_profile_conf.h index 15ecbd6865..a70256dc7e 100644 --- a/src/conf/netdev_vport_profile_conf.h +++ b/src/conf/netdev_vport_profile_conf.h @@ -26,7 +26,7 @@ # include "internal.h" # include "virnetdevvportprofile.h" # include "virbuffer.h" -# include "xml.h" +# include "virxml.h" typedef enum { /* generate random defaults for interfaceID/interfaceID diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 01a6f2e3e9..2bd04c510a 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -38,7 +38,7 @@ #include "netdev_bandwidth_conf.h" #include "netdev_vlan_conf.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #include "virutil.h" #include "virbuffer.h" diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 67d743ec56..3c68011b73 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -32,7 +32,7 @@ #include "node_device_conf.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "virutil.h" #include "virbuffer.h" #include "viruuid.h" diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 2ca44b34d8..ca2c070218 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -30,7 +30,7 @@ # include "virutil.h" # include "virhash.h" -# include "xml.h" +# include "virxml.h" # include "virbuffer.h" # include "virsocketaddr.h" # include "virmacaddr.h" diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index 2abb95a9e6..46d2ae51bc 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -30,7 +30,7 @@ #include "secret_conf.h" #include "virterror_internal.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #define VIR_FROM_THIS VIR_FROM_SECRET diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 3ad74d6a05..f7f8f63303 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -46,7 +46,7 @@ #include "viruuid.h" #include "virfile.h" #include "virterror_internal.h" -#include "xml.h" +#include "virxml.h" #define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 4239e493ae..04b25812ab 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -38,7 +38,7 @@ #include "storage_conf.h" #include "virstoragefile.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #include "virbuffer.h" #include "virutil.h" diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c index 8ea54fafab..35e9da4ab2 100644 --- a/src/conf/storage_encryption_conf.c +++ b/src/conf/storage_encryption_conf.c @@ -32,7 +32,7 @@ #include "storage_conf.h" #include "storage_encryption_conf.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" #include "virterror_internal.h" #include "viruuid.h" #include "virfile.h" diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 302629dd6a..6beab5508c 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -25,7 +25,7 @@ #include "virlog.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "cpu.h" #include "cpu_x86.h" #include "cpu_powerpc.h" diff --git a/src/cpu/cpu_map.h b/src/cpu/cpu_map.h index 912051342f..8d27bcd372 100644 --- a/src/cpu/cpu_map.h +++ b/src/cpu/cpu_map.h @@ -24,7 +24,7 @@ #ifndef __VIR_CPU_MAP_H__ # define __VIR_CPU_MAP_H__ -# include "xml.h" +# include "virxml.h" enum cpuMapElement { diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 92ac8f86c1..99c1eb1e0f 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -32,7 +32,7 @@ #include "virutil.h" #include "viruuid.h" #include "vmx.h" -#include "xml.h" +#include "virxml.h" #include "esx_vi.h" #include "esx_vi_methods.h" #include "esx_util.h" diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 8a21703643..ed18ac6eea 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -45,7 +45,7 @@ #include "virutil.h" #include "viralloc.h" #include "datatypes.h" -#include "xml.h" +#include "virxml.h" #include "nodeinfo.h" #include "virlog.h" #include "cpu/cpu.h" diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3832a6c5c2..5b9fcf7f0c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -75,7 +75,7 @@ #include "virusb.h" #include "virprocess.h" #include "libvirt_internal.h" -#include "xml.h" +#include "virxml.h" #include "cpu/cpu.h" #include "virsysinfo.h" #include "domain_nwfilter.h" diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 900e284101..0aa978e0fd 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -48,7 +48,7 @@ #include "security_driver.h" #include "security_apparmor.h" #include "domain_conf.h" -#include "xml.h" +#include "virxml.h" #include "viruuid.h" #include "virusb.h" #include "virpci.h" diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index b744fb421b..23fa0f5b96 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -47,7 +47,7 @@ #include "virstoragefile.h" #include "vircommand.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "virfile.h" #include "virlog.h" diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1f2718c018..4716e41fce 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -46,7 +46,7 @@ #include "domain_event.h" #include "storage_conf.h" #include "node_device_conf.h" -#include "xml.h" +#include "virxml.h" #include "virthread.h" #include "virlog.h" #include "virfile.h" diff --git a/src/util/xml.c b/src/util/virxml.c similarity index 99% rename from src/util/xml.c rename to src/util/virxml.c index 05c7f331d6..7986d232d7 100644 --- a/src/util/xml.c +++ b/src/util/virxml.c @@ -1,5 +1,5 @@ /* - * xml.c: XML based interfaces for the libvir library + * virxml.c: helper APIs for dealing with XML documents * * Copyright (C) 2005, 2007-2012 Red Hat, Inc. * @@ -31,7 +31,7 @@ #include #include "virterror_internal.h" -#include "xml.h" +#include "virxml.h" #include "virbuffer.h" #include "virutil.h" #include "viralloc.h" diff --git a/src/util/xml.h b/src/util/virxml.h similarity index 87% rename from src/util/xml.h rename to src/util/virxml.h index c3b05dfdc7..364288dd55 100644 --- a/src/util/xml.h +++ b/src/util/virxml.h @@ -1,5 +1,23 @@ /* - * xml.h: internal definitions used for XML parsing routines. + * virxml.c: helper APIs for dealing with XML documents + * + * Copyright (C) 2005, 2007-2012 Red Hat, Inc. + * + * 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, see + * . + * + * Daniel Veillard */ #ifndef __VIR_XML_H__ diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 4cbe827bdf..c35695a477 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -53,7 +53,7 @@ #if WITH_XEN_INOTIFY # include "xen_inotify.h" #endif -#include "xml.h" +#include "virxml.h" #include "virutil.h" #include "viralloc.h" #include "node_device_conf.h" diff --git a/tests/cputest.c b/tests/cputest.c index 62994094d1..ab96824b98 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -31,7 +31,7 @@ #include #include "internal.h" -#include "xml.h" +#include "virxml.h" #include "viralloc.h" #include "virbuffer.h" #include "testutils.h" diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c index 8c29a46b69..a215bf8ab7 100644 --- a/tests/nwfilterxml2xmltest.c +++ b/tests/nwfilterxml2xmltest.c @@ -10,7 +10,7 @@ #include "internal.h" #include "testutils.h" -#include "xml.h" +#include "virxml.h" #include "virthread.h" #include "nwfilter_params.h" #include "nwfilter_conf.h" diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index 9b9b09d5d3..07f6f8eb45 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -5,7 +5,7 @@ #include #include "internal.h" -#include "xml.h" +#include "virxml.h" #include "datatypes.h" #include "xen/xen_driver.h" #include "xen/xend_internal.h" diff --git a/tests/virshtest.c b/tests/virshtest.c index 8741d47c47..b82a4c4901 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -5,7 +5,7 @@ #include #include "internal.h" -#include "xml.h" +#include "virxml.h" #include "virutil.h" #include "testutils.h" diff --git a/tests/xencapstest.c b/tests/xencapstest.c index c94d5c5c74..b8ad831973 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -6,7 +6,7 @@ #include #include "internal.h" -#include "xml.h" +#include "virxml.h" #include "testutils.h" #include "xen/xen_hypervisor.h" #include "virfile.h" diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index a44398849c..f4940faf91 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -37,7 +37,7 @@ #include "viralloc.h" #include "virmacaddr.h" #include "virsh-domain.h" -#include "xml.h" +#include "virxml.h" static const char * vshDomainIOErrorToString(int error) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 244ffb8204..3a9cebe548 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -51,7 +51,7 @@ #include "virsh-domain-monitor.h" #include "virterror_internal.h" #include "virtypedparam.h" -#include "xml.h" +#include "virxml.h" /* Gnulib doesn't guarantee SA_SIGINFO support. */ #ifndef SA_SIGINFO diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 0ad4296eaf..45b89a853c 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -36,7 +36,7 @@ #include "viralloc.h" #include "virutil.h" #include "virsh-domain.h" -#include "xml.h" +#include "virxml.h" #include "virtypedparam.h" #include "virjson.h" diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index ea8a6c5500..cd14e89170 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -35,7 +35,7 @@ #include "virbuffer.h" #include "viralloc.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" virInterfacePtr vshCommandOptInterfaceBy(vshControl *ctl, const vshCmd *cmd, diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 918dee6885..c9cd15a944 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -35,7 +35,7 @@ #include "virbuffer.h" #include "viralloc.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" #include "conf/network_conf.h" virNetworkPtr diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 974e495b30..f9517ccd85 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -35,7 +35,7 @@ #include "virbuffer.h" #include "viralloc.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" #include "conf/node_device_conf.h" /* diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c index 1480d133b6..9341ea793d 100644 --- a/tools/virsh-nwfilter.c +++ b/tools/virsh-nwfilter.c @@ -35,7 +35,7 @@ #include "virbuffer.h" #include "viralloc.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" virNWFilterPtr vshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *cmd, diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index b3177e0c42..adac7f1e15 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -35,7 +35,7 @@ #include "virbuffer.h" #include "viralloc.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" #include "conf/storage_conf.h" virStoragePoolPtr diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index a29454ff27..829774315f 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -36,7 +36,7 @@ #include "virbuffer.h" #include "viralloc.h" #include "virutil.h" -#include "xml.h" +#include "virxml.h" static virSecretPtr vshCommandOptSecret(vshControl *ctl, const vshCmd *cmd, const char **name) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 8428282158..3b179e2676 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -38,7 +38,7 @@ #include "viralloc.h" #include "virutil.h" #include "virsh-domain.h" -#include "xml.h" +#include "virxml.h" #include "conf/snapshot_conf.h" /* Helper for snapshot-create and snapshot-create-as */ diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 6f2c5910fe..a57fc28245 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -39,7 +39,7 @@ #include "virutil.h" #include "virfile.h" #include "virsh-pool.h" -#include "xml.h" +#include "virxml.h" virStorageVolPtr vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd, diff --git a/tools/virsh.c b/tools/virsh.c index bfeaaa14d6..790cf567e1 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -60,7 +60,7 @@ #include "console.h" #include "virutil.h" #include "viralloc.h" -#include "xml.h" +#include "virxml.h" #include "libvirt/libvirt-qemu.h" #include "virfile.h" #include "configmake.h"