From 6c7c7ebef2fc5b16c3de10d7d28ab902a2b47a10f895fb0f71dc86c0000f2fee Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 13 Oct 2009 22:32:12 +0000 Subject: [PATCH 01/12] Add ocfs2 to list of supported fs pool types, fate#307387 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=16 --- fs-ocfs2.patch | 25 +++++++++++++++++++++++++ libvirt.changes | 6 ++++++ libvirt.spec | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 fs-ocfs2.patch diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch new file mode 100644 index 0000000..1ea733d --- /dev/null +++ b/fs-ocfs2.patch @@ -0,0 +1,25 @@ +Index: libvirt-0.7.1/src/storage_conf.c +=================================================================== +--- libvirt-0.7.1.orig/src/storage_conf.c ++++ libvirt-0.7.1/src/storage_conf.c +@@ -59,7 +59,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy + VIR_STORAGE_POOL_FS_LAST, + "auto", "ext2", "ext3", + "ext4", "ufs", "iso9660", "udf", +- "gfs", "gfs2", "vfat", "hfs+", "xfs") ++ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2") + + VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, + VIR_STORAGE_POOL_NETFS_LAST, +Index: libvirt-0.7.1/src/storage_conf.h +=================================================================== +--- libvirt-0.7.1.orig/src/storage_conf.h ++++ libvirt-0.7.1/src/storage_conf.h +@@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { + VIR_STORAGE_POOL_FS_VFAT, + VIR_STORAGE_POOL_FS_HFSPLUS, + VIR_STORAGE_POOL_FS_XFS, ++ VIR_STORAGE_POOL_FS_OCFS2, + VIR_STORAGE_POOL_FS_LAST, + }; + VIR_ENUM_DECL(virStoragePoolFormatFileSystem) diff --git a/libvirt.changes b/libvirt.changes index e2e6164..b4c5d4f 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 13 16:28:03 MDT 2009 - jfehlig@novell.com + +- Add ocfs2 to list of supported fs pool types + fate#307387 + ------------------------------------------------------------------- Mon Oct 12 22:39:42 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 3a24ac3..7a432f5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -95,6 +95,7 @@ Patch0: devmap-no-pkgconfig.patch Patch1: xen-refcnt.patch Patch2: vshdeinit-recurse.patch Patch3: msg-proc-memleak.patch +Patch4: fs-ocfs2.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -200,6 +201,7 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch100 -p1 %patch101 %patch102 -p1 From 2cc3eff3e3fd8b8c0a665bd8935309aab2267c25aa49b763c20f2bf6aa4427a0 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 14 Oct 2009 22:40:24 +0000 Subject: [PATCH 02/12] OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=17 --- clone.patch | 6 +- detach-disk.patch | 18 +- fs-ocfs2.patch | 12 +- libvirt-0.7.1.tar.bz2 | 3 - libvirt-0.7.2.tar.bz2 | 3 + libvirt.spec | 24 +- libvirtd-defaults.patch | 12 +- migrate-params.patch | 6 +- msg-proc-memleak.patch | 48 - socat.patch | 6 +- suse-network.patch | 18 +- vshdeinit-recurse.patch | 1882 --------------------------------------- xen-pv-cdrom.patch | 6 +- xen-refcnt.patch | 41 - 14 files changed, 56 insertions(+), 2029 deletions(-) delete mode 100644 libvirt-0.7.1.tar.bz2 create mode 100644 libvirt-0.7.2.tar.bz2 delete mode 100644 msg-proc-memleak.patch delete mode 100644 vshdeinit-recurse.patch delete mode 100644 xen-refcnt.patch diff --git a/clone.patch b/clone.patch index 77a6481..7c92647 100644 --- a/clone.patch +++ b/clone.patch @@ -1,7 +1,7 @@ -Index: src/lxc_container.c +Index: src/lxc/lxc_container.c =================================================================== ---- src/lxc_container.c.orig -+++ src/lxc_container.c +--- src/lxc/lxc_container.c.orig ++++ src/lxc/lxc_container.c @@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de lxc_child_argv_t args = { def, nveths, veths, control, ttyPath }; diff --git a/detach-disk.patch b/detach-disk.patch index d6df91f..c62b2e5 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/src/xend_internal.c +Index: libvirt-0.7.1/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xend_internal.c -+++ libvirt-0.7.1/src/xend_internal.c +--- libvirt-0.7.1.orig/src/xen/xend_internal.c ++++ libvirt-0.7.1/src/xen/xend_internal.c @@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain, return -1; xenUnifiedLock(priv); @@ -11,10 +11,10 @@ Index: libvirt-0.7.1/src/xend_internal.c xenUnifiedUnlock(priv); if (xref == NULL) return -1; -Index: libvirt-0.7.1/src/xs_internal.c +Index: libvirt-0.7.1/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.c -+++ libvirt-0.7.1/src/xs_internal.c +--- libvirt-0.7.1.orig/src/xen/xs_internal.c ++++ libvirt-0.7.1/src/xen/xs_internal.c @@ -966,7 +966,8 @@ xenStoreDomainGetNetworkID(virConnectPtr * freed by the caller. */ @@ -34,10 +34,10 @@ Index: libvirt-0.7.1/src/xs_internal.c list = xs_directory(priv->xshandle, 0, dir, &num); if (list != NULL) { for (i = 0; i < num; i++) { -Index: libvirt-0.7.1/src/xs_internal.h +Index: libvirt-0.7.1/src/xen/xs_internal.h =================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.h -+++ libvirt-0.7.1/src/xs_internal.h +--- libvirt-0.7.1.orig/src/xen/xs_internal.h ++++ libvirt-0.7.1/src/xen/xs_internal.h @@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo const char *mac); char * xenStoreDomainGetDiskID(virConnectPtr conn, diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch index 1ea733d..36ec839 100644 --- a/fs-ocfs2.patch +++ b/fs-ocfs2.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/src/storage_conf.c +Index: libvirt-0.7.1/src/conf/storage_conf.c =================================================================== ---- libvirt-0.7.1.orig/src/storage_conf.c -+++ libvirt-0.7.1/src/storage_conf.c +--- libvirt-0.7.1.orig/src/conf/storage_conf.c ++++ libvirt-0.7.1/src/conf/storage_conf.c @@ -59,7 +59,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy VIR_STORAGE_POOL_FS_LAST, "auto", "ext2", "ext3", @@ -11,10 +11,10 @@ Index: libvirt-0.7.1/src/storage_conf.c VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, VIR_STORAGE_POOL_NETFS_LAST, -Index: libvirt-0.7.1/src/storage_conf.h +Index: libvirt-0.7.1/src/conf/storage_conf.h =================================================================== ---- libvirt-0.7.1.orig/src/storage_conf.h -+++ libvirt-0.7.1/src/storage_conf.h +--- libvirt-0.7.1.orig/src/conf/storage_conf.h ++++ libvirt-0.7.1/src/conf/storage_conf.h @@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { VIR_STORAGE_POOL_FS_VFAT, VIR_STORAGE_POOL_FS_HFSPLUS, diff --git a/libvirt-0.7.1.tar.bz2 b/libvirt-0.7.1.tar.bz2 deleted file mode 100644 index 701a7c6..0000000 --- a/libvirt-0.7.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8edde9577fbf0e90d0b33d4b328a79c51cc821c78a4c04b101007c1d6eed1909 -size 5440029 diff --git a/libvirt-0.7.2.tar.bz2 b/libvirt-0.7.2.tar.bz2 new file mode 100644 index 0000000..9e7e304 --- /dev/null +++ b/libvirt-0.7.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311817f34ace89ee44b09a4d4854bbc3a5c0567bf9a8e8a6772c494432f94b33 +size 5563880 diff --git a/libvirt.spec b/libvirt.spec index 7a432f5..b5c4960 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -35,7 +35,7 @@ %endif Name: libvirt -BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd +BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd %if %{with_xen} BuildRequires: xen-devel %endif @@ -64,7 +64,7 @@ Url: http://libvirt.org/ License: LGPL v2.1 or later Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.1 +Version: 0.7.2 Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux Requires: readline @@ -92,10 +92,7 @@ Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches Patch0: devmap-no-pkgconfig.patch -Patch1: xen-refcnt.patch -Patch2: vshdeinit-recurse.patch -Patch3: msg-proc-memleak.patch -Patch4: fs-ocfs2.patch +Patch1: fs-ocfs2.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -105,7 +102,7 @@ Patch104: detach-disk.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: suse-network.patch -Patch202: snapshots.patch +#BFRPatch202: snapshots.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -199,9 +196,6 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %patch100 -p1 %patch101 %patch102 -p1 @@ -209,7 +203,7 @@ Authors: %patch104 -p1 %patch200 -p1 %patch201 -p1 -%patch202 -p1 +#BFR%patch202 -p1 %build %if ! %{with_xen} @@ -231,6 +225,7 @@ export CFLAGS="$RPM_OPT_FLAGS" --with-init-script=none \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ --with-xen-proxy=no \ + --with-selinux=no \ ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \ ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \ ac_cv_path_ISCSIADM=/sbin/iscsiadm \ @@ -249,7 +244,6 @@ rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt -rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*} rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a ln_dupes() { @@ -290,12 +284,14 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %{_bindir}/virsh %{_bindir}/virt-xml-validate +%{_bindir}/virt-pki-validate %{_sbindir}/libvirtd %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* +%doc %{_mandir}/man1/virt-pki-validate.1* %{_libdir}/*.so.* %dir %{_libdir}/%{name} %if 0%{?suse_version} > 1030 @@ -308,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart +%if %{with_lxc} +%config %{_sysconfdir}/libvirt/lxc.conf +%endif %config %{_sysconfdir}/libvirt/qemu/networks/default.xml %config %{_sysconfdir}/logrotate.d/libvirtd %dir /%{_localstatedir}/run/libvirt/ @@ -334,7 +333,6 @@ rm -rf $RPM_BUILD_ROOT %files doc %defattr(-, root, root) %{_datadir}/gtk-doc/html/libvirt -%doc %{_docdir}/%{name}/*.gif %doc %{_docdir}/%{name}/*.png %doc %{_docdir}/%{name}/*.html %doc %{_docdir}/%{name}/html diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index f0d484d..8a16dfa 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/qemud/libvirtd.conf +Index: libvirt-0.7.1/daemon/libvirtd.conf =================================================================== ---- libvirt-0.7.1.orig/qemud/libvirtd.conf -+++ libvirt-0.7.1/qemud/libvirtd.conf +--- libvirt-0.7.1.orig/daemon/libvirtd.conf ++++ libvirt-0.7.1/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,10 +28,10 @@ Index: libvirt-0.7.1/qemud/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.1/qemud/qemud.c +Index: libvirt-0.7.1/daemon/libvirtd.c =================================================================== ---- libvirt-0.7.1.orig/qemud/qemud.c -+++ libvirt-0.7.1/qemud/qemud.c +--- libvirt-0.7.1.orig/daemon/libvirtd.c ++++ libvirt-0.7.1/daemon/libvirtd.c @@ -134,7 +134,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ diff --git a/migrate-params.patch b/migrate-params.patch index c619f6a..7a800d2 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.6.5/src/xend_internal.c +Index: libvirt-0.6.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.6.5.orig/src/xend_internal.c -+++ libvirt-0.6.5/src/xend_internal.c +--- libvirt-0.6.5.orig/src/xen/xend_internal.c ++++ libvirt-0.6.5/src/xen/xend_internal.c @@ -4480,6 +4480,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", diff --git a/msg-proc-memleak.patch b/msg-proc-memleak.patch deleted file mode 100644 index cd40f75..0000000 --- a/msg-proc-memleak.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: libvirt-0.7.1/qemud/dispatch.c -=================================================================== ---- libvirt-0.7.1.orig/qemud/dispatch.c -+++ libvirt-0.7.1/qemud/dispatch.c -@@ -191,6 +191,7 @@ remoteSerializeError(struct qemud_client - - xdr_error: - xdr_destroy(&xdr); -+ VIR_FREE(msg); - fatal_error: - xdr_free((xdrproc_t)xdr_remote_error, (char *)rerr); - return -1; -@@ -336,6 +337,7 @@ remoteDispatchClientRequest (struct qemu - struct qemud_client *client, - struct qemud_client_message *msg) - { -+ int ret; - remote_error rerr; - - memset(&rerr, 0, sizeof rerr); -@@ -364,7 +366,12 @@ remoteDispatchClientRequest (struct qemu - } - - error: -- return remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ ret = remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ -+ if (ret >= 0) -+ VIR_FREE(msg); -+ -+ return ret; - } - - -@@ -521,8 +528,12 @@ remoteDispatchClientCall (struct qemud_s - rpc_error: - /* Semi-bad stuff happened, we can still try to send back - * an RPC error message to client */ -- return remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ rv = remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ -+ if (rv >= 0) -+ VIR_FREE(msg); - -+ return rv; - - xdr_error: - /* Seriously bad stuff happened, so we'll kill off this client diff --git a/socat.patch b/socat.patch index 95e5213..9238072 100644 --- a/socat.patch +++ b/socat.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/src/remote_internal.c +Index: libvirt-0.7.1/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/remote_internal.c -+++ libvirt-0.7.1/src/remote_internal.c +--- libvirt-0.7.1.orig/src/remote/remote_driver.c ++++ libvirt-0.7.1/src/remote/remote_driver.c @@ -728,12 +728,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } diff --git a/suse-network.patch b/suse-network.patch index 4bea8eb..340adc8 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/src/network_conf.c +Index: libvirt-0.7.1/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.1.orig/src/network_conf.c -+++ libvirt-0.7.1/src/network_conf.c +--- libvirt-0.7.1.orig/src/conf/network_conf.c ++++ libvirt-0.7.1/src/conf/network_conf.c @@ -770,6 +770,137 @@ error: return NULL; } @@ -148,10 +148,10 @@ Index: libvirt-0.7.1/src/network_conf.c return 0; } -Index: libvirt-0.7.1/src/network_conf.h +Index: libvirt-0.7.1/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.1.orig/src/network_conf.h -+++ libvirt-0.7.1/src/network_conf.h +--- libvirt-0.7.1.orig/src/conf/network_conf.h ++++ libvirt-0.7.1/src/conf/network_conf.h @@ -89,6 +89,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; @@ -160,10 +160,10 @@ Index: libvirt-0.7.1/src/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.1/src/network_driver.c +Index: libvirt-0.7.1/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/network_driver.c -+++ libvirt-0.7.1/src/network_driver.c +--- libvirt-0.7.1.orig/src/network/bridge_driver.c ++++ libvirt-0.7.1/src/network/bridge_driver.c @@ -963,6 +963,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); diff --git a/vshdeinit-recurse.patch b/vshdeinit-recurse.patch deleted file mode 100644 index b8e7244..0000000 --- a/vshdeinit-recurse.patch +++ /dev/null @@ -1,1882 +0,0 @@ -Index: libvirt-0.7.1/src/virsh.c -=================================================================== ---- libvirt-0.7.1.orig/src/virsh.c -+++ libvirt-0.7.1/src/virsh.c -@@ -202,8 +202,8 @@ typedef struct __vshControl { - - static const vshCmdDef commands[]; - --static void vshError(vshControl *ctl, int doexit, const char *format, ...) -- ATTRIBUTE_FMT_PRINTF(3, 4); -+static void vshError(vshControl *ctl, const char *format, ...) -+ ATTRIBUTE_FMT_PRINTF(2, 3); - static int vshInit(vshControl *ctl); - static int vshDeinit(vshControl *ctl); - static void vshUsage(void); -@@ -351,11 +351,11 @@ virshReportError(vshControl *ctl) - return; - - if (last_error->code == VIR_ERR_OK) { -- vshError(ctl, FALSE, "%s", _("unknown error")); -+ vshError(ctl, "%s", _("unknown error")); - goto out; - } - -- vshError(ctl, FALSE, "%s", last_error->message); -+ vshError(ctl, "%s", last_error->message); - - out: - virFreeError(last_error); -@@ -433,11 +433,9 @@ cmdAutostart(vshControl *ctl, const vshC - - if (virDomainSetAutostart(dom, autostart) < 0) { - if (autostart) -- vshError(ctl, FALSE, _("Failed to mark domain %s as autostarted"), -- name); -+ vshError(ctl, _("Failed to mark domain %s as autostarted"), name); - else -- vshError(ctl, FALSE, _("Failed to unmark domain %s as autostarted"), -- name); -+ vshError(ctl, _("Failed to unmark domain %s as autostarted"), name); - virDomainFree(dom); - return FALSE; - } -@@ -474,8 +472,7 @@ cmdConnect(vshControl *ctl, const vshCmd - - if (ctl->conn) { - if (virConnectClose(ctl->conn) != 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to disconnect from the hypervisor")); -+ vshError(ctl, "%s", _("Failed to disconnect from the hypervisor")); - return FALSE; - } - ctl->conn = NULL; -@@ -494,7 +491,7 @@ cmdConnect(vshControl *ctl, const vshCmd - ctl->readonly ? VIR_CONNECT_RO : 0); - - if (!ctl->conn) -- vshError(ctl, FALSE, "%s", _("Failed to connect to the hypervisor")); -+ vshError(ctl, "%s", _("Failed to connect to the hypervisor")); - - return ctl->conn ? TRUE : FALSE; - } -@@ -528,17 +525,17 @@ cmdRunConsole(vshControl *ctl, virDomain - char *thisHost = NULL; - - if (!(thisHost = virGetHostname())) { -- vshError(ctl, FALSE, "%s", _("Failed to get local hostname")); -+ vshError(ctl, "%s", _("Failed to get local hostname")); - goto cleanup; - } - - if (!(thatHost = virConnectGetHostname(ctl->conn))) { -- vshError(ctl, FALSE, "%s", _("Failed to get connection hostname")); -+ vshError(ctl, "%s", _("Failed to get connection hostname")); - goto cleanup; - } - - if (STRNEQ(thisHost, thatHost)) { -- vshError(ctl, FALSE, "%s", _("Cannot connect to a remote console device")); -+ vshError(ctl, "%s", _("Cannot connect to a remote console device")); - goto cleanup; - } - -@@ -632,14 +629,14 @@ cmdList(vshControl *ctl, const vshCmd *c - if (active) { - maxid = virConnectNumOfDomains(ctl->conn); - if (maxid < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active domains")); -+ vshError(ctl, "%s", _("Failed to list active domains")); - return FALSE; - } - if (maxid) { - ids = vshMalloc(ctl, sizeof(int) * maxid); - - if ((maxid = virConnectListDomains(ctl->conn, &ids[0], maxid)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active domains")); -+ vshError(ctl, "%s", _("Failed to list active domains")); - free(ids); - return FALSE; - } -@@ -650,7 +647,7 @@ cmdList(vshControl *ctl, const vshCmd *c - if (inactive) { - maxname = virConnectNumOfDefinedDomains(ctl->conn); - if (maxname < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive domains")); -+ vshError(ctl, "%s", _("Failed to list inactive domains")); - free(ids); - return FALSE; - } -@@ -658,7 +655,7 @@ cmdList(vshControl *ctl, const vshCmd *c - names = vshMalloc(ctl, sizeof(char *) * maxname); - - if ((maxname = virConnectListDefinedDomains(ctl->conn, names, maxname)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive domains")); -+ vshError(ctl, "%s", _("Failed to list inactive domains")); - free(ids); - free(names); - return FALSE; -@@ -786,8 +783,7 @@ cmdDomblkstat (vshControl *ctl, const vs - } - - if (virDomainBlockStats (dom, device, &stats, sizeof stats) == -1) { -- vshError (ctl, FALSE, _("Failed to get block stats %s %s"), -- name, device); -+ vshError(ctl, _("Failed to get block stats %s %s"), name, device); - virDomainFree(dom); - return FALSE; - } -@@ -844,8 +840,7 @@ cmdDomIfstat (vshControl *ctl, const vsh - } - - if (virDomainInterfaceStats (dom, device, &stats, sizeof stats) == -1) { -- vshError (ctl, FALSE, _("Failed to get interface stats %s %s"), -- name, device); -+ vshError(ctl, _("Failed to get interface stats %s %s"), name, device); - virDomainFree(dom); - return FALSE; - } -@@ -908,7 +903,7 @@ cmdSuspend(vshControl *ctl, const vshCmd - if (virDomainSuspend(dom) == 0) { - vshPrint(ctl, _("Domain %s suspended\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to suspend domain %s"), name); -+ vshError(ctl, _("Failed to suspend domain %s"), name); - ret = FALSE; - } - -@@ -967,7 +962,7 @@ cmdCreate(vshControl *ctl, const vshCmd - #endif - virDomainFree(dom); - } else { -- vshError(ctl, FALSE, _("Failed to create domain from %s"), from); -+ vshError(ctl, _("Failed to create domain from %s"), from); - ret = FALSE; - } - return ret; -@@ -1014,7 +1009,7 @@ cmdDefine(vshControl *ctl, const vshCmd - virDomainGetName(dom), from); - virDomainFree(dom); - } else { -- vshError(ctl, FALSE, _("Failed to define domain from %s"), from); -+ vshError(ctl, _("Failed to define domain from %s"), from); - ret = FALSE; - } - return ret; -@@ -1052,9 +1047,11 @@ cmdUndefine(vshControl *ctl, const vshCm - - if (name && virStrToLong_i(name, NULL, 10, &id) == 0 - && id >= 0 && (dom = virDomainLookupByID(ctl->conn, id))) { -- vshError(ctl, FALSE, _("a running domain like %s cannot be undefined;\n" -- "to undefine, first shutdown then undefine" -- " using its name or UUID"), name); -+ vshError(ctl, -+ _("a running domain like %s cannot be undefined;\n" -+ "to undefine, first shutdown then undefine" -+ " using its name or UUID"), -+ name); - virDomainFree(dom); - return FALSE; - } -@@ -1065,7 +1062,7 @@ cmdUndefine(vshControl *ctl, const vshCm - if (virDomainUndefine(dom) == 0) { - vshPrint(ctl, _("Domain %s has been undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine domain %s"), name); -+ vshError(ctl, _("Failed to undefine domain %s"), name); - ret = FALSE; - } - -@@ -1107,7 +1104,7 @@ cmdStart(vshControl *ctl, const vshCmd * - return FALSE; - - if (virDomainGetID(dom) != (unsigned int)-1) { -- vshError(ctl, FALSE, "%s", _("Domain is already active")); -+ vshError(ctl, "%s", _("Domain is already active")); - virDomainFree(dom); - return FALSE; - } -@@ -1120,8 +1117,7 @@ cmdStart(vshControl *ctl, const vshCmd * - cmdRunConsole(ctl, dom); - #endif - } else { -- vshError(ctl, FALSE, _("Failed to start domain %s"), -- virDomainGetName(dom)); -+ vshError(ctl, _("Failed to start domain %s"), virDomainGetName(dom)); - ret = FALSE; - } - virDomainFree(dom); -@@ -1163,7 +1159,7 @@ cmdSave(vshControl *ctl, const vshCmd *c - if (virDomainSave(dom, to) == 0) { - vshPrint(ctl, _("Domain %s saved to %s\n"), name, to); - } else { -- vshError(ctl, FALSE, _("Failed to save domain %s to %s"), name, to); -+ vshError(ctl, _("Failed to save domain %s to %s"), name, to); - ret = FALSE; - } - -@@ -1202,7 +1198,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - int val; - val = vshCommandOptInt(cmd, "weight", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("Invalid value of weight")); -+ vshError(ctl, "%s", _("Invalid value of weight")); - return -1; - } else { - param->value.ui = val; -@@ -1217,7 +1213,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - int val; - val = vshCommandOptInt(cmd, "cap", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("Invalid value of cap")); -+ vshError(ctl, "%s", _("Invalid value of cap")); - return -1; - } else { - param->value.ui = val; -@@ -1229,7 +1225,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - char *val = strchr(data, '='); - int match = 0; - if (!val) { -- vshError(ctl, FALSE, "%s", _("Invalid syntax for --set, expecting name=value")); -+ vshError(ctl, "%s", _("Invalid syntax for --set, expecting name=value")); - return -1; - } - *val = '\0'; -@@ -1243,35 +1239,35 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - switch (param->type) { - case VIR_DOMAIN_SCHED_FIELD_INT: - if (virStrToLong_i(val, NULL, 10, ¶m->value.i) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an int")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_UINT: - if (virStrToLong_ui(val, NULL, 10, ¶m->value.ui) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an unsigned int")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_LLONG: - if (virStrToLong_ll(val, NULL, 10, ¶m->value.l) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an long long")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_ULLONG: - if (virStrToLong_ull(val, NULL, 10, ¶m->value.ul) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an unsigned long long")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_DOUBLE: - if (virStrToDouble(val, NULL, ¶m->value.d) < 0) { -- vshError(ctl, FALSE, "%s", _("Invalid value for parameter, expecting a double")); -+ vshError(ctl, "%s", _("Invalid value for parameter, expecting a double")); - return -1; - } - break; -@@ -1408,7 +1404,7 @@ cmdRestore(vshControl *ctl, const vshCmd - if (virDomainRestore(ctl->conn, from) == 0) { - vshPrint(ctl, _("Domain restored from %s\n"), from); - } else { -- vshError(ctl, FALSE, _("Failed to restore domain from %s"), from); -+ vshError(ctl, _("Failed to restore domain from %s"), from); - ret = FALSE; - } - return ret; -@@ -1449,8 +1445,7 @@ cmdDump(vshControl *ctl, const vshCmd *c - if (virDomainCoreDump(dom, to, 0) == 0) { - vshPrint(ctl, _("Domain %s dumped to %s\n"), name, to); - } else { -- vshError(ctl, FALSE, _("Failed to core dump domain %s to %s"), -- name, to); -+ vshError(ctl, _("Failed to core dump domain %s to %s"), name, to); - ret = FALSE; - } - -@@ -1488,7 +1483,7 @@ cmdResume(vshControl *ctl, const vshCmd - if (virDomainResume(dom) == 0) { - vshPrint(ctl, _("Domain %s resumed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to resume domain %s"), name); -+ vshError(ctl, _("Failed to resume domain %s"), name); - ret = FALSE; - } - -@@ -1526,7 +1521,7 @@ cmdShutdown(vshControl *ctl, const vshCm - if (virDomainShutdown(dom) == 0) { - vshPrint(ctl, _("Domain %s is being shutdown\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to shutdown domain %s"), name); -+ vshError(ctl, _("Failed to shutdown domain %s"), name); - ret = FALSE; - } - -@@ -1564,7 +1559,7 @@ cmdReboot(vshControl *ctl, const vshCmd - if (virDomainReboot(dom, 0) == 0) { - vshPrint(ctl, _("Domain %s is being rebooted\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to reboot domain %s"), name); -+ vshError(ctl, _("Failed to reboot domain %s"), name); - ret = FALSE; - } - -@@ -1602,7 +1597,7 @@ cmdDestroy(vshControl *ctl, const vshCmd - if (virDomainDestroy(dom) == 0) { - vshPrint(ctl, _("Domain %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy domain %s"), name); -+ vshError(ctl, _("Failed to destroy domain %s"), name); - ret = FALSE; - } - -@@ -1835,8 +1830,8 @@ cmdVcpuinfo(vshControl *ctl, const vshCm - } - } else { - if (info.state == VIR_DOMAIN_SHUTOFF) { -- vshError(ctl, FALSE, "%s", -- _("Domain shut off, virtual CPUs not present.")); -+ vshError(ctl, "%s", -+ _("Domain shut off, virtual CPUs not present.")); - } - ret = FALSE; - } -@@ -1886,14 +1881,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd - - vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound); - if (!vcpufound) { -- vshError(ctl, FALSE, "%s", -- _("vcpupin: Invalid or missing vCPU number.")); -+ vshError(ctl, "%s", _("vcpupin: Invalid or missing vCPU number.")); - virDomainFree(dom); - return FALSE; - } - - if (!(cpulist = vshCommandOptString(cmd, "cpulist", NULL))) { -- vshError(ctl, FALSE, "%s", _("vcpupin: Missing cpulist")); -+ vshError(ctl, "%s", _("vcpupin: Missing cpulist")); - virDomainFree(dom); - return FALSE; - } -@@ -1904,14 +1898,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd - } - - if (virDomainGetInfo(dom, &info) != 0) { -- vshError(ctl, FALSE, "%s", -- _("vcpupin: failed to get domain informations.")); -+ vshError(ctl, "%s", _("vcpupin: failed to get domain informations.")); - virDomainFree(dom); - return FALSE; - } - - if (vcpu >= info.nrVirtCpu) { -- vshError(ctl, FALSE, "%s", _("vcpupin: Invalid vCPU number.")); -+ vshError(ctl, "%s", _("vcpupin: Invalid vCPU number.")); - virDomainFree(dom); - return FALSE; - } -@@ -1920,7 +1913,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd - * numbers and give an intelligent error message if not. - */ - if (cpulist[0] == '\0') { -- vshError(ctl, FALSE, "%s", _("cpulist: Invalid format. Empty string.")); -+ vshError(ctl, "%s", _("cpulist: Invalid format. Empty string.")); - virDomainFree (dom); - return FALSE; - } -@@ -1930,7 +1923,9 @@ cmdVcpupin(vshControl *ctl, const vshCmd - switch (state) { - case expect_num: - if (!c_isdigit (cpulist[i])) { -- vshError( ctl, FALSE, _("cpulist: %s: Invalid format. Expecting digit at position %d (near '%c')."), cpulist, i, cpulist[i]); -+ vshError(ctl, _("cpulist: %s: Invalid format. Expecting " -+ "digit at position %d (near '%c')."), -+ cpulist, i, cpulist[i]); - virDomainFree (dom); - return FALSE; - } -@@ -1940,14 +1935,18 @@ cmdVcpupin(vshControl *ctl, const vshCmd - if (cpulist[i] == ',') - state = expect_num; - else if (!c_isdigit (cpulist[i])) { -- vshError(ctl, FALSE, _("cpulist: %s: Invalid format. Expecting digit or comma at position %d (near '%c')."), cpulist, i, cpulist[i]); -+ vshError(ctl, _("cpulist: %s: Invalid format. Expecting " -+ "digit or comma at position %d (near '%c')."), -+ cpulist, i, cpulist[i]); - virDomainFree (dom); - return FALSE; - } - } - } - if (state == expect_num) { -- vshError(ctl, FALSE, _("cpulist: %s: Invalid format. Trailing comma at position %d."), cpulist, i); -+ vshError(ctl, _("cpulist: %s: Invalid format. Trailing comma " -+ "at position %d."), -+ cpulist, i); - virDomainFree (dom); - return FALSE; - } -@@ -1961,7 +1960,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd - if (cpu < VIR_NODEINFO_MAXCPUS(nodeinfo)) { - VIR_USE_CPU(cpumap, cpu); - } else { -- vshError(ctl, FALSE, _("Physical CPU %d doesn't exist."), cpu); -+ vshError(ctl, _("Physical CPU %d doesn't exist."), cpu); - free(cpumap); - virDomainFree(dom); - return FALSE; -@@ -2011,7 +2010,7 @@ cmdSetvcpus(vshControl *ctl, const vshCm - - count = vshCommandOptInt(cmd, "count", &count); - if (count <= 0) { -- vshError(ctl, FALSE, "%s", _("Invalid number of virtual CPUs.")); -+ vshError(ctl, "%s", _("Invalid number of virtual CPUs.")); - virDomainFree(dom); - return FALSE; - } -@@ -2023,7 +2022,7 @@ cmdSetvcpus(vshControl *ctl, const vshCm - } - - if (count > maxcpu) { -- vshError(ctl, FALSE, "%s", _("Too many virtual CPUs.")); -+ vshError(ctl, "%s", _("Too many virtual CPUs.")); - virDomainFree(dom); - return FALSE; - } -@@ -2068,19 +2067,19 @@ cmdSetmem(vshControl *ctl, const vshCmd - kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes); - if (kilobytes <= 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); -+ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); - return FALSE; - } - - if (virDomainGetInfo(dom, &info) != 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, "%s", _("Unable to verify MaxMemorySize")); -+ vshError(ctl, "%s", _("Unable to verify MaxMemorySize")); - return FALSE; - } - - if (kilobytes > info.maxMem) { - virDomainFree(dom); -- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); -+ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); - return FALSE; - } - -@@ -2124,26 +2123,26 @@ cmdSetmaxmem(vshControl *ctl, const vshC - kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes); - if (kilobytes <= 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); -+ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); - return FALSE; - } - - if (virDomainGetInfo(dom, &info) != 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, "%s", _("Unable to verify current MemorySize")); -+ vshError(ctl, "%s", _("Unable to verify current MemorySize")); - return FALSE; - } - - if (kilobytes < info.memory) { - if (virDomainSetMemory(dom, kilobytes) != 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, "%s", _("Unable to shrink current MemorySize")); -+ vshError(ctl, "%s", _("Unable to shrink current MemorySize")); - return FALSE; - } - } - - if (virDomainSetMaxMemory(dom, kilobytes) != 0) { -- vshError(ctl, FALSE, "%s", _("Unable to change MaxMemorySize")); -+ vshError(ctl, "%s", _("Unable to change MaxMemorySize")); - ret = FALSE; - } - -@@ -2169,7 +2168,7 @@ cmdNodeinfo(vshControl *ctl, const vshCm - return FALSE; - - if (virNodeGetInfo(ctl->conn, &info) < 0) { -- vshError(ctl, FALSE, "%s", _("failed to get node information")); -+ vshError(ctl, "%s", _("failed to get node information")); - return FALSE; - } - vshPrint(ctl, "%-20s %s\n", _("CPU model:"), info.model); -@@ -2202,7 +2201,7 @@ cmdCapabilities (vshControl *ctl, const - return FALSE; - - if ((caps = virConnectGetCapabilities (ctl->conn)) == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get capabilities")); -+ vshError(ctl, "%s", _("failed to get capabilities")); - return FALSE; - } - vshPrint (ctl, "%s\n", caps); -@@ -2446,7 +2445,7 @@ cmdDomuuid(vshControl *ctl, const vshCmd - if (virDomainGetUUIDString(dom, uuid) != -1) - vshPrint(ctl, "%s\n", uuid); - else -- vshError(ctl, FALSE, "%s", _("failed to get domain UUID")); -+ vshError(ctl, "%s", _("failed to get domain UUID")); - - virDomainFree(dom); - return TRUE; -@@ -2489,7 +2488,7 @@ cmdMigrate (vshControl *ctl, const vshCm - - desturi = vshCommandOptString (cmd, "desturi", &found); - if (!found) { -- vshError (ctl, FALSE, "%s", _("migrate: Missing desturi")); -+ vshError(ctl, "%s", _("migrate: Missing desturi")); - goto done; - } - -@@ -2550,11 +2549,9 @@ cmdNetworkAutostart(vshControl *ctl, con - - if (virNetworkSetAutostart(network, autostart) < 0) { - if (autostart) -- vshError(ctl, FALSE, _("failed to mark network %s as autostarted"), -- name); -+ vshError(ctl, _("failed to mark network %s as autostarted"), name); - else -- vshError(ctl, FALSE,_("failed to unmark network %s as autostarted"), -- name); -+ vshError(ctl, _("failed to unmark network %s as autostarted"), name); - virNetworkFree(network); - return FALSE; - } -@@ -2609,7 +2606,7 @@ cmdNetworkCreate(vshControl *ctl, const - virNetworkGetName(network), from); - virNetworkFree(network); - } else { -- vshError(ctl, FALSE, _("Failed to create network from %s"), from); -+ vshError(ctl, _("Failed to create network from %s"), from); - ret = FALSE; - } - return ret; -@@ -2657,7 +2654,7 @@ cmdNetworkDefine(vshControl *ctl, const - virNetworkGetName(network), from); - virNetworkFree(network); - } else { -- vshError(ctl, FALSE, _("Failed to define network from %s"), from); -+ vshError(ctl, _("Failed to define network from %s"), from); - ret = FALSE; - } - return ret; -@@ -2694,7 +2691,7 @@ cmdNetworkDestroy(vshControl *ctl, const - if (virNetworkDestroy(network) == 0) { - vshPrint(ctl, _("Network %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy network %s"), name); -+ vshError(ctl, _("Failed to destroy network %s"), name); - ret = FALSE; - } - -@@ -2811,8 +2808,8 @@ cmdInterfaceEdit (vshControl *ctl, const - goto cleanup; - - if (STRNEQ (doc, doc_reread)) { -- vshError (ctl, FALSE, "%s", -- _("ERROR: the XML configuration was changed by another user")); -+ vshError(ctl, "%s", -+ _("ERROR: the XML configuration was changed by another user")); - goto cleanup; - } - -@@ -2874,7 +2871,7 @@ cmdNetworkList(vshControl *ctl, const vs - if (active) { - maxactive = virConnectNumOfNetworks(ctl->conn); - if (maxactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active networks")); -+ vshError(ctl, "%s", _("Failed to list active networks")); - return FALSE; - } - if (maxactive) { -@@ -2882,7 +2879,7 @@ cmdNetworkList(vshControl *ctl, const vs - - if ((maxactive = virConnectListNetworks(ctl->conn, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active networks")); -+ vshError(ctl, "%s", _("Failed to list active networks")); - free(activeNames); - return FALSE; - } -@@ -2893,7 +2890,7 @@ cmdNetworkList(vshControl *ctl, const vs - if (inactive) { - maxinactive = virConnectNumOfDefinedNetworks(ctl->conn); - if (maxinactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive networks")); -+ vshError(ctl, "%s", _("Failed to list inactive networks")); - free(activeNames); - return FALSE; - } -@@ -2903,8 +2900,7 @@ cmdNetworkList(vshControl *ctl, const vs - if ((maxinactive = - virConnectListDefinedNetworks(ctl->conn, inactiveNames, - maxinactive)) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list inactive networks")); -+ vshError(ctl, "%s", _("Failed to list inactive networks")); - free(activeNames); - free(inactiveNames); - return FALSE; -@@ -3032,7 +3028,7 @@ cmdNetworkStart(vshControl *ctl, const v - vshPrint(ctl, _("Network %s started\n"), - virNetworkGetName(network)); - } else { -- vshError(ctl, FALSE, _("Failed to start network %s"), -+ vshError(ctl, _("Failed to start network %s"), - virNetworkGetName(network)); - ret = FALSE; - } -@@ -3071,7 +3067,7 @@ cmdNetworkUndefine(vshControl *ctl, cons - if (virNetworkUndefine(network) == 0) { - vshPrint(ctl, _("Network %s has been undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine network %s"), name); -+ vshError(ctl, _("Failed to undefine network %s"), name); - ret = FALSE; - } - -@@ -3110,7 +3106,7 @@ cmdNetworkUuid(vshControl *ctl, const vs - if (virNetworkGetUUIDString(network, uuid) != -1) - vshPrint(ctl, "%s\n", uuid); - else -- vshError(ctl, FALSE, "%s", _("failed to get network UUID")); -+ vshError(ctl, "%s", _("failed to get network UUID")); - - virNetworkFree(network); - return TRUE; -@@ -3148,7 +3144,7 @@ cmdInterfaceList(vshControl *ctl, const - if (active) { - maxactive = virConnectNumOfInterfaces(ctl->conn); - if (maxactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active interfaces")); -+ vshError(ctl, "%s", _("Failed to list active interfaces")); - return FALSE; - } - if (maxactive) { -@@ -3156,8 +3152,7 @@ cmdInterfaceList(vshControl *ctl, const - - if ((maxactive = virConnectListInterfaces(ctl->conn, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list active interfaces")); -+ vshError(ctl, "%s", _("Failed to list active interfaces")); - free(activeNames); - return FALSE; - } -@@ -3168,8 +3163,7 @@ cmdInterfaceList(vshControl *ctl, const - if (inactive) { - maxinactive = virConnectNumOfDefinedInterfaces(ctl->conn); - if (maxinactive < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list inactive interfaces")); -+ vshError(ctl, "%s", _("Failed to list inactive interfaces")); - free(activeNames); - return FALSE; - } -@@ -3179,8 +3173,7 @@ cmdInterfaceList(vshControl *ctl, const - if ((maxinactive = - virConnectListDefinedInterfaces(ctl->conn, inactiveNames, - maxinactive)) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list inactive interfaces")); -+ vshError(ctl, "%s", _("Failed to list inactive interfaces")); - free(activeNames); - free(inactiveNames); - return FALSE; -@@ -3373,7 +3366,7 @@ cmdInterfaceDefine(vshControl *ctl, cons - virInterfaceGetName(iface), from); - virInterfaceFree (iface); - } else { -- vshError(ctl, FALSE, _("Failed to define interface from %s"), from); -+ vshError(ctl, _("Failed to define interface from %s"), from); - ret = FALSE; - } - return ret; -@@ -3409,7 +3402,7 @@ cmdInterfaceUndefine(vshControl *ctl, co - if (virInterfaceUndefine(iface) == 0) { - vshPrint(ctl, _("Interface %s undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine interface %s"), name); -+ vshError(ctl, _("Failed to undefine interface %s"), name); - ret = FALSE; - } - -@@ -3447,7 +3440,7 @@ cmdInterfaceStart(vshControl *ctl, const - if (virInterfaceCreate(iface, 0) == 0) { - vshPrint(ctl, _("Interface %s started\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to start interface %s"), name); -+ vshError(ctl, _("Failed to start interface %s"), name); - ret = FALSE; - } - -@@ -3485,7 +3478,7 @@ cmdInterfaceDestroy(vshControl *ctl, con - if (virInterfaceDestroy(iface, 0) == 0) { - vshPrint(ctl, _("Interface %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy interface %s"), name); -+ vshError(ctl, _("Failed to destroy interface %s"), name); - ret = FALSE; - } - -@@ -3527,11 +3520,9 @@ cmdPoolAutostart(vshControl *ctl, const - - if (virStoragePoolSetAutostart(pool, autostart) < 0) { - if (autostart) -- vshError(ctl, FALSE, _("failed to mark pool %s as autostarted"), -- name); -+ vshError(ctl, _("failed to mark pool %s as autostarted"), name); - else -- vshError(ctl, FALSE,_("failed to unmark pool %s as autostarted"), -- name); -+ vshError(ctl, _("failed to unmark pool %s as autostarted"), name); - virStoragePoolFree(pool); - return FALSE; - } -@@ -3587,7 +3578,7 @@ cmdPoolCreate(vshControl *ctl, const vsh - virStoragePoolGetName(pool), from); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to create pool from %s"), from); -+ vshError(ctl, _("Failed to create pool from %s"), from); - ret = FALSE; - } - return ret; -@@ -3641,7 +3632,7 @@ cmdNodeDeviceCreate(vshControl *ctl, con - virNodeDeviceGetName(dev), from); - virNodeDeviceFree(dev); - } else { -- vshError(ctl, FALSE, _("Failed to create node device from %s"), from); -+ vshError(ctl, _("Failed to create node device from %s"), from); - ret = FALSE; - } - -@@ -3687,7 +3678,7 @@ cmdNodeDeviceDestroy(vshControl *ctl, co - if (virNodeDeviceDestroy(dev) == 0) { - vshPrint(ctl, _("Destroyed node device '%s'\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy node device '%s'"), name); -+ vshError(ctl, _("Failed to destroy node device '%s'"), name); - ret = FALSE; - } - -@@ -3800,7 +3791,7 @@ cmdPoolCreateAs(vshControl *ctl, const v - vshPrint(ctl, _("Pool %s created\n"), name); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to create pool %s"), name); -+ vshError(ctl, _("Failed to create pool %s"), name); - return FALSE; - } - } -@@ -3849,7 +3840,7 @@ cmdPoolDefine(vshControl *ctl, const vsh - virStoragePoolGetName(pool), from); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to define pool from %s"), from); -+ vshError(ctl, _("Failed to define pool from %s"), from); - ret = FALSE; - } - return ret; -@@ -3889,7 +3880,7 @@ cmdPoolDefineAs(vshControl *ctl, const v - vshPrint(ctl, _("Pool %s defined\n"), name); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to define pool %s"), name); -+ vshError(ctl, _("Failed to define pool %s"), name); - return FALSE; - } - } -@@ -3927,7 +3918,7 @@ cmdPoolBuild(vshControl *ctl, const vshC - if (virStoragePoolBuild(pool, 0) == 0) { - vshPrint(ctl, _("Pool %s built\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to build pool %s"), name); -+ vshError(ctl, _("Failed to build pool %s"), name); - ret = FALSE; - virStoragePoolFree(pool); - } -@@ -3966,7 +3957,7 @@ cmdPoolDestroy(vshControl *ctl, const vs - if (virStoragePoolDestroy(pool) == 0) { - vshPrint(ctl, _("Pool %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy pool %s"), name); -+ vshError(ctl, _("Failed to destroy pool %s"), name); - ret = FALSE; - } - -@@ -4005,7 +3996,7 @@ cmdPoolDelete(vshControl *ctl, const vsh - if (virStoragePoolDelete(pool, 0) == 0) { - vshPrint(ctl, _("Pool %s deleted\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to delete pool %s"), name); -+ vshError(ctl, _("Failed to delete pool %s"), name); - ret = FALSE; - } - -@@ -4044,7 +4035,7 @@ cmdPoolRefresh(vshControl *ctl, const vs - if (virStoragePoolRefresh(pool, 0) == 0) { - vshPrint(ctl, _("Pool %s refreshed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to refresh pool %s"), name); -+ vshError(ctl, _("Failed to refresh pool %s"), name); - ret = FALSE; - } - virStoragePoolFree(pool); -@@ -4124,7 +4115,7 @@ cmdPoolList(vshControl *ctl, const vshCm - if (active) { - maxactive = virConnectNumOfStoragePools(ctl->conn); - if (maxactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active pools")); -+ vshError(ctl, "%s", _("Failed to list active pools")); - return FALSE; - } - if (maxactive) { -@@ -4132,7 +4123,7 @@ cmdPoolList(vshControl *ctl, const vshCm - - if ((maxactive = virConnectListStoragePools(ctl->conn, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active pools")); -+ vshError(ctl, "%s", _("Failed to list active pools")); - free(activeNames); - return FALSE; - } -@@ -4143,7 +4134,7 @@ cmdPoolList(vshControl *ctl, const vshCm - if (inactive) { - maxinactive = virConnectNumOfDefinedStoragePools(ctl->conn); - if (maxinactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive pools")); -+ vshError(ctl, "%s", _("Failed to list inactive pools")); - free(activeNames); - return FALSE; - } -@@ -4151,7 +4142,7 @@ cmdPoolList(vshControl *ctl, const vshCm - inactiveNames = vshMalloc(ctl, sizeof(char *) * maxinactive); - - if ((maxinactive = virConnectListDefinedStoragePools(ctl->conn, inactiveNames, maxinactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive pools")); -+ vshError(ctl, "%s", _("Failed to list inactive pools")); - free(activeNames); - free(inactiveNames); - return FALSE; -@@ -4273,10 +4264,10 @@ cmdPoolDiscoverSourcesAs(vshControl * ct - if (ret < 0) { - switch (errno) { - case ENOMEM: -- vshError(ctl, FALSE, "%s", _("Out of memory")); -+ vshError(ctl, "%s", _("Out of memory")); - break; - default: -- vshError(ctl, FALSE, _("virAsprintf failed (errno %d)"), errno); -+ vshError(ctl, _("virAsprintf failed (errno %d)"), errno); - } - return FALSE; - } -@@ -4285,7 +4276,7 @@ cmdPoolDiscoverSourcesAs(vshControl * ct - srcList = virConnectFindStoragePoolSources(ctl->conn, type, srcSpec, 0); - free(srcSpec); - if (srcList == NULL) { -- vshError(ctl, FALSE, _("Failed to find any %s pool sources"), type); -+ vshError(ctl, _("Failed to find any %s pool sources"), type); - return FALSE; - } - vshPrint(ctl, "%s", srcList); -@@ -4336,7 +4327,7 @@ cmdPoolDiscoverSources(vshControl * ctl, - srcList = virConnectFindStoragePoolSources(ctl->conn, type, srcSpec, 0); - free(srcSpec); - if (srcList == NULL) { -- vshError(ctl, FALSE, _("Failed to find any %s pool sources"), type); -+ vshError(ctl, _("Failed to find any %s pool sources"), type); - return FALSE; - } - vshPrint(ctl, "%s", srcList); -@@ -4503,8 +4494,7 @@ cmdPoolStart(vshControl *ctl, const vshC - vshPrint(ctl, _("Pool %s started\n"), - virStoragePoolGetName(pool)); - } else { -- vshError(ctl, FALSE, _("Failed to start pool %s"), -- virStoragePoolGetName(pool)); -+ vshError(ctl, _("Failed to start pool %s"), virStoragePoolGetName(pool)); - ret = FALSE; - } - -@@ -4585,12 +4575,12 @@ cmdVolCreateAs(vshControl *ctl, const vs - if (!found) - goto cleanup; - if (cmdVolSize(capacityStr, &capacity) < 0) -- vshError(ctl, FALSE, _("Malformed size %s"), capacityStr); -+ vshError(ctl, _("Malformed size %s"), capacityStr); - - allocationStr = vshCommandOptString(cmd, "allocation", &found); - if (allocationStr && - cmdVolSize(allocationStr, &allocation) < 0) -- vshError(ctl, FALSE, _("Malformed size %s"), allocationStr); -+ vshError(ctl, _("Malformed size %s"), allocationStr); - - format = vshCommandOptString(cmd, "format", &found); - -@@ -4623,7 +4613,7 @@ cmdVolCreateAs(vshControl *ctl, const vs - virStorageVolFree(vol); - return TRUE; - } else { -- vshError(ctl, FALSE, _("Failed to create vol %s"), name); -+ vshError(ctl, _("Failed to create vol %s"), name); - return FALSE; - } - -@@ -4664,7 +4654,7 @@ cmdPoolUndefine(vshControl *ctl, const v - if (virStoragePoolUndefine(pool) == 0) { - vshPrint(ctl, _("Pool %s has been undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine pool %s"), name); -+ vshError(ctl, _("Failed to undefine pool %s"), name); - ret = FALSE; - } - -@@ -4703,7 +4693,7 @@ cmdPoolUuid(vshControl *ctl, const vshCm - if (virStoragePoolGetUUIDString(pool, uuid) != -1) - vshPrint(ctl, "%s\n", uuid); - else -- vshError(ctl, FALSE, "%s", _("failed to get pool UUID")); -+ vshError(ctl, "%s", _("failed to get pool UUID")); - - virStoragePoolFree(pool); - return TRUE; -@@ -4762,7 +4752,7 @@ cmdVolCreate(vshControl *ctl, const vshC - virStorageVolGetName(vol), from); - virStorageVolFree(vol); - } else { -- vshError(ctl, FALSE, _("Failed to create vol from %s"), from); -+ vshError(ctl, _("Failed to create vol from %s"), from); - ret = FALSE; - } - return ret; -@@ -4819,7 +4809,7 @@ cmdVolCreateFrom(vshControl *ctl, const - vshPrint(ctl, _("Vol %s created from input vol %s\n"), - virStorageVolGetName(newvol), virStorageVolGetName(inputvol)); - } else { -- vshError(ctl, FALSE, _("Failed to create vol from %s"), from); -+ vshError(ctl, _("Failed to create vol from %s"), from); - goto cleanup; - } - -@@ -4901,7 +4891,7 @@ cmdVolClone(vshControl *ctl, const vshCm - - origpool = virStoragePoolLookupByVolume(origvol); - if (!origpool) { -- vshError(ctl, FALSE, "%s", _("failed to get parent pool")); -+ vshError(ctl, "%s", _("failed to get parent pool")); - goto cleanup; - } - -@@ -4925,7 +4915,7 @@ cmdVolClone(vshControl *ctl, const vshCm - vshPrint(ctl, _("Vol %s cloned from %s\n"), - virStorageVolGetName(newvol), virStorageVolGetName(origvol)); - } else { -- vshError(ctl, FALSE, _("Failed to clone vol from %s"), -+ vshError(ctl, _("Failed to clone vol from %s"), - virStorageVolGetName(origvol)); - goto cleanup; - } -@@ -4976,7 +4966,7 @@ cmdVolDelete(vshControl *ctl, const vshC - if (virStorageVolDelete(vol, 0) == 0) { - vshPrint(ctl, _("Vol %s deleted\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to delete vol %s"), name); -+ vshError(ctl, _("Failed to delete vol %s"), name); - ret = FALSE; - } - -@@ -5107,7 +5097,7 @@ cmdVolList(vshControl *ctl, const vshCmd - maxactive = virStoragePoolNumOfVolumes(pool); - if (maxactive < 0) { - virStoragePoolFree(pool); -- vshError(ctl, FALSE, "%s", _("Failed to list active vols")); -+ vshError(ctl, "%s", _("Failed to list active vols")); - return FALSE; - } - if (maxactive) { -@@ -5115,7 +5105,7 @@ cmdVolList(vshControl *ctl, const vshCmd - - if ((maxactive = virStoragePoolListVolumes(pool, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active vols")); -+ vshError(ctl, "%s", _("Failed to list active vols")); - free(activeNames); - virStoragePoolFree(pool); - return FALSE; -@@ -5288,12 +5278,11 @@ cmdSecretDefine(vshControl *ctl, const v - free (buffer); - - if (res == NULL) { -- vshError(ctl, FALSE, _("Failed to set attributes from %s"), from); -+ vshError(ctl, _("Failed to set attributes from %s"), from); - return FALSE; - } - if (virSecretGetUUIDString(res, &(uuid[0])) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to get UUID of created secret")); -+ vshError(ctl, "%s", _("Failed to get UUID of created secret")); - virSecretFree(res); - return FALSE; - } -@@ -5377,11 +5366,11 @@ cmdSecretSetValue(vshControl *ctl, const - goto cleanup; - - if (!base64_decode_alloc(base64, strlen(base64), &value, &value_size)) { -- vshError(ctl, FALSE, _("Invalid base64 data")); -+ vshError(ctl, _("Invalid base64 data")); - goto cleanup; - } - if (value == NULL) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - return FALSE; - } - -@@ -5390,7 +5379,7 @@ cmdSecretSetValue(vshControl *ctl, const - free (value); - - if (res != 0) { -- vshError(ctl, FALSE, "%s", _("Failed to set secret value")); -+ vshError(ctl, "%s", _("Failed to set secret value")); - goto cleanup; - } - vshPrint(ctl, "%s", _("Secret value set\n")); -@@ -5440,7 +5429,7 @@ cmdSecretGetValue(vshControl *ctl, const - free(value); - - if (base64 == NULL) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - goto cleanup; - } - printf("%s", base64); -@@ -5482,7 +5471,7 @@ cmdSecretUndefine(vshControl *ctl, const - return FALSE; - - if (virSecretUndefine(secret) < 0) { -- vshError(ctl, FALSE, _("Failed to delete secret %s"), uuid); -+ vshError(ctl, _("Failed to delete secret %s"), uuid); - goto cleanup; - } - vshPrint(ctl, _("Secret %s deleted\n"), uuid); -@@ -5513,14 +5502,14 @@ cmdSecretList(vshControl *ctl, const vsh - - maxuuids = virConnectNumOfSecrets(ctl->conn); - if (maxuuids < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list secrets")); -+ vshError(ctl, "%s", _("Failed to list secrets")); - return FALSE; - } - uuids = vshMalloc(ctl, sizeof(*uuids) * maxuuids); - - maxuuids = virConnectListSecrets(ctl->conn, uuids, maxuuids); - if (maxuuids < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list secrets")); -+ vshError(ctl, "%s", _("Failed to list secrets")); - free(uuids); - return FALSE; - } -@@ -5589,7 +5578,7 @@ cmdVersion(vshControl *ctl, const vshCmd - - hvType = virConnectGetType(ctl->conn); - if (hvType == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get hypervisor type")); -+ vshError(ctl, "%s", _("failed to get hypervisor type")); - return FALSE; - } - -@@ -5603,7 +5592,7 @@ cmdVersion(vshControl *ctl, const vshCmd - - ret = virGetVersion(&libVersion, hvType, &apiVersion); - if (ret < 0) { -- vshError(ctl, FALSE, "%s", _("failed to get the library version")); -+ vshError(ctl, "%s", _("failed to get the library version")); - return FALSE; - } - major = libVersion / 1000000; -@@ -5622,7 +5611,7 @@ cmdVersion(vshControl *ctl, const vshCmd - - ret = virConnectGetVersion(ctl->conn, &hvVersion); - if (ret < 0) { -- vshError(ctl, FALSE, "%s", _("failed to get the hypervisor version")); -+ vshError(ctl, "%s", _("failed to get the hypervisor version")); - return FALSE; - } - if (hvVersion == 0) { -@@ -5752,7 +5741,7 @@ cmdNodeListDevices (vshControl *ctl, con - - num_devices = virNodeNumOfDevices(ctl->conn, cap, 0); - if (num_devices < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to count node devices")); -+ vshError(ctl, "%s", _("Failed to count node devices")); - return FALSE; - } else if (num_devices == 0) { - return TRUE; -@@ -5762,7 +5751,7 @@ cmdNodeListDevices (vshControl *ctl, con - num_devices = - virNodeListDevices(ctl->conn, cap, devices, num_devices, 0); - if (num_devices < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list node devices")); -+ vshError(ctl, "%s", _("Failed to list node devices")); - free(devices); - return FALSE; - } -@@ -5835,7 +5824,7 @@ cmdNodeDeviceDumpXML (vshControl *ctl, c - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - -@@ -5878,14 +5867,14 @@ cmdNodeDeviceDettach (vshControl *ctl, c - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - - if (virNodeDeviceDettach(device) == 0) { - vshPrint(ctl, _("Device %s dettached\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to dettach device %s"), name); -+ vshError(ctl, _("Failed to dettach device %s"), name); - ret = FALSE; - } - virNodeDeviceFree(device); -@@ -5919,14 +5908,14 @@ cmdNodeDeviceReAttach (vshControl *ctl, - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - - if (virNodeDeviceReAttach(device) == 0) { - vshPrint(ctl, _("Device %s re-attached\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to re-attach device %s"), name); -+ vshError(ctl, _("Failed to re-attach device %s"), name); - ret = FALSE; - } - virNodeDeviceFree(device); -@@ -5960,14 +5949,14 @@ cmdNodeDeviceReset (vshControl *ctl, con - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - - if (virNodeDeviceReset(device) == 0) { - vshPrint(ctl, _("Device %s reset\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to reset device %s"), name); -+ vshError(ctl, _("Failed to reset device %s"), name); - ret = FALSE; - } - virNodeDeviceFree(device); -@@ -5993,7 +5982,7 @@ cmdHostname (vshControl *ctl, const vshC - - hostname = virConnectGetHostname (ctl->conn); - if (hostname == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get hostname")); -+ vshError(ctl, "%s", _("failed to get hostname")); - return FALSE; - } - -@@ -6022,7 +6011,7 @@ cmdURI (vshControl *ctl, const vshCmd *c - - uri = virConnectGetURI (ctl->conn); - if (uri == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get URI")); -+ vshError(ctl, "%s", _("failed to get URI")); - return FALSE; - } - -@@ -6200,7 +6189,7 @@ cmdAttachDevice(vshControl *ctl, const v - - from = vshCommandOptString(cmd, "file", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("attach-device: Missing option")); -+ vshError(ctl, "%s", _("attach-device: Missing option")); - virDomainFree(dom); - return FALSE; - } -@@ -6214,7 +6203,7 @@ cmdAttachDevice(vshControl *ctl, const v - free (buffer); - - if (ret < 0) { -- vshError(ctl, FALSE, _("Failed to attach device from %s"), from); -+ vshError(ctl, _("Failed to attach device from %s"), from); - virDomainFree(dom); - return FALSE; - } else { -@@ -6258,7 +6247,7 @@ cmdDetachDevice(vshControl *ctl, const v - - from = vshCommandOptString(cmd, "file", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("detach-device: Missing option")); -+ vshError(ctl, "%s", _("detach-device: Missing option")); - virDomainFree(dom); - return FALSE; - } -@@ -6272,7 +6261,7 @@ cmdDetachDevice(vshControl *ctl, const v - free (buffer); - - if (ret < 0) { -- vshError(ctl, FALSE, _("Failed to detach device from %s"), from); -+ vshError(ctl, _("Failed to detach device from %s"), from); - virDomainFree(dom); - return FALSE; - } else { -@@ -6331,7 +6320,7 @@ cmdAttachInterface(vshControl *ctl, cons - } else if (STREQ(type, "bridge")) { - typ = 2; - } else { -- vshError(ctl, FALSE, _("No support %s in command 'attach-interface'"), type); -+ vshError(ctl, _("No support %s in command 'attach-interface'"), type); - goto cleanup; - } - -@@ -6450,12 +6439,12 @@ cmdDetachInterface(vshControl *ctl, cons - XML_PARSE_NOWARNING); - free(doc); - if (!xml) { -- vshError(ctl, FALSE, "%s", _("Failed to get interface information")); -+ vshError(ctl, "%s", _("Failed to get interface information")); - goto cleanup; - } - ctxt = xmlXPathNewContext(xml); - if (!ctxt) { -- vshError(ctl, FALSE, "%s", _("Failed to get interface information")); -+ vshError(ctl, "%s", _("Failed to get interface information")); - goto cleanup; - } - -@@ -6463,7 +6452,7 @@ cmdDetachInterface(vshControl *ctl, cons - obj = xmlXPathEval(BAD_CAST buf, ctxt); - if ((obj == NULL) || (obj->type != XPATH_NODESET) || - (obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0)) { -- vshError(ctl, FALSE, _("No found interface whose type is %s"), type); -+ vshError(ctl, _("No found interface whose type is %s"), type); - goto cleanup; - } - -@@ -6485,18 +6474,18 @@ cmdDetachInterface(vshControl *ctl, cons - cur = cur->next; - } - } -- vshError(ctl, FALSE, _("No found interface whose MAC address is %s"), mac); -+ vshError(ctl, _("No found interface whose MAC address is %s"), mac); - goto cleanup; - - hit: - xml_buf = xmlBufferCreate(); - if (!xml_buf) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - goto cleanup; - } - - if(xmlNodeDump(xml_buf, xml, obj->nodesetval->nodeTab[i], 0, 0) < 0){ -- vshError(ctl, FALSE, "%s", _("Failed to create XML")); -+ vshError(ctl, "%s", _("Failed to create XML")); - goto cleanup; - } - -@@ -6569,14 +6558,14 @@ cmdAttachDisk(vshControl *ctl, const vsh - if (STREQ(driver, "file") || STREQ(driver, "tap")) { - isFile = 1; - } else if (STRNEQ(driver, "phy")) { -- vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), driver); -+ vshError(ctl, _("No support %s in command 'attach-disk'"), driver); - goto cleanup; - } - } - - if (mode) { - if (STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) { -- vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), mode); -+ vshError(ctl, _("No support %s in command 'attach-disk'"), mode); - goto cleanup; - } - } -@@ -6723,19 +6712,19 @@ cmdDetachDisk(vshControl *ctl, const vsh - XML_PARSE_NOWARNING); - free(doc); - if (!xml) { -- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); -+ vshError(ctl, "%s", _("Failed to get disk information")); - goto cleanup; - } - ctxt = xmlXPathNewContext(xml); - if (!ctxt) { -- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); -+ vshError(ctl, "%s", _("Failed to get disk information")); - goto cleanup; - } - - obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt); - if ((obj == NULL) || (obj->type != XPATH_NODESET) || - (obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0)) { -- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); -+ vshError(ctl, "%s", _("Failed to get disk information")); - goto cleanup; - } - -@@ -6754,18 +6743,18 @@ cmdDetachDisk(vshControl *ctl, const vsh - cur = cur->next; - } - } -- vshError(ctl, FALSE, _("No found disk whose target is %s"), target); -+ vshError(ctl, _("No found disk whose target is %s"), target); - goto cleanup; - - hit: - xml_buf = xmlBufferCreate(); - if (!xml_buf) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - goto cleanup; - } - - if(xmlNodeDump(xml_buf, xml, obj->nodesetval->nodeTab[i], 0, 0) < 0){ -- vshError(ctl, FALSE, "%s", _("Failed to create XML")); -+ vshError(ctl, "%s", _("Failed to create XML")); - goto cleanup; - } - -@@ -6799,9 +6788,8 @@ editWriteToTempFile (vshControl *ctl, co - - ret = malloc (PATH_MAX); - if (!ret) { -- vshError(ctl, FALSE, -- _("malloc: failed to allocate temporary file name: %s"), -- strerror (errno)); -+ vshError(ctl, _("malloc: failed to allocate temporary file name: %s"), -+ strerror(errno)); - return NULL; - } - -@@ -6810,25 +6798,22 @@ editWriteToTempFile (vshControl *ctl, co - snprintf (ret, PATH_MAX, "%s/virshXXXXXX", tmpdir); - fd = mkstemp (ret); - if (fd == -1) { -- vshError(ctl, FALSE, -- _("mkstemp: failed to create temporary file: %s"), -- strerror (errno)); -+ vshError(ctl, _("mkstemp: failed to create temporary file: %s"), -+ strerror(errno)); - return NULL; - } - - if (safewrite (fd, doc, strlen (doc)) == -1) { -- vshError(ctl, FALSE, -- _("write: %s: failed to write to temporary file: %s"), -- ret, strerror (errno)); -+ vshError(ctl, _("write: %s: failed to write to temporary file: %s"), -+ ret, strerror(errno)); - close (fd); - unlink (ret); - free (ret); - return NULL; - } - if (close (fd) == -1) { -- vshError(ctl, FALSE, -- _("close: %s: failed to write or close temporary file: %s"), -- ret, strerror (errno)); -+ vshError(ctl, _("close: %s: failed to write or close temporary file: %s"), -+ ret, strerror(errno)); - unlink (ret); - free (ret); - return NULL; -@@ -6856,35 +6841,37 @@ editFile (vshControl *ctl, const char *f - * it does, refuse to run. - */ - if (strspn (editor, ACCEPTED_CHARS) != strlen (editor)) { -- vshError(ctl, FALSE, -- _("%s: $EDITOR environment variable contains shell meta or other unacceptable characters"), -+ vshError(ctl, -+ _("%s: $EDITOR environment variable contains shell meta or " -+ "other unacceptable characters"), - editor); - return -1; - } - /* Same for the filename. */ - if (strspn (filename, ACCEPTED_CHARS) != strlen (filename)) { -- vshError(ctl, FALSE, -- _("%s: temporary filename contains shell meta or other unacceptable characters (is $TMPDIR wrong?)"), -+ vshError(ctl, -+ _("%s: temporary filename contains shell meta or other " -+ "unacceptable characters (is $TMPDIR wrong?)"), - filename); - return -1; - } - - if (virAsprintf(&command, "%s %s", editor, filename) == -1) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("virAsprintf: could not create editing command: %s"), -- strerror (errno)); -+ strerror(errno)); - return -1; - } - - command_ret = system (command); - if (command_ret == -1) { -- vshError(ctl, FALSE, -- _("%s: edit command failed: %s"), command, strerror (errno)); -+ vshError(ctl, -+ _("%s: edit command failed: %s"), command, strerror(errno)); - free (command); - return -1; - } - if (command_ret != WEXITSTATUS (0)) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("%s: command exited with non-zero status"), command); - free (command); - return -1; -@@ -6899,9 +6886,9 @@ editReadBackFile (vshControl *ctl, const - char *ret; - - if (virFileReadAll (filename, VIRSH_MAX_XML_FILE, &ret) == -1) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("%s: failed to read temporary file: %s"), -- filename, strerror (errno)); -+ filename, strerror(errno)); - return NULL; - } - return ret; -@@ -6930,8 +6917,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd - int found; - - if (!ctl->imode) { -- vshError(ctl, FALSE, "%s", -- _("cd: command valid only in interactive mode")); -+ vshError(ctl, "%s", _("cd: command valid only in interactive mode")); - return -1; - } - -@@ -6944,7 +6930,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd - dir = "/"; - - if (chdir (dir) == -1) { -- vshError(ctl, FALSE, _("cd: %s: %s"), strerror (errno), dir); -+ vshError(ctl, _("cd: %s: %s"), strerror(errno), dir); - return -1; - } - -@@ -6982,7 +6968,8 @@ cmdPwd(vshControl *ctl, const vshCmd *cm - } - - if (err) -- vshError(ctl, FALSE, _("pwd: cannot get current directory: %s"), strerror (errno)); -+ vshError(ctl, _("pwd: cannot get current directory: %s"), -+ strerror(errno)); - else - vshPrint (ctl, _("%s\n"), cwd); - -@@ -7062,8 +7049,8 @@ cmdEdit (vshControl *ctl, const vshCmd * - goto cleanup; - - if (STRNEQ (doc, doc_reread)) { -- vshError (ctl, FALSE, -- "%s", _("ERROR: the XML configuration was changed by another user")); -+ vshError(ctl, -+ "%s", _("ERROR: the XML configuration was changed by another user")); - goto cleanup; - } - -@@ -7348,7 +7335,7 @@ vshCommandCheckOpts(vshControl *ctl, con - o = o->next; - } - if (!ok) { -- vshError(ctl, FALSE, -+ vshError(ctl, - d->type == VSH_OT_DATA ? - _("command '%s' requires <%s> option") : - _("command '%s' requires --%s option"), -@@ -7378,7 +7365,7 @@ vshCmddefHelp(vshControl *ctl, const cha - const vshCmdDef *def = vshCmddefSearch(cmdname); - - if (!def) { -- vshError(ctl, FALSE, _("command '%s' doesn't exist"), cmdname); -+ vshError(ctl, _("command '%s' doesn't exist"), cmdname); - return FALSE; - } else { - const char *desc = N_(vshCmddefGetInfo(def, "desc")); -@@ -7577,8 +7564,7 @@ cmd_has_option (vshControl *ctl, const v - } - - if (!found) -- vshError(ctl, FALSE, -- _("internal error: virsh %s: no %s VSH_OT_DATA option"), -+ vshError(ctl, _("internal error: virsh %s: no %s VSH_OT_DATA option"), - cmd->def->name, optname); - return found; - } -@@ -7595,7 +7581,7 @@ vshCommandOptDomainBy(vshControl *ctl, c - return NULL; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined domain name or id")); -+ vshError(ctl, "%s", _("undefined domain name or id")); - return NULL; - } - -@@ -7627,7 +7613,7 @@ vshCommandOptDomainBy(vshControl *ctl, c - } - - if (!dom) -- vshError(ctl, FALSE, _("failed to get domain '%s'"), n); -+ vshError(ctl, _("failed to get domain '%s'"), n); - - return dom; - } -@@ -7643,7 +7629,7 @@ vshCommandOptNetworkBy(vshControl *ctl, - return NULL; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined network name")); -+ vshError(ctl, "%s", _("undefined network name")); - return NULL; - } - -@@ -7667,7 +7653,7 @@ vshCommandOptNetworkBy(vshControl *ctl, - } - - if (!network) -- vshError(ctl, FALSE, _("failed to get network '%s'"), n); -+ vshError(ctl, _("failed to get network '%s'"), n); - - return network; - } -@@ -7683,7 +7669,7 @@ vshCommandOptInterfaceBy(vshControl *ctl - return NULL; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined interface identifier")); -+ vshError(ctl, "%s", _("undefined interface identifier")); - return NULL; - } - -@@ -7707,7 +7693,7 @@ vshCommandOptInterfaceBy(vshControl *ctl - } - - if (!iface) -- vshError(ctl, FALSE, _("failed to get interface '%s'"), n); -+ vshError(ctl, _("failed to get interface '%s'"), n); - - return iface; - } -@@ -7720,7 +7706,7 @@ vshCommandOptPoolBy(vshControl *ctl, con - char *n; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined pool name")); -+ vshError(ctl, "%s", _("undefined pool name")); - return NULL; - } - -@@ -7744,7 +7730,7 @@ vshCommandOptPoolBy(vshControl *ctl, con - } - - if (!pool) -- vshError(ctl, FALSE, _("failed to get pool '%s'"), n); -+ vshError(ctl, _("failed to get pool '%s'"), n); - - return pool; - } -@@ -7761,12 +7747,12 @@ vshCommandOptVolBy(vshControl *ctl, cons - int found; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined vol name")); -+ vshError(ctl, "%s", _("undefined vol name")); - return NULL; - } - - if (!(p = vshCommandOptString(cmd, pooloptname, &found)) && found) { -- vshError(ctl, FALSE, "%s", _("undefined pool name")); -+ vshError(ctl, "%s", _("undefined pool name")); - return NULL; - } - -@@ -7797,7 +7783,7 @@ vshCommandOptVolBy(vshControl *ctl, cons - } - - if (!vol) -- vshError(ctl, FALSE, _("failed to get vol '%s'"), n); -+ vshError(ctl, _("failed to get vol '%s'"), n); - - if (pool) - virStoragePoolFree(pool); -@@ -7817,7 +7803,7 @@ vshCommandOptSecret(vshControl *ctl, con - - n = vshCommandOptString(cmd, optname, NULL); - if (n == NULL) { -- vshError(ctl, FALSE, "%s", _("undefined secret UUID")); -+ vshError(ctl, "%s", _("undefined secret UUID")); - return NULL; - } - -@@ -7829,7 +7815,7 @@ vshCommandOptSecret(vshControl *ctl, con - secret = virSecretLookupByUUIDString(ctl->conn, n); - - if (secret == NULL) -- vshError(ctl, FALSE, _("failed to get secret '%s'"), n); -+ vshError(ctl, _("failed to get secret '%s'"), n); - - return secret; - } -@@ -7934,7 +7920,7 @@ vshCommandGetToken(vshControl *ctl, char - sz++; - } - if (quote) { -- vshError(ctl, FALSE, "%s", _("missing \"")); -+ vshError(ctl, "%s", _("missing \"")); - return VSH_TK_ERROR; - } - if (tkstr == NULL || *tkstr == '\0' || p == NULL) -@@ -7994,19 +7980,19 @@ vshCommandParse(vshControl *ctl, char *c - if (cmd == NULL) { - /* first token must be command name */ - if (tk != VSH_TK_DATA) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("unexpected token (command name): '%s'"), - tkdata); - goto syntaxError; - } - if (!(cmd = vshCmddefSearch(tkdata))) { -- vshError(ctl, FALSE, _("unknown command: '%s'"), tkdata); -+ vshError(ctl, _("unknown command: '%s'"), tkdata); - goto syntaxError; /* ... or ignore this command only? */ - } - free(tkdata); - } else if (tk == VSH_TK_OPTION) { - if (!(opt = vshCmddefGetOption(cmd, tkdata))) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("command '%s' doesn't support option --%s"), - cmd->name, tkdata); - goto syntaxError; -@@ -8021,7 +8007,7 @@ vshCommandParse(vshControl *ctl, char *c - if (tk == VSH_TK_ERROR) - goto syntaxError; - if (tk != VSH_TK_DATA) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("expected syntax: --%s <%s>"), - opt->name, - opt->type == -@@ -8031,7 +8017,7 @@ vshCommandParse(vshControl *ctl, char *c - } - } else if (tk == VSH_TK_DATA) { - if (!(opt = vshCmddefGetData(cmd, data_ct++))) { -- vshError(ctl, FALSE, _("unexpected data '%s'"), tkdata); -+ vshError(ctl, _("unexpected data '%s'"), tkdata); - goto syntaxError; - } - } -@@ -8143,7 +8129,7 @@ vshConnectionUsability(vshControl *ctl, - */ - if (!conn) { - if (showerror) -- vshError(ctl, FALSE, "%s", _("no valid connection")); -+ vshError(ctl, "%s", _("no valid connection")); - return FALSE; - } - return TRUE; -@@ -8181,7 +8167,7 @@ vshPrintExtra(vshControl *ctl, const cha - - - static void --vshError(vshControl *ctl, int doexit, const char *format, ...) -+vshError(vshControl *ctl, const char *format, ...) - { - va_list ap; - -@@ -8189,22 +8175,13 @@ vshError(vshControl *ctl, int doexit, co - vshOutputLogFile(ctl, VSH_ERR_ERROR, format, ap); - va_end(ap); - -- if (doexit) -- fprintf(stderr, _("%s: error: "), progname); -- else -- fputs(_("error: "), stderr); -+ fputs(_("error: "), stderr); - - va_start(ap, format); - vfprintf(stderr, format, ap); - va_end(ap); - - fputc('\n', stderr); -- -- if (doexit) { -- if (ctl) -- vshDeinit(ctl); -- exit(EXIT_FAILURE); -- } - } - - static void * -@@ -8214,9 +8191,9 @@ _vshMalloc(vshControl *ctl, size_t size, - - if ((x = malloc(size))) - return x; -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) size); -- return NULL; -+ exit(EXIT_FAILURE); - } - - static void * -@@ -8226,9 +8203,9 @@ _vshCalloc(vshControl *ctl, size_t nmemb - - if ((x = calloc(nmemb, size))) - return x; -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) (size*nmemb)); -- return NULL; -+ exit(EXIT_FAILURE); - } - - static void * -@@ -8239,9 +8216,9 @@ _vshRealloc(vshControl *ctl, void *ptr, - if ((x = realloc(ptr, size))) - return x; - free(ptr); -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) size); -- return NULL; -+ exit(EXIT_FAILURE); - } - - static char * -@@ -8253,9 +8230,9 @@ _vshStrdup(vshControl *ctl, const char * - return(NULL); - if ((x = strdup(s))) - return x; -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %lu bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %lu bytes"), - filename, line, (unsigned long)strlen(s)); -- return NULL; -+ exit(EXIT_FAILURE); - } - - /* -@@ -8283,7 +8260,7 @@ vshInit(vshControl *ctl) - */ - if (!ctl->conn) { - virshReportError(ctl); -- vshError(ctl, FALSE, "%s", _("failed to connect to the hypervisor")); -+ vshError(ctl, "%s", _("failed to connect to the hypervisor")); - return FALSE; - } - -@@ -8314,20 +8291,22 @@ vshOpenLogFile(vshControl *ctl) - case ENOENT: - break; - default: -- vshError(ctl, TRUE, "%s", -+ vshError(ctl, "%s", - _("failed to get the log file information")); -- break; -+ exit(EXIT_FAILURE); - } - } else { - if (!S_ISREG(st.st_mode)) { -- vshError(ctl, TRUE, "%s", _("the log path is not a file")); -+ vshError(ctl, "%s", _("the log path is not a file")); -+ exit(EXIT_FAILURE); - } - } - - /* log file open */ - if ((ctl->log_fd = open(ctl->logfile, LOGFILE_FLAGS, FILE_MODE)) < 0) { -- vshError(ctl, TRUE, "%s", -+ vshError(ctl, "%s", - _("failed to open the log file. check the log file path")); -+ exit(EXIT_FAILURE); - } - } - -@@ -8395,7 +8374,7 @@ vshOutputLogFile(vshControl *ctl, int lo - /* write log */ - if (safewrite(ctl->log_fd, msg_buf, strlen(msg_buf)) < 0) { - vshCloseLogFile(ctl); -- vshError(ctl, FALSE, "%s", _("failed to write the log file")); -+ vshError(ctl, "%s", _("failed to write the log file")); - } - } - -@@ -8410,7 +8389,7 @@ vshCloseLogFile(vshControl *ctl) - /* log file close */ - if (ctl->log_fd >= 0) { - if (close(ctl->log_fd) < 0) -- vshError(ctl, FALSE, _("%s: failed to write log file: %s"), -+ vshError(ctl, _("%s: failed to write log file: %s"), - ctl->logfile ? ctl->logfile : "?", strerror (errno)); - ctl->log_fd = -1; - } -@@ -8588,9 +8567,7 @@ vshDeinit(vshControl *ctl) - free(ctl->name); - if (ctl->conn) { - if (virConnectClose(ctl->conn) != 0) { -- ctl->conn = NULL; /* prevent recursive call from vshError() */ -- vshError(ctl, TRUE, "%s", -- _("failed to disconnect from the hypervisor")); -+ vshError(ctl, "%s", _("failed to disconnect from the hypervisor")); - } - } - virResetLastError(); -@@ -8715,16 +8692,16 @@ vshParseArgv(vshControl *ctl, int argc, - ctl->logfile = vshStrdup(ctl, optarg); - break; - default: -- vshError(ctl, TRUE, -- _("unsupported option '-%c'. See --help."), arg); -- break; -+ vshError(ctl, _("unsupported option '-%c'. See --help."), arg); -+ exit(EXIT_FAILURE); - } - } - - if (help) { -- if (end < argc) -- vshError(ctl, TRUE, -- _("extra argument '%s'. See --help."), argv[end]); -+ if (end < argc) { -+ vshError(ctl, _("extra argument '%s'. See --help."), argv[end]); -+ exit(EXIT_FAILURE); -+ } - - /* list all command */ - vshUsage(); diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 73c0874..ab37e00 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/src/xend_internal.c +Index: libvirt-0.7.1/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xend_internal.c -+++ libvirt-0.7.1/src/xend_internal.c +--- libvirt-0.7.1.orig/src/xen/xend_internal.c ++++ libvirt-0.7.1/src/xen/xend_internal.c @@ -5306,7 +5306,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); diff --git a/xen-refcnt.patch b/xen-refcnt.patch deleted file mode 100644 index c54934c..0000000 --- a/xen-refcnt.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: libvirt-0.7.1/src/xen_inotify.c -=================================================================== ---- libvirt-0.7.1.orig/src/xen_inotify.c -+++ libvirt-0.7.1/src/xen_inotify.c -@@ -463,7 +463,6 @@ xenInotifyOpen(virConnectPtr conn ATTRIB - DEBUG0("Failed to add inotify handle, disabling events"); - } - -- virConnectRef(conn); - return 0; - } - -@@ -486,7 +485,6 @@ xenInotifyClose(virConnectPtr conn) - if (priv->inotifyWatch != -1) - virEventRemoveHandle(priv->inotifyWatch); - close(priv->inotifyFD); -- virUnrefConnect(conn); - - return 0; - } -Index: libvirt-0.7.1/src/xs_internal.c -=================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.c -+++ libvirt-0.7.1/src/xs_internal.c -@@ -1139,8 +1139,6 @@ int xenStoreAddWatch(virConnectPtr conn, - list->watches[n] = watch; - list->count++; - -- conn->refs++; -- - return xs_watch(priv->xshandle, watch->path, watch->token); - } - -@@ -1190,7 +1188,6 @@ int xenStoreRemoveWatch(virConnectPtr co - ; /* Failure to reduce memory allocation isn't fatal */ - } - list->count--; -- virUnrefConnect(conn); - return 0; - } - } From ec6b777cf3ae390d2f0005f81eb340a733866f08902547541e1b70234424bf2d Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Fri, 16 Oct 2009 04:31:39 +0000 Subject: [PATCH 03/12] Updated to libvirt 0.7.2 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=18 --- detach-disk.patch | 24 +- devmap-no-pkgconfig.patch | 10 +- fs-ocfs2.patch | 14 +- libvirt.changes | 11 + libvirt.spec | 6 +- libvirtd-defaults.patch | 16 +- migrate-params.patch | 8 +- snapshots.patch | 512 ++++++++++++++++---------------------- socat.patch | 8 +- suse-network.patch | 28 +-- xen-pv-cdrom.patch | 8 +- 11 files changed, 283 insertions(+), 362 deletions(-) diff --git a/detach-disk.patch b/detach-disk.patch index c62b2e5..834deec 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xen/xend_internal.c -+++ libvirt-0.7.1/src/xen/xend_internal.c -@@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain, +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain, return -1; xenUnifiedLock(priv); xref = xenStoreDomainGetDiskID(domain->conn, domain->id, @@ -11,11 +11,11 @@ Index: libvirt-0.7.1/src/xen/xend_internal.c xenUnifiedUnlock(priv); if (xref == NULL) return -1; -Index: libvirt-0.7.1/src/xen/xs_internal.c +Index: libvirt-0.7.2/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xen/xs_internal.c -+++ libvirt-0.7.1/src/xen/xs_internal.c -@@ -966,7 +966,8 @@ xenStoreDomainGetNetworkID(virConnectPtr +--- libvirt-0.7.2.orig/src/xen/xs_internal.c ++++ libvirt-0.7.2/src/xen/xs_internal.c +@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr * freed by the caller. */ char * @@ -25,7 +25,7 @@ Index: libvirt-0.7.1/src/xen/xs_internal.c char dir[80], path[128], **list = NULL, *val = NULL; unsigned int devlen, len, i, num; char *ret = NULL; -@@ -984,7 +985,7 @@ xenStoreDomainGetDiskID(virConnectPtr co +@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co if (devlen <= 0) return (NULL); @@ -34,10 +34,10 @@ Index: libvirt-0.7.1/src/xen/xs_internal.c list = xs_directory(priv->xshandle, 0, dir, &num); if (list != NULL) { for (i = 0; i < num; i++) { -Index: libvirt-0.7.1/src/xen/xs_internal.h +Index: libvirt-0.7.2/src/xen/xs_internal.h =================================================================== ---- libvirt-0.7.1.orig/src/xen/xs_internal.h -+++ libvirt-0.7.1/src/xen/xs_internal.h +--- libvirt-0.7.2.orig/src/xen/xs_internal.h ++++ libvirt-0.7.2/src/xen/xs_internal.h @@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo const char *mac); char * xenStoreDomainGetDiskID(virConnectPtr conn, diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch index 6956081..78d9b22 100644 --- a/devmap-no-pkgconfig.patch +++ b/devmap-no-pkgconfig.patch @@ -1,8 +1,8 @@ -diff --git a/configure.in b/configure.in -index cb5ce55..d1711fd 100644 ---- a/configure.in -+++ b/configure.in -@@ -1227,11 +1227,22 @@ if test "$with_storage_mpath" = "yes"; then +Index: libvirt-0.7.2/configure.in +=================================================================== +--- libvirt-0.7.2.orig/configure.in ++++ libvirt-0.7.2/configure.in +@@ -1304,11 +1304,22 @@ if test "$with_storage_mpath" = "yes"; t DEVMAPPER_REQUIRED=0.0 DEVMAPPER_CFLAGS= DEVMAPPER_LIBS= diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch index 36ec839..95e84c7 100644 --- a/fs-ocfs2.patch +++ b/fs-ocfs2.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/conf/storage_conf.c +Index: libvirt-0.7.2/src/conf/storage_conf.c =================================================================== ---- libvirt-0.7.1.orig/src/conf/storage_conf.c -+++ libvirt-0.7.1/src/conf/storage_conf.c -@@ -59,7 +59,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy +--- libvirt-0.7.2.orig/src/conf/storage_conf.c ++++ libvirt-0.7.2/src/conf/storage_conf.c +@@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy VIR_STORAGE_POOL_FS_LAST, "auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf", @@ -11,10 +11,10 @@ Index: libvirt-0.7.1/src/conf/storage_conf.c VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, VIR_STORAGE_POOL_NETFS_LAST, -Index: libvirt-0.7.1/src/conf/storage_conf.h +Index: libvirt-0.7.2/src/conf/storage_conf.h =================================================================== ---- libvirt-0.7.1.orig/src/conf/storage_conf.h -+++ libvirt-0.7.1/src/conf/storage_conf.h +--- libvirt-0.7.2.orig/src/conf/storage_conf.h ++++ libvirt-0.7.2/src/conf/storage_conf.h @@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { VIR_STORAGE_POOL_FS_VFAT, VIR_STORAGE_POOL_FS_HFSPLUS, diff --git a/libvirt.changes b/libvirt.changes index b4c5d4f..a920175 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Oct 15 22:26:35 MDT 2009 - jfehlig@novell.com + +- Updated to version 0.7.2 + - sVirt AppArmor security driver + - Add public API definition for data stream handling + - ESX add esxDomainDefineXML() + - LXC: suspend/resume support + - Big code tree cleanup + - Lots of bug fixes and improvements + ------------------------------------------------------------------- Tue Oct 13 16:28:03 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index b5c4960..7de06ff 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.1) +# spec file for package libvirt (Version 0.7.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -102,7 +102,7 @@ Patch104: detach-disk.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: suse-network.patch -#BFRPatch202: snapshots.patch +Patch202: snapshots.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -203,7 +203,7 @@ Authors: %patch104 -p1 %patch200 -p1 %patch201 -p1 -#BFR%patch202 -p1 +%patch202 -p1 %build %if ! %{with_xen} diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index 8a16dfa..ac89e2a 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/daemon/libvirtd.conf +Index: libvirt-0.7.2/daemon/libvirtd.conf =================================================================== ---- libvirt-0.7.1.orig/daemon/libvirtd.conf -+++ libvirt-0.7.1/daemon/libvirtd.conf +--- libvirt-0.7.2.orig/daemon/libvirtd.conf ++++ libvirt-0.7.2/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.7.1/daemon/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.1/daemon/libvirtd.c +Index: libvirt-0.7.2/daemon/libvirtd.c =================================================================== ---- libvirt-0.7.1.orig/daemon/libvirtd.c -+++ libvirt-0.7.1/daemon/libvirtd.c -@@ -134,7 +134,7 @@ static int sigwrite = -1; /* Signa +--- libvirt-0.7.2.orig/daemon/libvirtd.c ++++ libvirt-0.7.2/daemon/libvirtd.c +@@ -135,7 +135,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ /* Defaults for configuration file elements */ @@ -41,7 +41,7 @@ Index: libvirt-0.7.1/daemon/libvirtd.c static int listen_tcp = 0; static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR; static char *tls_port = (char *) LIBVIRTD_TLS_PORT; -@@ -156,7 +156,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; +@@ -157,7 +157,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; #endif static int auth_tls = REMOTE_AUTH_NONE; diff --git a/migrate-params.patch b/migrate-params.patch index 7a800d2..fbcf3d9 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.6.5/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.6.5.orig/src/xen/xend_internal.c -+++ libvirt-0.6.5/src/xen/xend_internal.c -@@ -4480,6 +4480,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -4491,6 +4491,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/snapshots.patch b/snapshots.patch index d4a32f6..a2a32dc 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/include/libvirt/libvirt.h.in +Index: libvirt-0.7.2/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.1.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.1/include/libvirt/libvirt.h.in -@@ -537,6 +537,21 @@ int virDomainRestore +--- libvirt-0.7.2.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.2/include/libvirt/libvirt.h.in +@@ -561,6 +561,21 @@ int virDomainRestore const char *from); /* @@ -24,16 +24,14 @@ Index: libvirt-0.7.1/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.1/src/libvirt.c +Index: libvirt-0.7.2/src/libvirt.c =================================================================== ---- libvirt-0.7.1.orig/src/libvirt.c -+++ libvirt-0.7.1/src/libvirt.c -@@ -2245,6 +2245,168 @@ error: - return -1; +--- libvirt-0.7.2.orig/src/libvirt.c ++++ libvirt-0.7.2/src/libvirt.c +@@ -2234,6 +2234,166 @@ error: } -+ -+/** + /** + * virDomainSnapshotCreate: + * @domain: a domain object + * @name: name for the new snapshot @@ -193,15 +191,15 @@ Index: libvirt-0.7.1/src/libvirt.c + return -1; +} + -+ - /** ++/** * virDomainCoreDump: * @domain: a domain object -Index: libvirt-0.7.1/src/driver.h + * @to: path for the core file +Index: libvirt-0.7.2/src/driver.h =================================================================== ---- libvirt-0.7.1.orig/src/driver.h -+++ libvirt-0.7.1/src/driver.h -@@ -152,6 +152,21 @@ typedef int +--- libvirt-0.7.2.orig/src/driver.h ++++ libvirt-0.7.2/src/driver.h +@@ -133,6 +133,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); typedef int @@ -223,10 +221,10 @@ Index: libvirt-0.7.1/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -427,6 +442,11 @@ struct _virDriver { - virDrvNodeDeviceDettach nodeDeviceDettach; +@@ -418,6 +433,11 @@ struct _virDriver { virDrvNodeDeviceReAttach nodeDeviceReAttach; virDrvNodeDeviceReset nodeDeviceReset; + virDrvDomainMigratePrepareTunnel domainMigratePrepareTunnel; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -235,11 +233,11 @@ Index: libvirt-0.7.1/src/driver.h }; typedef int -Index: libvirt-0.7.1/src/xen_unified.c +Index: libvirt-0.7.2/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/xen_unified.c -+++ libvirt-0.7.1/src/xen_unified.c -@@ -952,6 +952,81 @@ xenUnifiedDomainRestore (virConnectPtr c +--- libvirt-0.7.2.orig/src/xen/xen_driver.c ++++ libvirt-0.7.2/src/xen/xen_driver.c +@@ -955,6 +955,81 @@ xenUnifiedDomainRestore (virConnectPtr c } static int @@ -321,10 +319,10 @@ Index: libvirt-0.7.1/src/xen_unified.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1722,6 +1797,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedNodeDeviceDettach, /* nodeDeviceDettach */ +@@ -1726,6 +1801,11 @@ static virDriver xenUnifiedDriver = { xenUnifiedNodeDeviceReAttach, /* nodeDeviceReAttach */ xenUnifiedNodeDeviceReset, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + xenUnifiedDomainSnapshotCreate, + xenUnifiedDomainSnapshotApply, + xenUnifiedDomainSnapshotDelete, @@ -333,10 +331,10 @@ Index: libvirt-0.7.1/src/xen_unified.c }; /** -Index: libvirt-0.7.1/src/xen_unified.h +Index: libvirt-0.7.2/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.1.orig/src/xen_unified.h -+++ libvirt-0.7.1/src/xen_unified.h +--- libvirt-0.7.2.orig/src/xen/xen_driver.h ++++ libvirt-0.7.2/src/xen/xen_driver.h @@ -98,6 +98,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; @@ -349,10 +347,10 @@ Index: libvirt-0.7.1/src/xen_unified.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.1/src/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xend_internal.c -+++ libvirt-0.7.1/src/xend_internal.c +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -366,7 +364,7 @@ Index: libvirt-0.7.1/src/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3248,6 +3254,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3257,6 +3263,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -454,7 +452,7 @@ Index: libvirt-0.7.1/src/xend_internal.c #endif /* !PROXY */ /** -@@ -5064,6 +5151,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5082,6 +5169,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -466,10 +464,10 @@ Index: libvirt-0.7.1/src/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.1/src/proxy_internal.c +Index: libvirt-0.7.2/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/proxy_internal.c -+++ libvirt-0.7.1/src/proxy_internal.c +--- libvirt-0.7.2.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.2/src/xen/proxy_internal.c @@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -482,11 +480,11 @@ Index: libvirt-0.7.1/src/proxy_internal.c }; -Index: libvirt-0.7.1/src/xen_internal.c +Index: libvirt-0.7.2/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.1.orig/src/xen_internal.c -+++ libvirt-0.7.1/src/xen_internal.c -@@ -741,6 +741,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.2/src/xen/xen_hypervisor.c +@@ -742,6 +742,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -498,10 +496,10 @@ Index: libvirt-0.7.1/src/xen_internal.c }; #endif /* !PROXY */ -Index: libvirt-0.7.1/src/xm_internal.c +Index: libvirt-0.7.2/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xm_internal.c -+++ libvirt-0.7.1/src/xm_internal.c +--- libvirt-0.7.2.orig/src/xen/xm_internal.c ++++ libvirt-0.7.2/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -514,10 +512,10 @@ Index: libvirt-0.7.1/src/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.1/src/xs_internal.c +Index: libvirt-0.7.2/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.c -+++ libvirt-0.7.1/src/xs_internal.c +--- libvirt-0.7.2.orig/src/xen/xs_internal.c ++++ libvirt-0.7.2/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -530,16 +528,14 @@ Index: libvirt-0.7.1/src/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.1/src/virsh.c +Index: libvirt-0.7.2/tools/virsh.c =================================================================== ---- libvirt-0.7.1.orig/src/virsh.c -+++ libvirt-0.7.1/src/virsh.c -@@ -1167,6 +1167,189 @@ cmdSave(vshControl *ctl, const vshCmd *c - return ret; +--- libvirt-0.7.2.orig/tools/virsh.c ++++ libvirt-0.7.2/tools/virsh.c +@@ -1168,6 +1168,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } -+ -+/* + /* + * "snapshot-create" command + */ +static vshCmdInfo info_snapshot_create[] = { @@ -721,10 +717,11 @@ Index: libvirt-0.7.1/src/virsh.c + return ret; +} + - /* ++/* * "schedinfo" command */ -@@ -7252,6 +7435,12 @@ static const vshCmdDef commands[] = { + static const vshCmdInfo info_schedinfo[] = { +@@ -7273,6 +7455,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -737,14 +734,14 @@ Index: libvirt-0.7.1/src/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.1/src/lxc_driver.c +Index: libvirt-0.7.2/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/lxc_driver.c -+++ libvirt-0.7.1/src/lxc_driver.c -@@ -1931,6 +1931,11 @@ static virDriver lxcDriver = { - NULL, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.2/src/lxc/lxc_driver.c +@@ -2324,6 +2324,11 @@ static virDriver lxcDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -753,14 +750,14 @@ Index: libvirt-0.7.1/src/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.1/src/openvz_driver.c +Index: libvirt-0.7.2/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/openvz_driver.c -+++ libvirt-0.7.1/src/openvz_driver.c -@@ -1392,6 +1392,11 @@ static virDriver openvzDriver = { - NULL, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.2/src/openvz/openvz_driver.c +@@ -1433,6 +1433,11 @@ static virDriver openvzDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -769,14 +766,14 @@ Index: libvirt-0.7.1/src/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.1/src/qemu_driver.c +Index: libvirt-0.7.2/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/qemu_driver.c -+++ libvirt-0.7.1/src/qemu_driver.c -@@ -7576,6 +7576,11 @@ static virDriver qemuDriver = { - qemudNodeDeviceDettach, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.2/src/qemu/qemu_driver.c +@@ -7136,6 +7136,11 @@ static virDriver qemuDriver = { qemudNodeDeviceReAttach, /* nodeDeviceReAttach */ qemudNodeDeviceReset, /* nodeDeviceReset */ + qemudDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -785,14 +782,30 @@ Index: libvirt-0.7.1/src/qemu_driver.c }; -Index: libvirt-0.7.1/src/test.c +Index: libvirt-0.7.2/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/test.c -+++ libvirt-0.7.1/src/test.c -@@ -4257,6 +4257,11 @@ static virDriver testDriver = { - NULL, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/esx/esx_driver.c ++++ libvirt-0.7.2/src/esx/esx_driver.c +@@ -3275,6 +3275,11 @@ static virDriver esxDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + +Index: libvirt-0.7.2/src/test/test_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/test/test_driver.c ++++ libvirt-0.7.2/src/test/test_driver.c +@@ -4558,6 +4558,11 @@ static virDriver testDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -801,23 +814,103 @@ Index: libvirt-0.7.1/src/test.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.1/docs/libvirt-api.xml +Index: libvirt-0.7.2/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.1.orig/docs/libvirt-api.xml -+++ libvirt-0.7.1/docs/libvirt-api.xml -@@ -208,6 +208,11 @@ - - +--- libvirt-0.7.2.orig/src/uml/uml_driver.c ++++ libvirt-0.7.2/src/uml/uml_driver.c +@@ -1862,6 +1862,11 @@ static virDriver umlDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + +Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c +=================================================================== +--- libvirt-0.7.2.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.2/src/vbox/vbox_tmpl.c +@@ -6468,6 +6468,11 @@ virDriver NAME(Driver) = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + virNetworkDriver NAME(NetworkDriver) = { +Index: libvirt-0.7.2/src/opennebula/one_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.2/src/opennebula/one_driver.c +@@ -788,6 +788,11 @@ static virDriver oneDriver = { + NULL, /* nodeDeviceReAttach; */ + NULL, /* nodeDeviceReset; */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + static virStateDriver oneStateDriver = { +Index: libvirt-0.7.2/src/phyp/phyp_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.2/src/phyp/phyp_driver.c +@@ -1378,6 +1378,11 @@ virDriver phypDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + int +Index: libvirt-0.7.2/src/remote/remote_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/remote/remote_driver.c ++++ libvirt-0.7.2/src/remote/remote_driver.c +@@ -8466,6 +8466,11 @@ static virDriver remote_driver = { + remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ + remoteNodeDeviceReset, /* nodeDeviceReset */ + remoteDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + static virNetworkDriver network_driver = { +Index: libvirt-0.7.2/docs/libvirt-api.xml +=================================================================== +--- libvirt-0.7.2.orig/docs/libvirt-api.xml ++++ libvirt-0.7.2/docs/libvirt-api.xml +@@ -262,6 +262,11 @@ + + + + + + + - - - -@@ -1432,6 +1437,36 @@ see note above'/> + + + +@@ -1817,6 +1822,36 @@ This function may requires privileged ac @@ -852,187 +945,41 @@ Index: libvirt-0.7.1/docs/libvirt-api.xml + + - Undefine a domain but does not stop it if it is running + -Index: libvirt-0.7.1/python/libvirt-py.c +Index: libvirt-0.7.2/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.1.orig/python/libvirt-py.c -+++ libvirt-0.7.1/python/libvirt-py.c -@@ -25,6 +25,25 @@ LIBVIRT_END_ALLOW_THREADS; - } +--- libvirt-0.7.2.orig/src/libvirt_public.syms ++++ libvirt-0.7.2/src/libvirt_public.syms +@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { + LIBVIRT_0.4.5 { + global: + virConnectFindStoragePoolSources; ++ virDomainSnapshotCreate; ++ virDomainSnapshotApply; ++ virDomainSnapshotDelete; ++ virDomainNumOfSnapshots; ++ virDomainListSnapshots; + } LIBVIRT_0.4.2; - PyObject * -+libvirt_virDomainSnapshotDelete(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ char * name; -+ -+ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotDelete", &pyobj_domain, &name)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainSnapshotDelete(domain, name); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); -+} -+ -+PyObject * - libvirt_virStorageVolGetKey(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - const char * c_retval; -@@ -1151,6 +1170,25 @@ LIBVIRT_END_ALLOW_THREADS; - } - - PyObject * -+libvirt_virDomainSnapshotCreate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ char * name; -+ -+ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotCreate", &pyobj_domain, &name)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainSnapshotCreate(domain, name); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); -+} -+ -+PyObject * - libvirt_virNetworkDefineXML(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - virNetworkPtr c_retval; -@@ -1186,6 +1224,24 @@ LIBVIRT_END_ALLOW_THREADS; - } - - PyObject * -+libvirt_virDomainNumOfSnapshots(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ -+ if (!PyArg_ParseTuple(args, (char *)"O:virDomainNumOfSnapshots", &pyobj_domain)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainNumOfSnapshots(domain); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); -+} -+ -+PyObject * - libvirt_virDomainResume(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - int c_retval; -@@ -1201,6 +1257,25 @@ LIBVIRT_BEGIN_ALLOW_THREADS; - LIBVIRT_END_ALLOW_THREADS; - py_retval = libvirt_intWrap((int) c_retval); - return(py_retval); -+} -+ -+PyObject * -+libvirt_virDomainSnapshotApply(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ char * name; -+ -+ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotApply", &pyobj_domain, &name)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainSnapshotApply(domain, name); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); - } - - PyObject * -Index: libvirt-0.7.1/python/libvirt-py.h + LIBVIRT_0.5.0 { +Index: libvirt-0.7.2/python/generator.py =================================================================== ---- libvirt-0.7.1.orig/python/libvirt-py.h -+++ libvirt-0.7.1/python/libvirt-py.h -@@ -1,6 +1,7 @@ - /* Generated */ - - PyObject * libvirt_virStoragePoolGetXMLDesc(PyObject *self, PyObject *args); -+PyObject * libvirt_virDomainSnapshotDelete(PyObject *self, PyObject *args); - PyObject * libvirt_virStorageVolGetKey(PyObject *self, PyObject *args); - PyObject * libvirt_virDomainUndefine(PyObject *self, PyObject *args); - PyObject * libvirt_virDomainDefineXML(PyObject *self, PyObject *args); -Index: libvirt-0.7.1/python/libvirt.py +--- libvirt-0.7.2.orig/python/generator.py ++++ libvirt-0.7.2/python/generator.py +@@ -286,6 +286,7 @@ skip_impl = ( + 'virDomainSetSchedulerParameters', + 'virDomainGetVcpus', + 'virDomainPinVcpu', ++ 'virDomainListSnapshots', + 'virSecretGetValue', + 'virSecretSetValue', + 'virSecretGetUUID', +Index: libvirt-0.7.2/python/libvirt-override.c =================================================================== ---- libvirt-0.7.1.orig/python/libvirt.py -+++ libvirt-0.7.1/python/libvirt.py -@@ -390,6 +390,12 @@ class virDomain: - ret = libvirtmod.virDomainGetName(self._o) - return ret - -+ def numOfSnapshots(self): -+ """Returns the number of snapshot a given domain has """ -+ ret = libvirtmod.virDomainNumOfSnapshots(self._o) -+ if ret == -1: raise libvirtError ('virDomainNumOfSnapshots() failed', dom=self) -+ return ret -+ - def reboot(self, flags): - """Reboot a domain, the domain object is still usable there - after but the domain OS is being stopped for a restart. -@@ -478,6 +484,24 @@ class virDomain: - if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self) - return ret - -+ def snapshotApply(self, name): -+ """Start a shut off domain based on a previously taken snapshot """ -+ ret = libvirtmod.virDomainSnapshotApply(self._o, name) -+ if ret == -1: raise libvirtError ('virDomainSnapshotApply() failed', dom=self) -+ return ret -+ -+ def snapshotCreate(self, name): -+ """Create a snapshot from a running domain """ -+ ret = libvirtmod.virDomainSnapshotCreate(self._o, name) -+ if ret == -1: raise libvirtError ('virDomainSnapshotCreate() failed', dom=self) -+ return ret -+ -+ def snapshotDelete(self, name): -+ """Delete a snapshot from a domain """ -+ ret = libvirtmod.virDomainSnapshotDelete(self._o, name) -+ if ret == -1: raise libvirtError ('virDomainSnapshotDelete() failed', dom=self) -+ return ret -+ - def suspend(self): - """Suspends an active domain, the process is frozen without - further access to CPU resources and I/O but the memory used -@@ -536,6 +560,12 @@ class virDomain: - if ret is None: raise libvirtError ('virDomainInterfaceStats() failed', dom=self) - return ret - -+ def listSnapshots(self): -+ """Returns the names of the snapshots of a domain """ -+ ret = libvirtmod.virDomainListSnapshots(self._o) -+ if ret is None: raise libvirtError ('virDomainListSnapshots() failed', dom=self) -+ return ret -+ - def pinVcpu(self, vcpu, cpumap): - """Dynamically change the real CPUs which can be allocated to - a virtual CPU. This function requires privileged access to -Index: libvirt-0.7.1/python/libvir.c -=================================================================== ---- libvirt-0.7.1.orig/python/libvir.c -+++ libvirt-0.7.1/python/libvir.c -@@ -1375,6 +1375,35 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.2.orig/python/libvirt-override.c ++++ libvirt-0.7.2/python/libvirt-override.c +@@ -1375,6 +1375,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1064,22 +1011,13 @@ Index: libvirt-0.7.1/python/libvir.c + + return(py_retval); +} -+ static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2420,6 +2449,7 @@ static PyMethodDef libvirtMethods[] = { - {(char *) "virDomainSetSchedulerParameters", libvirt_virDomainSetSchedulerParameters, METH_VARARGS, NULL}, - {(char *) "virDomainGetVcpus", libvirt_virDomainGetVcpus, METH_VARARGS, NULL}, - {(char *) "virDomainPinVcpu", libvirt_virDomainPinVcpu, METH_VARARGS, NULL}, -+ {(char *) "virDomainListSnapshots", libvirt_virDomainListSnapshots, METH_VARARGS, NULL}, - {(char *) "virConnectListStoragePools", libvirt_virConnectListStoragePools, METH_VARARGS, NULL}, - {(char *) "virConnectListDefinedStoragePools", libvirt_virConnectListDefinedStoragePools, METH_VARARGS, NULL}, - {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, -Index: libvirt-0.7.1/python/libvirt-python-api.xml +Index: libvirt-0.7.2/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.1.orig/python/libvirt-python-api.xml -+++ libvirt-0.7.1/python/libvirt-python-api.xml +--- libvirt-0.7.2.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.2/python/libvirt-override-api.xml @@ -135,6 +135,11 @@ @@ -1092,31 +1030,3 @@ Index: libvirt-0.7.1/python/libvirt-python-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.1/python/generator.py -=================================================================== ---- libvirt-0.7.1.orig/python/generator.py -+++ libvirt-0.7.1/python/generator.py -@@ -326,6 +326,7 @@ skip_impl = ( - 'virDomainSetSchedulerParameters', - 'virDomainGetVcpus', - 'virDomainPinVcpu', -+ 'virDomainListSnapshots', - 'virSecretGetValue', - 'virSecretSetValue', - 'virSecretGetUUID', -Index: libvirt-0.7.1/src/libvirt_public.syms -=================================================================== ---- libvirt-0.7.1.orig/src/libvirt_public.syms -+++ libvirt-0.7.1/src/libvirt_public.syms -@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { - LIBVIRT_0.4.5 { - global: - virConnectFindStoragePoolSources; -+ virDomainSnapshotCreate; -+ virDomainSnapshotApply; -+ virDomainSnapshotDelete; -+ virDomainNumOfSnapshots; -+ virDomainListSnapshots; - } LIBVIRT_0.4.2; - - LIBVIRT_0.5.0 { diff --git a/socat.patch b/socat.patch index 9238072..de709b7 100644 --- a/socat.patch +++ b/socat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/remote/remote_driver.c +Index: libvirt-0.7.2/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/remote/remote_driver.c -+++ libvirt-0.7.1/src/remote/remote_driver.c -@@ -728,12 +728,29 @@ doRemoteOpen (virConnectPtr conn, +--- libvirt-0.7.2.orig/src/remote/remote_driver.c ++++ libvirt-0.7.2/src/remote/remote_driver.c +@@ -760,12 +760,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } cmd_argv[j++] = strdup (priv->hostname); diff --git a/suse-network.patch b/suse-network.patch index 340adc8..9e9767f 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/conf/network_conf.c +Index: libvirt-0.7.2/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.1.orig/src/conf/network_conf.c -+++ libvirt-0.7.1/src/conf/network_conf.c -@@ -770,6 +770,137 @@ error: +--- libvirt-0.7.2.orig/src/conf/network_conf.c ++++ libvirt-0.7.2/src/conf/network_conf.c +@@ -824,6 +824,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.1/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -809,6 +940,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -863,6 +994,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,11 +148,11 @@ Index: libvirt-0.7.1/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.1/src/conf/network_conf.h +Index: libvirt-0.7.2/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.1.orig/src/conf/network_conf.h -+++ libvirt-0.7.1/src/conf/network_conf.h -@@ -89,6 +89,7 @@ struct _virNetworkObj { +--- libvirt-0.7.2.orig/src/conf/network_conf.h ++++ libvirt-0.7.2/src/conf/network_conf.h +@@ -92,6 +92,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; unsigned int persistent : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.1/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.1/src/network/bridge_driver.c +Index: libvirt-0.7.2/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/network/bridge_driver.c -+++ libvirt-0.7.1/src/network/bridge_driver.c -@@ -963,6 +963,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.2.orig/src/network/bridge_driver.c ++++ libvirt-0.7.2/src/network/bridge_driver.c +@@ -977,6 +977,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.1/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1419,6 +1424,12 @@ static int networkSetAutostart(virNetwor +@@ -1433,6 +1438,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index ab37e00..3188ac7 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xen/xend_internal.c -+++ libvirt-0.7.1/src/xen/xend_internal.c -@@ -5306,7 +5306,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -5324,7 +5324,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { From f9afad7fb4f1654c0fae8fc8ae02f7589268c9f1a50fd6545993f6fd5659c8b2 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 19 Oct 2009 20:17:26 +0000 Subject: [PATCH 04/12] Fix libvirt compilation when selinux security driver is enabled. OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=19 --- libvirt.changes | 9 +++++++++ libvirt.spec | 5 ++++- selinux-ldflags.patch | 13 +++++++++++++ snapshots.patch | 36 ++++++++++++++++++++++++++++++------ virsh-warning.patch | 19 +++++++++++++++++++ 5 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 selinux-ldflags.patch create mode 100644 virsh-warning.patch diff --git a/libvirt.changes b/libvirt.changes index a920175..7186c90 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Oct 19 14:13:47 MDT 2009 - jfehlig@novell.com + +- Fix compilation when selinux is enabled + selinux-ldflags.patch +- Fix compilation warnings + updated snapshots.patch + virsh-warning.patch + ------------------------------------------------------------------- Thu Oct 15 22:26:35 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 7de06ff..c1797c7 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -93,6 +93,8 @@ Source1: libvirtd.init # Upstream patches Patch0: devmap-no-pkgconfig.patch Patch1: fs-ocfs2.patch +Patch2: selinux-ldflags.patch +Patch3: virsh-warning.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -196,6 +198,8 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %patch100 -p1 %patch101 %patch102 -p1 @@ -225,7 +229,6 @@ export CFLAGS="$RPM_OPT_FLAGS" --with-init-script=none \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ --with-xen-proxy=no \ - --with-selinux=no \ ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \ ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \ ac_cv_path_ISCSIADM=/sbin/iscsiadm \ diff --git a/selinux-ldflags.patch b/selinux-ldflags.patch new file mode 100644 index 0000000..7b92fce --- /dev/null +++ b/selinux-ldflags.patch @@ -0,0 +1,13 @@ +Index: libvirt-0.7.2/src/Makefile.am +=================================================================== +--- libvirt-0.7.2.orig/src/Makefile.am ++++ libvirt-0.7.2/src/Makefile.am +@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \ + libvirt_driver_security_la_LDFLAGS = + if WITH_SECDRIVER_SELINUX + libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) ++libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) ++libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) + endif + if WITH_SECDRIVER_APPARMOR + libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) diff --git a/snapshots.patch b/snapshots.patch index a2a32dc..a00c62e 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -571,8 +571,8 @@ Index: libvirt-0.7.2/tools/virsh.c + if (virDomainSnapshotCreate(dom, name) == 0) { + vshPrint(ctl, _("Snapshot %s created for domain %s\n"), name, domain); + } else { -+ vshError(ctl, FALSE, _("Failed to create snapshot %s for domain %s"), -+ name, domain); ++ vshError(ctl, _("Failed to create snapshot %s for domain %s"), ++ name, domain); + ret = FALSE; + } + @@ -617,8 +617,8 @@ Index: libvirt-0.7.2/tools/virsh.c + vshPrint(ctl, _("Domain %s started using snapshot %s\n"), + domain, name); + } else { -+ vshError(ctl, FALSE, _("Failed to start domain %s using snapshot %s"), -+ domain, name); ++ vshError(ctl, _("Failed to start domain %s using snapshot %s"), ++ domain, name); + ret = FALSE; + } + @@ -662,8 +662,8 @@ Index: libvirt-0.7.2/tools/virsh.c + if (virDomainSnapshotDelete(dom, name) == 0) { + vshPrint(ctl, _("Snapshot %s deleted from domain %s\n"), name, domain); + } else { -+ vshError(ctl, FALSE, _("Failed to delete snapshot %s from domain %s"), -+ name, domain); ++ vshError(ctl, _("Failed to delete snapshot %s from domain %s"), ++ name, domain); + ret = FALSE; + } + @@ -1014,6 +1014,14 @@ Index: libvirt-0.7.2/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { +@@ -2425,6 +2453,7 @@ static PyMethodDef libvirtMethods[] = { + {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, + {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, ++ {(char *) "virDomainListSnapshots", libvirt_virDomainListSnapshots, METH_VARARGS, NULL}, + {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, Index: libvirt-0.7.2/python/libvirt-override-api.xml =================================================================== --- libvirt-0.7.2.orig/python/libvirt-override-api.xml @@ -1030,3 +1038,19 @@ Index: libvirt-0.7.2/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names +Index: libvirt-0.7.2/src/xen/xen_inotify.c +=================================================================== +--- libvirt-0.7.2.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.2/src/xen/xen_inotify.c +@@ -88,6 +88,11 @@ struct xenUnifiedDriver xenInotifyDriver + NULL, /* domainGetSchedulerType */ + NULL, /* domainGetSchedulerParameters */ + NULL, /* domainSetSchedulerParameters */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + static int diff --git a/virsh-warning.patch b/virsh-warning.patch new file mode 100644 index 0000000..69da082 --- /dev/null +++ b/virsh-warning.patch @@ -0,0 +1,19 @@ +commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 +Author: Jim Fehlig +Date: Mon Oct 19 13:53:40 2009 -0600 + + Remove extra arg in call to vshError() + +Index: libvirt-0.7.2/tools/virsh.c +=================================================================== +--- libvirt-0.7.2.orig/tools/virsh.c ++++ libvirt-0.7.2/tools/virsh.c +@@ -2510,7 +2510,7 @@ cmdMigrate (vshControl *ctl, const vshCm + * a libvirt URI, or a hypervisor specific URI. */ + + if (migrateuri != NULL) { +- vshError(ctl, FALSE, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); ++ vshError(ctl, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); + goto done; + } + From 73e0472e89a203e6c7b6d3b67be021d55bacd0890e3f0e75ca70468a2766ef4c Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 20 Oct 2009 23:23:16 +0000 Subject: [PATCH 05/12] checked in OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=20 --- clone.patch | 6 +- detach-disk.patch | 24 +- devmap-no-pkgconfig.patch | 10 +- fs-ocfs2.patch | 25 - libvirt-0.7.1.tar.bz2 | 3 + libvirt-0.7.2.tar.bz2 | 3 - libvirt.changes | 26 - libvirt.spec | 19 +- libvirtd-defaults.patch | 16 +- migrate-params.patch | 8 +- msg-proc-memleak.patch | 48 + selinux-ldflags.patch | 13 - snapshots.patch | 542 ++++++----- socat.patch | 8 +- suse-network.patch | 28 +- virsh-warning.patch | 19 - vshdeinit-recurse.patch | 1882 +++++++++++++++++++++++++++++++++++++ xen-pv-cdrom.patch | 8 +- xen-refcnt.patch | 41 + 19 files changed, 2340 insertions(+), 389 deletions(-) delete mode 100644 fs-ocfs2.patch create mode 100644 libvirt-0.7.1.tar.bz2 delete mode 100644 libvirt-0.7.2.tar.bz2 create mode 100644 msg-proc-memleak.patch delete mode 100644 selinux-ldflags.patch delete mode 100644 virsh-warning.patch create mode 100644 vshdeinit-recurse.patch create mode 100644 xen-refcnt.patch diff --git a/clone.patch b/clone.patch index 7c92647..77a6481 100644 --- a/clone.patch +++ b/clone.patch @@ -1,7 +1,7 @@ -Index: src/lxc/lxc_container.c +Index: src/lxc_container.c =================================================================== ---- src/lxc/lxc_container.c.orig -+++ src/lxc/lxc_container.c +--- src/lxc_container.c.orig ++++ src/lxc_container.c @@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de lxc_child_argv_t args = { def, nveths, veths, control, ttyPath }; diff --git a/detach-disk.patch b/detach-disk.patch index 834deec..d6df91f 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.1/src/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain, +--- libvirt-0.7.1.orig/src/xend_internal.c ++++ libvirt-0.7.1/src/xend_internal.c +@@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain, return -1; xenUnifiedLock(priv); xref = xenStoreDomainGetDiskID(domain->conn, domain->id, @@ -11,11 +11,11 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c xenUnifiedUnlock(priv); if (xref == NULL) return -1; -Index: libvirt-0.7.2/src/xen/xs_internal.c +Index: libvirt-0.7.1/src/xs_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.c -+++ libvirt-0.7.2/src/xen/xs_internal.c -@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr +--- libvirt-0.7.1.orig/src/xs_internal.c ++++ libvirt-0.7.1/src/xs_internal.c +@@ -966,7 +966,8 @@ xenStoreDomainGetNetworkID(virConnectPtr * freed by the caller. */ char * @@ -25,7 +25,7 @@ Index: libvirt-0.7.2/src/xen/xs_internal.c char dir[80], path[128], **list = NULL, *val = NULL; unsigned int devlen, len, i, num; char *ret = NULL; -@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co +@@ -984,7 +985,7 @@ xenStoreDomainGetDiskID(virConnectPtr co if (devlen <= 0) return (NULL); @@ -34,10 +34,10 @@ Index: libvirt-0.7.2/src/xen/xs_internal.c list = xs_directory(priv->xshandle, 0, dir, &num); if (list != NULL) { for (i = 0; i < num; i++) { -Index: libvirt-0.7.2/src/xen/xs_internal.h +Index: libvirt-0.7.1/src/xs_internal.h =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.h -+++ libvirt-0.7.2/src/xen/xs_internal.h +--- libvirt-0.7.1.orig/src/xs_internal.h ++++ libvirt-0.7.1/src/xs_internal.h @@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo const char *mac); char * xenStoreDomainGetDiskID(virConnectPtr conn, diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch index 78d9b22..6956081 100644 --- a/devmap-no-pkgconfig.patch +++ b/devmap-no-pkgconfig.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/configure.in -=================================================================== ---- libvirt-0.7.2.orig/configure.in -+++ libvirt-0.7.2/configure.in -@@ -1304,11 +1304,22 @@ if test "$with_storage_mpath" = "yes"; t +diff --git a/configure.in b/configure.in +index cb5ce55..d1711fd 100644 +--- a/configure.in ++++ b/configure.in +@@ -1227,11 +1227,22 @@ if test "$with_storage_mpath" = "yes"; then DEVMAPPER_REQUIRED=0.0 DEVMAPPER_CFLAGS= DEVMAPPER_LIBS= diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch deleted file mode 100644 index 95e84c7..0000000 --- a/fs-ocfs2.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: libvirt-0.7.2/src/conf/storage_conf.c -=================================================================== ---- libvirt-0.7.2.orig/src/conf/storage_conf.c -+++ libvirt-0.7.2/src/conf/storage_conf.c -@@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy - VIR_STORAGE_POOL_FS_LAST, - "auto", "ext2", "ext3", - "ext4", "ufs", "iso9660", "udf", -- "gfs", "gfs2", "vfat", "hfs+", "xfs") -+ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2") - - VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, - VIR_STORAGE_POOL_NETFS_LAST, -Index: libvirt-0.7.2/src/conf/storage_conf.h -=================================================================== ---- libvirt-0.7.2.orig/src/conf/storage_conf.h -+++ libvirt-0.7.2/src/conf/storage_conf.h -@@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { - VIR_STORAGE_POOL_FS_VFAT, - VIR_STORAGE_POOL_FS_HFSPLUS, - VIR_STORAGE_POOL_FS_XFS, -+ VIR_STORAGE_POOL_FS_OCFS2, - VIR_STORAGE_POOL_FS_LAST, - }; - VIR_ENUM_DECL(virStoragePoolFormatFileSystem) diff --git a/libvirt-0.7.1.tar.bz2 b/libvirt-0.7.1.tar.bz2 new file mode 100644 index 0000000..701a7c6 --- /dev/null +++ b/libvirt-0.7.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8edde9577fbf0e90d0b33d4b328a79c51cc821c78a4c04b101007c1d6eed1909 +size 5440029 diff --git a/libvirt-0.7.2.tar.bz2 b/libvirt-0.7.2.tar.bz2 deleted file mode 100644 index 9e7e304..0000000 --- a/libvirt-0.7.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:311817f34ace89ee44b09a4d4854bbc3a5c0567bf9a8e8a6772c494432f94b33 -size 5563880 diff --git a/libvirt.changes b/libvirt.changes index 7186c90..e2e6164 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,29 +1,3 @@ -------------------------------------------------------------------- -Mon Oct 19 14:13:47 MDT 2009 - jfehlig@novell.com - -- Fix compilation when selinux is enabled - selinux-ldflags.patch -- Fix compilation warnings - updated snapshots.patch - virsh-warning.patch - -------------------------------------------------------------------- -Thu Oct 15 22:26:35 MDT 2009 - jfehlig@novell.com - -- Updated to version 0.7.2 - - sVirt AppArmor security driver - - Add public API definition for data stream handling - - ESX add esxDomainDefineXML() - - LXC: suspend/resume support - - Big code tree cleanup - - Lots of bug fixes and improvements - -------------------------------------------------------------------- -Tue Oct 13 16:28:03 MDT 2009 - jfehlig@novell.com - -- Add ocfs2 to list of supported fs pool types - fate#307387 - ------------------------------------------------------------------- Mon Oct 12 22:39:42 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index c1797c7..3a24ac3 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.2) +# spec file for package libvirt (Version 0.7.1) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -35,7 +35,7 @@ %endif Name: libvirt -BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd +BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd %if %{with_xen} BuildRequires: xen-devel %endif @@ -64,7 +64,7 @@ Url: http://libvirt.org/ License: LGPL v2.1 or later Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.2 +Version: 0.7.1 Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux Requires: readline @@ -92,9 +92,9 @@ Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches Patch0: devmap-no-pkgconfig.patch -Patch1: fs-ocfs2.patch -Patch2: selinux-ldflags.patch -Patch3: virsh-warning.patch +Patch1: xen-refcnt.patch +Patch2: vshdeinit-recurse.patch +Patch3: msg-proc-memleak.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -247,6 +247,7 @@ rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt +rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*} rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a ln_dupes() { @@ -287,14 +288,12 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %{_bindir}/virsh %{_bindir}/virt-xml-validate -%{_bindir}/virt-pki-validate %{_sbindir}/libvirtd %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* -%doc %{_mandir}/man1/virt-pki-validate.1* %{_libdir}/*.so.* %dir %{_libdir}/%{name} %if 0%{?suse_version} > 1030 @@ -307,9 +306,6 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%if %{with_lxc} -%config %{_sysconfdir}/libvirt/lxc.conf -%endif %config %{_sysconfdir}/libvirt/qemu/networks/default.xml %config %{_sysconfdir}/logrotate.d/libvirtd %dir /%{_localstatedir}/run/libvirt/ @@ -336,6 +332,7 @@ rm -rf $RPM_BUILD_ROOT %files doc %defattr(-, root, root) %{_datadir}/gtk-doc/html/libvirt +%doc %{_docdir}/%{name}/*.gif %doc %{_docdir}/%{name}/*.png %doc %{_docdir}/%{name}/*.html %doc %{_docdir}/%{name}/html diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index ac89e2a..f0d484d 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.2/daemon/libvirtd.conf +Index: libvirt-0.7.1/qemud/libvirtd.conf =================================================================== ---- libvirt-0.7.2.orig/daemon/libvirtd.conf -+++ libvirt-0.7.2/daemon/libvirtd.conf +--- libvirt-0.7.1.orig/qemud/libvirtd.conf ++++ libvirt-0.7.1/qemud/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.7.2/daemon/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.2/daemon/libvirtd.c +Index: libvirt-0.7.1/qemud/qemud.c =================================================================== ---- libvirt-0.7.2.orig/daemon/libvirtd.c -+++ libvirt-0.7.2/daemon/libvirtd.c -@@ -135,7 +135,7 @@ static int sigwrite = -1; /* Signa +--- libvirt-0.7.1.orig/qemud/qemud.c ++++ libvirt-0.7.1/qemud/qemud.c +@@ -134,7 +134,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ /* Defaults for configuration file elements */ @@ -41,7 +41,7 @@ Index: libvirt-0.7.2/daemon/libvirtd.c static int listen_tcp = 0; static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR; static char *tls_port = (char *) LIBVIRTD_TLS_PORT; -@@ -157,7 +157,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; +@@ -156,7 +156,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; #endif static int auth_tls = REMOTE_AUTH_NONE; diff --git a/migrate-params.patch b/migrate-params.patch index fbcf3d9..c619f6a 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.6.5/src/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -4491,6 +4491,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.6.5.orig/src/xend_internal.c ++++ libvirt-0.6.5/src/xend_internal.c +@@ -4480,6 +4480,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/msg-proc-memleak.patch b/msg-proc-memleak.patch new file mode 100644 index 0000000..cd40f75 --- /dev/null +++ b/msg-proc-memleak.patch @@ -0,0 +1,48 @@ +Index: libvirt-0.7.1/qemud/dispatch.c +=================================================================== +--- libvirt-0.7.1.orig/qemud/dispatch.c ++++ libvirt-0.7.1/qemud/dispatch.c +@@ -191,6 +191,7 @@ remoteSerializeError(struct qemud_client + + xdr_error: + xdr_destroy(&xdr); ++ VIR_FREE(msg); + fatal_error: + xdr_free((xdrproc_t)xdr_remote_error, (char *)rerr); + return -1; +@@ -336,6 +337,7 @@ remoteDispatchClientRequest (struct qemu + struct qemud_client *client, + struct qemud_client_message *msg) + { ++ int ret; + remote_error rerr; + + memset(&rerr, 0, sizeof rerr); +@@ -364,7 +366,12 @@ remoteDispatchClientRequest (struct qemu + } + + error: +- return remoteSerializeReplyError(client, &rerr, &msg->hdr); ++ ret = remoteSerializeReplyError(client, &rerr, &msg->hdr); ++ ++ if (ret >= 0) ++ VIR_FREE(msg); ++ ++ return ret; + } + + +@@ -521,8 +528,12 @@ remoteDispatchClientCall (struct qemud_s + rpc_error: + /* Semi-bad stuff happened, we can still try to send back + * an RPC error message to client */ +- return remoteSerializeReplyError(client, &rerr, &msg->hdr); ++ rv = remoteSerializeReplyError(client, &rerr, &msg->hdr); ++ ++ if (rv >= 0) ++ VIR_FREE(msg); + ++ return rv; + + xdr_error: + /* Seriously bad stuff happened, so we'll kill off this client diff --git a/selinux-ldflags.patch b/selinux-ldflags.patch deleted file mode 100644 index 7b92fce..0000000 --- a/selinux-ldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libvirt-0.7.2/src/Makefile.am -=================================================================== ---- libvirt-0.7.2.orig/src/Makefile.am -+++ libvirt-0.7.2/src/Makefile.am -@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \ - libvirt_driver_security_la_LDFLAGS = - if WITH_SECDRIVER_SELINUX - libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) -+libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) -+libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) - endif - if WITH_SECDRIVER_APPARMOR - libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) diff --git a/snapshots.patch b/snapshots.patch index a00c62e..d4a32f6 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/include/libvirt/libvirt.h.in +Index: libvirt-0.7.1/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.2.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.2/include/libvirt/libvirt.h.in -@@ -561,6 +561,21 @@ int virDomainRestore +--- libvirt-0.7.1.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.1/include/libvirt/libvirt.h.in +@@ -537,6 +537,21 @@ int virDomainRestore const char *from); /* @@ -24,14 +24,16 @@ Index: libvirt-0.7.2/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.2/src/libvirt.c +Index: libvirt-0.7.1/src/libvirt.c =================================================================== ---- libvirt-0.7.2.orig/src/libvirt.c -+++ libvirt-0.7.2/src/libvirt.c -@@ -2234,6 +2234,166 @@ error: +--- libvirt-0.7.1.orig/src/libvirt.c ++++ libvirt-0.7.1/src/libvirt.c +@@ -2245,6 +2245,168 @@ error: + return -1; } - /** ++ ++/** + * virDomainSnapshotCreate: + * @domain: a domain object + * @name: name for the new snapshot @@ -191,15 +193,15 @@ Index: libvirt-0.7.2/src/libvirt.c + return -1; +} + -+/** ++ + /** * virDomainCoreDump: * @domain: a domain object - * @to: path for the core file -Index: libvirt-0.7.2/src/driver.h +Index: libvirt-0.7.1/src/driver.h =================================================================== ---- libvirt-0.7.2.orig/src/driver.h -+++ libvirt-0.7.2/src/driver.h -@@ -133,6 +133,21 @@ typedef int +--- libvirt-0.7.1.orig/src/driver.h ++++ libvirt-0.7.1/src/driver.h +@@ -152,6 +152,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); typedef int @@ -221,10 +223,10 @@ Index: libvirt-0.7.2/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -418,6 +433,11 @@ struct _virDriver { +@@ -427,6 +442,11 @@ struct _virDriver { + virDrvNodeDeviceDettach nodeDeviceDettach; virDrvNodeDeviceReAttach nodeDeviceReAttach; virDrvNodeDeviceReset nodeDeviceReset; - virDrvDomainMigratePrepareTunnel domainMigratePrepareTunnel; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,11 +235,11 @@ Index: libvirt-0.7.2/src/driver.h }; typedef int -Index: libvirt-0.7.2/src/xen/xen_driver.c +Index: libvirt-0.7.1/src/xen_unified.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_driver.c -+++ libvirt-0.7.2/src/xen/xen_driver.c -@@ -955,6 +955,81 @@ xenUnifiedDomainRestore (virConnectPtr c +--- libvirt-0.7.1.orig/src/xen_unified.c ++++ libvirt-0.7.1/src/xen_unified.c +@@ -952,6 +952,81 @@ xenUnifiedDomainRestore (virConnectPtr c } static int @@ -319,10 +321,10 @@ Index: libvirt-0.7.2/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1726,6 +1801,11 @@ static virDriver xenUnifiedDriver = { +@@ -1722,6 +1797,11 @@ static virDriver xenUnifiedDriver = { + xenUnifiedNodeDeviceDettach, /* nodeDeviceDettach */ xenUnifiedNodeDeviceReAttach, /* nodeDeviceReAttach */ xenUnifiedNodeDeviceReset, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ + xenUnifiedDomainSnapshotCreate, + xenUnifiedDomainSnapshotApply, + xenUnifiedDomainSnapshotDelete, @@ -331,10 +333,10 @@ Index: libvirt-0.7.2/src/xen/xen_driver.c }; /** -Index: libvirt-0.7.2/src/xen/xen_driver.h +Index: libvirt-0.7.1/src/xen_unified.h =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_driver.h -+++ libvirt-0.7.2/src/xen/xen_driver.h +--- libvirt-0.7.1.orig/src/xen_unified.h ++++ libvirt-0.7.1/src/xen_unified.h @@ -98,6 +98,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; @@ -347,10 +349,10 @@ Index: libvirt-0.7.2/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.1/src/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c +--- libvirt-0.7.1.orig/src/xend_internal.c ++++ libvirt-0.7.1/src/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +366,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3257,6 +3263,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3248,6 +3254,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +454,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5082,6 +5169,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5064,6 +5151,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,10 +466,10 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.2/src/xen/proxy_internal.c +Index: libvirt-0.7.1/src/proxy_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.2/src/xen/proxy_internal.c +--- libvirt-0.7.1.orig/src/proxy_internal.c ++++ libvirt-0.7.1/src/proxy_internal.c @@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -480,11 +482,11 @@ Index: libvirt-0.7.2/src/xen/proxy_internal.c }; -Index: libvirt-0.7.2/src/xen/xen_hypervisor.c +Index: libvirt-0.7.1/src/xen_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.2/src/xen/xen_hypervisor.c -@@ -742,6 +742,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.1.orig/src/xen_internal.c ++++ libvirt-0.7.1/src/xen_internal.c +@@ -741,6 +741,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -496,10 +498,10 @@ Index: libvirt-0.7.2/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.2/src/xen/xm_internal.c +Index: libvirt-0.7.1/src/xm_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xm_internal.c -+++ libvirt-0.7.2/src/xen/xm_internal.c +--- libvirt-0.7.1.orig/src/xm_internal.c ++++ libvirt-0.7.1/src/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +514,10 @@ Index: libvirt-0.7.2/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.2/src/xen/xs_internal.c +Index: libvirt-0.7.1/src/xs_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.c -+++ libvirt-0.7.2/src/xen/xs_internal.c +--- libvirt-0.7.1.orig/src/xs_internal.c ++++ libvirt-0.7.1/src/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,14 +530,16 @@ Index: libvirt-0.7.2/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.2/tools/virsh.c +Index: libvirt-0.7.1/src/virsh.c =================================================================== ---- libvirt-0.7.2.orig/tools/virsh.c -+++ libvirt-0.7.2/tools/virsh.c -@@ -1168,6 +1168,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.1.orig/src/virsh.c ++++ libvirt-0.7.1/src/virsh.c +@@ -1167,6 +1167,189 @@ cmdSave(vshControl *ctl, const vshCmd *c + return ret; } - /* ++ ++/* + * "snapshot-create" command + */ +static vshCmdInfo info_snapshot_create[] = { @@ -571,8 +575,8 @@ Index: libvirt-0.7.2/tools/virsh.c + if (virDomainSnapshotCreate(dom, name) == 0) { + vshPrint(ctl, _("Snapshot %s created for domain %s\n"), name, domain); + } else { -+ vshError(ctl, _("Failed to create snapshot %s for domain %s"), -+ name, domain); ++ vshError(ctl, FALSE, _("Failed to create snapshot %s for domain %s"), ++ name, domain); + ret = FALSE; + } + @@ -617,8 +621,8 @@ Index: libvirt-0.7.2/tools/virsh.c + vshPrint(ctl, _("Domain %s started using snapshot %s\n"), + domain, name); + } else { -+ vshError(ctl, _("Failed to start domain %s using snapshot %s"), -+ domain, name); ++ vshError(ctl, FALSE, _("Failed to start domain %s using snapshot %s"), ++ domain, name); + ret = FALSE; + } + @@ -662,8 +666,8 @@ Index: libvirt-0.7.2/tools/virsh.c + if (virDomainSnapshotDelete(dom, name) == 0) { + vshPrint(ctl, _("Snapshot %s deleted from domain %s\n"), name, domain); + } else { -+ vshError(ctl, _("Failed to delete snapshot %s from domain %s"), -+ name, domain); ++ vshError(ctl, FALSE, _("Failed to delete snapshot %s from domain %s"), ++ name, domain); + ret = FALSE; + } + @@ -717,11 +721,10 @@ Index: libvirt-0.7.2/tools/virsh.c + return ret; +} + -+/* + /* * "schedinfo" command */ - static const vshCmdInfo info_schedinfo[] = { -@@ -7273,6 +7455,12 @@ static const vshCmdDef commands[] = { +@@ -7252,6 +7435,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +737,14 @@ Index: libvirt-0.7.2/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.2/src/lxc/lxc_driver.c +Index: libvirt-0.7.1/src/lxc_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.2/src/lxc/lxc_driver.c -@@ -2324,6 +2324,11 @@ static virDriver lxcDriver = { +--- libvirt-0.7.1.orig/src/lxc_driver.c ++++ libvirt-0.7.1/src/lxc_driver.c +@@ -1931,6 +1931,11 @@ static virDriver lxcDriver = { + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +753,14 @@ Index: libvirt-0.7.2/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.2/src/openvz/openvz_driver.c +Index: libvirt-0.7.1/src/openvz_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.2/src/openvz/openvz_driver.c -@@ -1433,6 +1433,11 @@ static virDriver openvzDriver = { +--- libvirt-0.7.1.orig/src/openvz_driver.c ++++ libvirt-0.7.1/src/openvz_driver.c +@@ -1392,6 +1392,11 @@ static virDriver openvzDriver = { + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +769,14 @@ Index: libvirt-0.7.2/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.2/src/qemu/qemu_driver.c +Index: libvirt-0.7.1/src/qemu_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.2/src/qemu/qemu_driver.c -@@ -7136,6 +7136,11 @@ static virDriver qemuDriver = { +--- libvirt-0.7.1.orig/src/qemu_driver.c ++++ libvirt-0.7.1/src/qemu_driver.c +@@ -7576,6 +7576,11 @@ static virDriver qemuDriver = { + qemudNodeDeviceDettach, /* nodeDeviceDettach */ qemudNodeDeviceReAttach, /* nodeDeviceReAttach */ qemudNodeDeviceReset, /* nodeDeviceReset */ - qemudDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,30 +785,14 @@ Index: libvirt-0.7.2/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.2/src/esx/esx_driver.c +Index: libvirt-0.7.1/src/test.c =================================================================== ---- libvirt-0.7.2.orig/src/esx/esx_driver.c -+++ libvirt-0.7.2/src/esx/esx_driver.c -@@ -3275,6 +3275,11 @@ static virDriver esxDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; - - -Index: libvirt-0.7.2/src/test/test_driver.c -=================================================================== ---- libvirt-0.7.2.orig/src/test/test_driver.c -+++ libvirt-0.7.2/src/test/test_driver.c -@@ -4558,6 +4558,11 @@ static virDriver testDriver = { +--- libvirt-0.7.1.orig/src/test.c ++++ libvirt-0.7.1/src/test.c +@@ -4257,6 +4257,11 @@ static virDriver testDriver = { + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,103 +801,23 @@ Index: libvirt-0.7.2/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.2/src/uml/uml_driver.c +Index: libvirt-0.7.1/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.2.orig/src/uml/uml_driver.c -+++ libvirt-0.7.2/src/uml/uml_driver.c -@@ -1862,6 +1862,11 @@ static virDriver umlDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; - - -Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c -=================================================================== ---- libvirt-0.7.2.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.2/src/vbox/vbox_tmpl.c -@@ -6468,6 +6468,11 @@ virDriver NAME(Driver) = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; - - virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.2/src/opennebula/one_driver.c -=================================================================== ---- libvirt-0.7.2.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.2/src/opennebula/one_driver.c -@@ -788,6 +788,11 @@ static virDriver oneDriver = { - NULL, /* nodeDeviceReAttach; */ - NULL, /* nodeDeviceReset; */ - NULL, /* domainMigratePrepareTunnel */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; - - static virStateDriver oneStateDriver = { -Index: libvirt-0.7.2/src/phyp/phyp_driver.c -=================================================================== ---- libvirt-0.7.2.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.2/src/phyp/phyp_driver.c -@@ -1378,6 +1378,11 @@ virDriver phypDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; - - int -Index: libvirt-0.7.2/src/remote/remote_driver.c -=================================================================== ---- libvirt-0.7.2.orig/src/remote/remote_driver.c -+++ libvirt-0.7.2/src/remote/remote_driver.c -@@ -8466,6 +8466,11 @@ static virDriver remote_driver = { - remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ - remoteNodeDeviceReset, /* nodeDeviceReset */ - remoteDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; - - static virNetworkDriver network_driver = { -Index: libvirt-0.7.2/docs/libvirt-api.xml -=================================================================== ---- libvirt-0.7.2.orig/docs/libvirt-api.xml -+++ libvirt-0.7.2/docs/libvirt-api.xml -@@ -262,6 +262,11 @@ - - +--- libvirt-0.7.1.orig/docs/libvirt-api.xml ++++ libvirt-0.7.1/docs/libvirt-api.xml +@@ -208,6 +208,11 @@ + + + + + + + - - - -@@ -1817,6 +1822,36 @@ This function may requires privileged ac + + + +@@ -1432,6 +1437,36 @@ see note above'/> @@ -945,41 +852,187 @@ Index: libvirt-0.7.2/docs/libvirt-api.xml + + - + Undefine a domain but does not stop it if it is running -Index: libvirt-0.7.2/src/libvirt_public.syms +Index: libvirt-0.7.1/python/libvirt-py.c =================================================================== ---- libvirt-0.7.2.orig/src/libvirt_public.syms -+++ libvirt-0.7.2/src/libvirt_public.syms -@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { - LIBVIRT_0.4.5 { - global: - virConnectFindStoragePoolSources; -+ virDomainSnapshotCreate; -+ virDomainSnapshotApply; -+ virDomainSnapshotDelete; -+ virDomainNumOfSnapshots; -+ virDomainListSnapshots; - } LIBVIRT_0.4.2; +--- libvirt-0.7.1.orig/python/libvirt-py.c ++++ libvirt-0.7.1/python/libvirt-py.c +@@ -25,6 +25,25 @@ LIBVIRT_END_ALLOW_THREADS; + } - LIBVIRT_0.5.0 { -Index: libvirt-0.7.2/python/generator.py + PyObject * ++libvirt_virDomainSnapshotDelete(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { ++ PyObject *py_retval; ++ int c_retval; ++ virDomainPtr domain; ++ PyObject *pyobj_domain; ++ char * name; ++ ++ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotDelete", &pyobj_domain, &name)) ++ return(NULL); ++ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); ++LIBVIRT_BEGIN_ALLOW_THREADS; ++ ++ c_retval = virDomainSnapshotDelete(domain, name); ++LIBVIRT_END_ALLOW_THREADS; ++ py_retval = libvirt_intWrap((int) c_retval); ++ return(py_retval); ++} ++ ++PyObject * + libvirt_virStorageVolGetKey(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + const char * c_retval; +@@ -1151,6 +1170,25 @@ LIBVIRT_END_ALLOW_THREADS; + } + + PyObject * ++libvirt_virDomainSnapshotCreate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { ++ PyObject *py_retval; ++ int c_retval; ++ virDomainPtr domain; ++ PyObject *pyobj_domain; ++ char * name; ++ ++ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotCreate", &pyobj_domain, &name)) ++ return(NULL); ++ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); ++LIBVIRT_BEGIN_ALLOW_THREADS; ++ ++ c_retval = virDomainSnapshotCreate(domain, name); ++LIBVIRT_END_ALLOW_THREADS; ++ py_retval = libvirt_intWrap((int) c_retval); ++ return(py_retval); ++} ++ ++PyObject * + libvirt_virNetworkDefineXML(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + virNetworkPtr c_retval; +@@ -1186,6 +1224,24 @@ LIBVIRT_END_ALLOW_THREADS; + } + + PyObject * ++libvirt_virDomainNumOfSnapshots(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { ++ PyObject *py_retval; ++ int c_retval; ++ virDomainPtr domain; ++ PyObject *pyobj_domain; ++ ++ if (!PyArg_ParseTuple(args, (char *)"O:virDomainNumOfSnapshots", &pyobj_domain)) ++ return(NULL); ++ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); ++LIBVIRT_BEGIN_ALLOW_THREADS; ++ ++ c_retval = virDomainNumOfSnapshots(domain); ++LIBVIRT_END_ALLOW_THREADS; ++ py_retval = libvirt_intWrap((int) c_retval); ++ return(py_retval); ++} ++ ++PyObject * + libvirt_virDomainResume(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; +@@ -1201,6 +1257,25 @@ LIBVIRT_BEGIN_ALLOW_THREADS; + LIBVIRT_END_ALLOW_THREADS; + py_retval = libvirt_intWrap((int) c_retval); + return(py_retval); ++} ++ ++PyObject * ++libvirt_virDomainSnapshotApply(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { ++ PyObject *py_retval; ++ int c_retval; ++ virDomainPtr domain; ++ PyObject *pyobj_domain; ++ char * name; ++ ++ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotApply", &pyobj_domain, &name)) ++ return(NULL); ++ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); ++LIBVIRT_BEGIN_ALLOW_THREADS; ++ ++ c_retval = virDomainSnapshotApply(domain, name); ++LIBVIRT_END_ALLOW_THREADS; ++ py_retval = libvirt_intWrap((int) c_retval); ++ return(py_retval); + } + + PyObject * +Index: libvirt-0.7.1/python/libvirt-py.h =================================================================== ---- libvirt-0.7.2.orig/python/generator.py -+++ libvirt-0.7.2/python/generator.py -@@ -286,6 +286,7 @@ skip_impl = ( - 'virDomainSetSchedulerParameters', - 'virDomainGetVcpus', - 'virDomainPinVcpu', -+ 'virDomainListSnapshots', - 'virSecretGetValue', - 'virSecretSetValue', - 'virSecretGetUUID', -Index: libvirt-0.7.2/python/libvirt-override.c +--- libvirt-0.7.1.orig/python/libvirt-py.h ++++ libvirt-0.7.1/python/libvirt-py.h +@@ -1,6 +1,7 @@ + /* Generated */ + + PyObject * libvirt_virStoragePoolGetXMLDesc(PyObject *self, PyObject *args); ++PyObject * libvirt_virDomainSnapshotDelete(PyObject *self, PyObject *args); + PyObject * libvirt_virStorageVolGetKey(PyObject *self, PyObject *args); + PyObject * libvirt_virDomainUndefine(PyObject *self, PyObject *args); + PyObject * libvirt_virDomainDefineXML(PyObject *self, PyObject *args); +Index: libvirt-0.7.1/python/libvirt.py =================================================================== ---- libvirt-0.7.2.orig/python/libvirt-override.c -+++ libvirt-0.7.2/python/libvirt-override.c -@@ -1375,6 +1375,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.1.orig/python/libvirt.py ++++ libvirt-0.7.1/python/libvirt.py +@@ -390,6 +390,12 @@ class virDomain: + ret = libvirtmod.virDomainGetName(self._o) + return ret + ++ def numOfSnapshots(self): ++ """Returns the number of snapshot a given domain has """ ++ ret = libvirtmod.virDomainNumOfSnapshots(self._o) ++ if ret == -1: raise libvirtError ('virDomainNumOfSnapshots() failed', dom=self) ++ return ret ++ + def reboot(self, flags): + """Reboot a domain, the domain object is still usable there + after but the domain OS is being stopped for a restart. +@@ -478,6 +484,24 @@ class virDomain: + if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self) + return ret + ++ def snapshotApply(self, name): ++ """Start a shut off domain based on a previously taken snapshot """ ++ ret = libvirtmod.virDomainSnapshotApply(self._o, name) ++ if ret == -1: raise libvirtError ('virDomainSnapshotApply() failed', dom=self) ++ return ret ++ ++ def snapshotCreate(self, name): ++ """Create a snapshot from a running domain """ ++ ret = libvirtmod.virDomainSnapshotCreate(self._o, name) ++ if ret == -1: raise libvirtError ('virDomainSnapshotCreate() failed', dom=self) ++ return ret ++ ++ def snapshotDelete(self, name): ++ """Delete a snapshot from a domain """ ++ ret = libvirtmod.virDomainSnapshotDelete(self._o, name) ++ if ret == -1: raise libvirtError ('virDomainSnapshotDelete() failed', dom=self) ++ return ret ++ + def suspend(self): + """Suspends an active domain, the process is frozen without + further access to CPU resources and I/O but the memory used +@@ -536,6 +560,12 @@ class virDomain: + if ret is None: raise libvirtError ('virDomainInterfaceStats() failed', dom=self) + return ret + ++ def listSnapshots(self): ++ """Returns the names of the snapshots of a domain """ ++ ret = libvirtmod.virDomainListSnapshots(self._o) ++ if ret is None: raise libvirtError ('virDomainListSnapshots() failed', dom=self) ++ return ret ++ + def pinVcpu(self, vcpu, cpumap): + """Dynamically change the real CPUs which can be allocated to + a virtual CPU. This function requires privileged access to +Index: libvirt-0.7.1/python/libvir.c +=================================================================== +--- libvirt-0.7.1.orig/python/libvir.c ++++ libvirt-0.7.1/python/libvir.c +@@ -1375,6 +1375,35 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1011,21 +1064,22 @@ Index: libvirt-0.7.2/python/libvirt-override.c + + return(py_retval); +} ++ static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2425,6 +2453,7 @@ static PyMethodDef libvirtMethods[] = { - {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, - {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, - {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, +@@ -2420,6 +2449,7 @@ static PyMethodDef libvirtMethods[] = { + {(char *) "virDomainSetSchedulerParameters", libvirt_virDomainSetSchedulerParameters, METH_VARARGS, NULL}, + {(char *) "virDomainGetVcpus", libvirt_virDomainGetVcpus, METH_VARARGS, NULL}, + {(char *) "virDomainPinVcpu", libvirt_virDomainPinVcpu, METH_VARARGS, NULL}, + {(char *) "virDomainListSnapshots", libvirt_virDomainListSnapshots, METH_VARARGS, NULL}, - {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, - {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, - {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.2/python/libvirt-override-api.xml + {(char *) "virConnectListStoragePools", libvirt_virConnectListStoragePools, METH_VARARGS, NULL}, + {(char *) "virConnectListDefinedStoragePools", libvirt_virConnectListDefinedStoragePools, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, +Index: libvirt-0.7.1/python/libvirt-python-api.xml =================================================================== ---- libvirt-0.7.2.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.2/python/libvirt-override-api.xml +--- libvirt-0.7.1.orig/python/libvirt-python-api.xml ++++ libvirt-0.7.1/python/libvirt-python-api.xml @@ -135,6 +135,11 @@ @@ -1038,19 +1092,31 @@ Index: libvirt-0.7.2/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.2/src/xen/xen_inotify.c +Index: libvirt-0.7.1/python/generator.py =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.2/src/xen/xen_inotify.c -@@ -88,6 +88,11 @@ struct xenUnifiedDriver xenInotifyDriver - NULL, /* domainGetSchedulerType */ - NULL, /* domainGetSchedulerParameters */ - NULL, /* domainSetSchedulerParameters */ -+ NULL, /* domainSnapshotCreate */ -+ NULL, /* domainSnapshotApply */ -+ NULL, /* domainSnapshotDelete */ -+ NULL, /* domainNumOfSnapshots */ -+ NULL, /* domainListSnapshots */ - }; +--- libvirt-0.7.1.orig/python/generator.py ++++ libvirt-0.7.1/python/generator.py +@@ -326,6 +326,7 @@ skip_impl = ( + 'virDomainSetSchedulerParameters', + 'virDomainGetVcpus', + 'virDomainPinVcpu', ++ 'virDomainListSnapshots', + 'virSecretGetValue', + 'virSecretSetValue', + 'virSecretGetUUID', +Index: libvirt-0.7.1/src/libvirt_public.syms +=================================================================== +--- libvirt-0.7.1.orig/src/libvirt_public.syms ++++ libvirt-0.7.1/src/libvirt_public.syms +@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { + LIBVIRT_0.4.5 { + global: + virConnectFindStoragePoolSources; ++ virDomainSnapshotCreate; ++ virDomainSnapshotApply; ++ virDomainSnapshotDelete; ++ virDomainNumOfSnapshots; ++ virDomainListSnapshots; + } LIBVIRT_0.4.2; - static int + LIBVIRT_0.5.0 { diff --git a/socat.patch b/socat.patch index de709b7..95e5213 100644 --- a/socat.patch +++ b/socat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/remote/remote_driver.c +Index: libvirt-0.7.1/src/remote_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/remote/remote_driver.c -+++ libvirt-0.7.2/src/remote/remote_driver.c -@@ -760,12 +760,29 @@ doRemoteOpen (virConnectPtr conn, +--- libvirt-0.7.1.orig/src/remote_internal.c ++++ libvirt-0.7.1/src/remote_internal.c +@@ -728,12 +728,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } cmd_argv[j++] = strdup (priv->hostname); diff --git a/suse-network.patch b/suse-network.patch index 9e9767f..4bea8eb 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/conf/network_conf.c +Index: libvirt-0.7.1/src/network_conf.c =================================================================== ---- libvirt-0.7.2.orig/src/conf/network_conf.c -+++ libvirt-0.7.2/src/conf/network_conf.c -@@ -824,6 +824,137 @@ error: +--- libvirt-0.7.1.orig/src/network_conf.c ++++ libvirt-0.7.1/src/network_conf.c +@@ -770,6 +770,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.2/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -863,6 +994,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -809,6 +940,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,11 +148,11 @@ Index: libvirt-0.7.2/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.2/src/conf/network_conf.h +Index: libvirt-0.7.1/src/network_conf.h =================================================================== ---- libvirt-0.7.2.orig/src/conf/network_conf.h -+++ libvirt-0.7.2/src/conf/network_conf.h -@@ -92,6 +92,7 @@ struct _virNetworkObj { +--- libvirt-0.7.1.orig/src/network_conf.h ++++ libvirt-0.7.1/src/network_conf.h +@@ -89,6 +89,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; unsigned int persistent : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.2/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.2/src/network/bridge_driver.c +Index: libvirt-0.7.1/src/network_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/network/bridge_driver.c -+++ libvirt-0.7.2/src/network/bridge_driver.c -@@ -977,6 +977,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.1.orig/src/network_driver.c ++++ libvirt-0.7.1/src/network_driver.c +@@ -963,6 +963,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.2/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1433,6 +1438,12 @@ static int networkSetAutostart(virNetwor +@@ -1419,6 +1424,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/virsh-warning.patch b/virsh-warning.patch deleted file mode 100644 index 69da082..0000000 --- a/virsh-warning.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 -Author: Jim Fehlig -Date: Mon Oct 19 13:53:40 2009 -0600 - - Remove extra arg in call to vshError() - -Index: libvirt-0.7.2/tools/virsh.c -=================================================================== ---- libvirt-0.7.2.orig/tools/virsh.c -+++ libvirt-0.7.2/tools/virsh.c -@@ -2510,7 +2510,7 @@ cmdMigrate (vshControl *ctl, const vshCm - * a libvirt URI, or a hypervisor specific URI. */ - - if (migrateuri != NULL) { -- vshError(ctl, FALSE, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); -+ vshError(ctl, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); - goto done; - } - diff --git a/vshdeinit-recurse.patch b/vshdeinit-recurse.patch new file mode 100644 index 0000000..b8e7244 --- /dev/null +++ b/vshdeinit-recurse.patch @@ -0,0 +1,1882 @@ +Index: libvirt-0.7.1/src/virsh.c +=================================================================== +--- libvirt-0.7.1.orig/src/virsh.c ++++ libvirt-0.7.1/src/virsh.c +@@ -202,8 +202,8 @@ typedef struct __vshControl { + + static const vshCmdDef commands[]; + +-static void vshError(vshControl *ctl, int doexit, const char *format, ...) +- ATTRIBUTE_FMT_PRINTF(3, 4); ++static void vshError(vshControl *ctl, const char *format, ...) ++ ATTRIBUTE_FMT_PRINTF(2, 3); + static int vshInit(vshControl *ctl); + static int vshDeinit(vshControl *ctl); + static void vshUsage(void); +@@ -351,11 +351,11 @@ virshReportError(vshControl *ctl) + return; + + if (last_error->code == VIR_ERR_OK) { +- vshError(ctl, FALSE, "%s", _("unknown error")); ++ vshError(ctl, "%s", _("unknown error")); + goto out; + } + +- vshError(ctl, FALSE, "%s", last_error->message); ++ vshError(ctl, "%s", last_error->message); + + out: + virFreeError(last_error); +@@ -433,11 +433,9 @@ cmdAutostart(vshControl *ctl, const vshC + + if (virDomainSetAutostart(dom, autostart) < 0) { + if (autostart) +- vshError(ctl, FALSE, _("Failed to mark domain %s as autostarted"), +- name); ++ vshError(ctl, _("Failed to mark domain %s as autostarted"), name); + else +- vshError(ctl, FALSE, _("Failed to unmark domain %s as autostarted"), +- name); ++ vshError(ctl, _("Failed to unmark domain %s as autostarted"), name); + virDomainFree(dom); + return FALSE; + } +@@ -474,8 +472,7 @@ cmdConnect(vshControl *ctl, const vshCmd + + if (ctl->conn) { + if (virConnectClose(ctl->conn) != 0) { +- vshError(ctl, FALSE, "%s", +- _("Failed to disconnect from the hypervisor")); ++ vshError(ctl, "%s", _("Failed to disconnect from the hypervisor")); + return FALSE; + } + ctl->conn = NULL; +@@ -494,7 +491,7 @@ cmdConnect(vshControl *ctl, const vshCmd + ctl->readonly ? VIR_CONNECT_RO : 0); + + if (!ctl->conn) +- vshError(ctl, FALSE, "%s", _("Failed to connect to the hypervisor")); ++ vshError(ctl, "%s", _("Failed to connect to the hypervisor")); + + return ctl->conn ? TRUE : FALSE; + } +@@ -528,17 +525,17 @@ cmdRunConsole(vshControl *ctl, virDomain + char *thisHost = NULL; + + if (!(thisHost = virGetHostname())) { +- vshError(ctl, FALSE, "%s", _("Failed to get local hostname")); ++ vshError(ctl, "%s", _("Failed to get local hostname")); + goto cleanup; + } + + if (!(thatHost = virConnectGetHostname(ctl->conn))) { +- vshError(ctl, FALSE, "%s", _("Failed to get connection hostname")); ++ vshError(ctl, "%s", _("Failed to get connection hostname")); + goto cleanup; + } + + if (STRNEQ(thisHost, thatHost)) { +- vshError(ctl, FALSE, "%s", _("Cannot connect to a remote console device")); ++ vshError(ctl, "%s", _("Cannot connect to a remote console device")); + goto cleanup; + } + +@@ -632,14 +629,14 @@ cmdList(vshControl *ctl, const vshCmd *c + if (active) { + maxid = virConnectNumOfDomains(ctl->conn); + if (maxid < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active domains")); ++ vshError(ctl, "%s", _("Failed to list active domains")); + return FALSE; + } + if (maxid) { + ids = vshMalloc(ctl, sizeof(int) * maxid); + + if ((maxid = virConnectListDomains(ctl->conn, &ids[0], maxid)) < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active domains")); ++ vshError(ctl, "%s", _("Failed to list active domains")); + free(ids); + return FALSE; + } +@@ -650,7 +647,7 @@ cmdList(vshControl *ctl, const vshCmd *c + if (inactive) { + maxname = virConnectNumOfDefinedDomains(ctl->conn); + if (maxname < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list inactive domains")); ++ vshError(ctl, "%s", _("Failed to list inactive domains")); + free(ids); + return FALSE; + } +@@ -658,7 +655,7 @@ cmdList(vshControl *ctl, const vshCmd *c + names = vshMalloc(ctl, sizeof(char *) * maxname); + + if ((maxname = virConnectListDefinedDomains(ctl->conn, names, maxname)) < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list inactive domains")); ++ vshError(ctl, "%s", _("Failed to list inactive domains")); + free(ids); + free(names); + return FALSE; +@@ -786,8 +783,7 @@ cmdDomblkstat (vshControl *ctl, const vs + } + + if (virDomainBlockStats (dom, device, &stats, sizeof stats) == -1) { +- vshError (ctl, FALSE, _("Failed to get block stats %s %s"), +- name, device); ++ vshError(ctl, _("Failed to get block stats %s %s"), name, device); + virDomainFree(dom); + return FALSE; + } +@@ -844,8 +840,7 @@ cmdDomIfstat (vshControl *ctl, const vsh + } + + if (virDomainInterfaceStats (dom, device, &stats, sizeof stats) == -1) { +- vshError (ctl, FALSE, _("Failed to get interface stats %s %s"), +- name, device); ++ vshError(ctl, _("Failed to get interface stats %s %s"), name, device); + virDomainFree(dom); + return FALSE; + } +@@ -908,7 +903,7 @@ cmdSuspend(vshControl *ctl, const vshCmd + if (virDomainSuspend(dom) == 0) { + vshPrint(ctl, _("Domain %s suspended\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to suspend domain %s"), name); ++ vshError(ctl, _("Failed to suspend domain %s"), name); + ret = FALSE; + } + +@@ -967,7 +962,7 @@ cmdCreate(vshControl *ctl, const vshCmd + #endif + virDomainFree(dom); + } else { +- vshError(ctl, FALSE, _("Failed to create domain from %s"), from); ++ vshError(ctl, _("Failed to create domain from %s"), from); + ret = FALSE; + } + return ret; +@@ -1014,7 +1009,7 @@ cmdDefine(vshControl *ctl, const vshCmd + virDomainGetName(dom), from); + virDomainFree(dom); + } else { +- vshError(ctl, FALSE, _("Failed to define domain from %s"), from); ++ vshError(ctl, _("Failed to define domain from %s"), from); + ret = FALSE; + } + return ret; +@@ -1052,9 +1047,11 @@ cmdUndefine(vshControl *ctl, const vshCm + + if (name && virStrToLong_i(name, NULL, 10, &id) == 0 + && id >= 0 && (dom = virDomainLookupByID(ctl->conn, id))) { +- vshError(ctl, FALSE, _("a running domain like %s cannot be undefined;\n" +- "to undefine, first shutdown then undefine" +- " using its name or UUID"), name); ++ vshError(ctl, ++ _("a running domain like %s cannot be undefined;\n" ++ "to undefine, first shutdown then undefine" ++ " using its name or UUID"), ++ name); + virDomainFree(dom); + return FALSE; + } +@@ -1065,7 +1062,7 @@ cmdUndefine(vshControl *ctl, const vshCm + if (virDomainUndefine(dom) == 0) { + vshPrint(ctl, _("Domain %s has been undefined\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to undefine domain %s"), name); ++ vshError(ctl, _("Failed to undefine domain %s"), name); + ret = FALSE; + } + +@@ -1107,7 +1104,7 @@ cmdStart(vshControl *ctl, const vshCmd * + return FALSE; + + if (virDomainGetID(dom) != (unsigned int)-1) { +- vshError(ctl, FALSE, "%s", _("Domain is already active")); ++ vshError(ctl, "%s", _("Domain is already active")); + virDomainFree(dom); + return FALSE; + } +@@ -1120,8 +1117,7 @@ cmdStart(vshControl *ctl, const vshCmd * + cmdRunConsole(ctl, dom); + #endif + } else { +- vshError(ctl, FALSE, _("Failed to start domain %s"), +- virDomainGetName(dom)); ++ vshError(ctl, _("Failed to start domain %s"), virDomainGetName(dom)); + ret = FALSE; + } + virDomainFree(dom); +@@ -1163,7 +1159,7 @@ cmdSave(vshControl *ctl, const vshCmd *c + if (virDomainSave(dom, to) == 0) { + vshPrint(ctl, _("Domain %s saved to %s\n"), name, to); + } else { +- vshError(ctl, FALSE, _("Failed to save domain %s to %s"), name, to); ++ vshError(ctl, _("Failed to save domain %s to %s"), name, to); + ret = FALSE; + } + +@@ -1202,7 +1198,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons + int val; + val = vshCommandOptInt(cmd, "weight", &found); + if (!found) { +- vshError(ctl, FALSE, "%s", _("Invalid value of weight")); ++ vshError(ctl, "%s", _("Invalid value of weight")); + return -1; + } else { + param->value.ui = val; +@@ -1217,7 +1213,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons + int val; + val = vshCommandOptInt(cmd, "cap", &found); + if (!found) { +- vshError(ctl, FALSE, "%s", _("Invalid value of cap")); ++ vshError(ctl, "%s", _("Invalid value of cap")); + return -1; + } else { + param->value.ui = val; +@@ -1229,7 +1225,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons + char *val = strchr(data, '='); + int match = 0; + if (!val) { +- vshError(ctl, FALSE, "%s", _("Invalid syntax for --set, expecting name=value")); ++ vshError(ctl, "%s", _("Invalid syntax for --set, expecting name=value")); + return -1; + } + *val = '\0'; +@@ -1243,35 +1239,35 @@ cmdSchedInfoUpdate(vshControl *ctl, cons + switch (param->type) { + case VIR_DOMAIN_SCHED_FIELD_INT: + if (virStrToLong_i(val, NULL, 10, ¶m->value.i) < 0) { +- vshError(ctl, FALSE, "%s", ++ vshError(ctl, "%s", + _("Invalid value for parameter, expecting an int")); + return -1; + } + break; + case VIR_DOMAIN_SCHED_FIELD_UINT: + if (virStrToLong_ui(val, NULL, 10, ¶m->value.ui) < 0) { +- vshError(ctl, FALSE, "%s", ++ vshError(ctl, "%s", + _("Invalid value for parameter, expecting an unsigned int")); + return -1; + } + break; + case VIR_DOMAIN_SCHED_FIELD_LLONG: + if (virStrToLong_ll(val, NULL, 10, ¶m->value.l) < 0) { +- vshError(ctl, FALSE, "%s", ++ vshError(ctl, "%s", + _("Invalid value for parameter, expecting an long long")); + return -1; + } + break; + case VIR_DOMAIN_SCHED_FIELD_ULLONG: + if (virStrToLong_ull(val, NULL, 10, ¶m->value.ul) < 0) { +- vshError(ctl, FALSE, "%s", ++ vshError(ctl, "%s", + _("Invalid value for parameter, expecting an unsigned long long")); + return -1; + } + break; + case VIR_DOMAIN_SCHED_FIELD_DOUBLE: + if (virStrToDouble(val, NULL, ¶m->value.d) < 0) { +- vshError(ctl, FALSE, "%s", _("Invalid value for parameter, expecting a double")); ++ vshError(ctl, "%s", _("Invalid value for parameter, expecting a double")); + return -1; + } + break; +@@ -1408,7 +1404,7 @@ cmdRestore(vshControl *ctl, const vshCmd + if (virDomainRestore(ctl->conn, from) == 0) { + vshPrint(ctl, _("Domain restored from %s\n"), from); + } else { +- vshError(ctl, FALSE, _("Failed to restore domain from %s"), from); ++ vshError(ctl, _("Failed to restore domain from %s"), from); + ret = FALSE; + } + return ret; +@@ -1449,8 +1445,7 @@ cmdDump(vshControl *ctl, const vshCmd *c + if (virDomainCoreDump(dom, to, 0) == 0) { + vshPrint(ctl, _("Domain %s dumped to %s\n"), name, to); + } else { +- vshError(ctl, FALSE, _("Failed to core dump domain %s to %s"), +- name, to); ++ vshError(ctl, _("Failed to core dump domain %s to %s"), name, to); + ret = FALSE; + } + +@@ -1488,7 +1483,7 @@ cmdResume(vshControl *ctl, const vshCmd + if (virDomainResume(dom) == 0) { + vshPrint(ctl, _("Domain %s resumed\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to resume domain %s"), name); ++ vshError(ctl, _("Failed to resume domain %s"), name); + ret = FALSE; + } + +@@ -1526,7 +1521,7 @@ cmdShutdown(vshControl *ctl, const vshCm + if (virDomainShutdown(dom) == 0) { + vshPrint(ctl, _("Domain %s is being shutdown\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to shutdown domain %s"), name); ++ vshError(ctl, _("Failed to shutdown domain %s"), name); + ret = FALSE; + } + +@@ -1564,7 +1559,7 @@ cmdReboot(vshControl *ctl, const vshCmd + if (virDomainReboot(dom, 0) == 0) { + vshPrint(ctl, _("Domain %s is being rebooted\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to reboot domain %s"), name); ++ vshError(ctl, _("Failed to reboot domain %s"), name); + ret = FALSE; + } + +@@ -1602,7 +1597,7 @@ cmdDestroy(vshControl *ctl, const vshCmd + if (virDomainDestroy(dom) == 0) { + vshPrint(ctl, _("Domain %s destroyed\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to destroy domain %s"), name); ++ vshError(ctl, _("Failed to destroy domain %s"), name); + ret = FALSE; + } + +@@ -1835,8 +1830,8 @@ cmdVcpuinfo(vshControl *ctl, const vshCm + } + } else { + if (info.state == VIR_DOMAIN_SHUTOFF) { +- vshError(ctl, FALSE, "%s", +- _("Domain shut off, virtual CPUs not present.")); ++ vshError(ctl, "%s", ++ _("Domain shut off, virtual CPUs not present.")); + } + ret = FALSE; + } +@@ -1886,14 +1881,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd + + vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound); + if (!vcpufound) { +- vshError(ctl, FALSE, "%s", +- _("vcpupin: Invalid or missing vCPU number.")); ++ vshError(ctl, "%s", _("vcpupin: Invalid or missing vCPU number.")); + virDomainFree(dom); + return FALSE; + } + + if (!(cpulist = vshCommandOptString(cmd, "cpulist", NULL))) { +- vshError(ctl, FALSE, "%s", _("vcpupin: Missing cpulist")); ++ vshError(ctl, "%s", _("vcpupin: Missing cpulist")); + virDomainFree(dom); + return FALSE; + } +@@ -1904,14 +1898,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd + } + + if (virDomainGetInfo(dom, &info) != 0) { +- vshError(ctl, FALSE, "%s", +- _("vcpupin: failed to get domain informations.")); ++ vshError(ctl, "%s", _("vcpupin: failed to get domain informations.")); + virDomainFree(dom); + return FALSE; + } + + if (vcpu >= info.nrVirtCpu) { +- vshError(ctl, FALSE, "%s", _("vcpupin: Invalid vCPU number.")); ++ vshError(ctl, "%s", _("vcpupin: Invalid vCPU number.")); + virDomainFree(dom); + return FALSE; + } +@@ -1920,7 +1913,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd + * numbers and give an intelligent error message if not. + */ + if (cpulist[0] == '\0') { +- vshError(ctl, FALSE, "%s", _("cpulist: Invalid format. Empty string.")); ++ vshError(ctl, "%s", _("cpulist: Invalid format. Empty string.")); + virDomainFree (dom); + return FALSE; + } +@@ -1930,7 +1923,9 @@ cmdVcpupin(vshControl *ctl, const vshCmd + switch (state) { + case expect_num: + if (!c_isdigit (cpulist[i])) { +- vshError( ctl, FALSE, _("cpulist: %s: Invalid format. Expecting digit at position %d (near '%c')."), cpulist, i, cpulist[i]); ++ vshError(ctl, _("cpulist: %s: Invalid format. Expecting " ++ "digit at position %d (near '%c')."), ++ cpulist, i, cpulist[i]); + virDomainFree (dom); + return FALSE; + } +@@ -1940,14 +1935,18 @@ cmdVcpupin(vshControl *ctl, const vshCmd + if (cpulist[i] == ',') + state = expect_num; + else if (!c_isdigit (cpulist[i])) { +- vshError(ctl, FALSE, _("cpulist: %s: Invalid format. Expecting digit or comma at position %d (near '%c')."), cpulist, i, cpulist[i]); ++ vshError(ctl, _("cpulist: %s: Invalid format. Expecting " ++ "digit or comma at position %d (near '%c')."), ++ cpulist, i, cpulist[i]); + virDomainFree (dom); + return FALSE; + } + } + } + if (state == expect_num) { +- vshError(ctl, FALSE, _("cpulist: %s: Invalid format. Trailing comma at position %d."), cpulist, i); ++ vshError(ctl, _("cpulist: %s: Invalid format. Trailing comma " ++ "at position %d."), ++ cpulist, i); + virDomainFree (dom); + return FALSE; + } +@@ -1961,7 +1960,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd + if (cpu < VIR_NODEINFO_MAXCPUS(nodeinfo)) { + VIR_USE_CPU(cpumap, cpu); + } else { +- vshError(ctl, FALSE, _("Physical CPU %d doesn't exist."), cpu); ++ vshError(ctl, _("Physical CPU %d doesn't exist."), cpu); + free(cpumap); + virDomainFree(dom); + return FALSE; +@@ -2011,7 +2010,7 @@ cmdSetvcpus(vshControl *ctl, const vshCm + + count = vshCommandOptInt(cmd, "count", &count); + if (count <= 0) { +- vshError(ctl, FALSE, "%s", _("Invalid number of virtual CPUs.")); ++ vshError(ctl, "%s", _("Invalid number of virtual CPUs.")); + virDomainFree(dom); + return FALSE; + } +@@ -2023,7 +2022,7 @@ cmdSetvcpus(vshControl *ctl, const vshCm + } + + if (count > maxcpu) { +- vshError(ctl, FALSE, "%s", _("Too many virtual CPUs.")); ++ vshError(ctl, "%s", _("Too many virtual CPUs.")); + virDomainFree(dom); + return FALSE; + } +@@ -2068,19 +2067,19 @@ cmdSetmem(vshControl *ctl, const vshCmd + kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes); + if (kilobytes <= 0) { + virDomainFree(dom); +- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); ++ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); + return FALSE; + } + + if (virDomainGetInfo(dom, &info) != 0) { + virDomainFree(dom); +- vshError(ctl, FALSE, "%s", _("Unable to verify MaxMemorySize")); ++ vshError(ctl, "%s", _("Unable to verify MaxMemorySize")); + return FALSE; + } + + if (kilobytes > info.maxMem) { + virDomainFree(dom); +- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); ++ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); + return FALSE; + } + +@@ -2124,26 +2123,26 @@ cmdSetmaxmem(vshControl *ctl, const vshC + kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes); + if (kilobytes <= 0) { + virDomainFree(dom); +- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); ++ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); + return FALSE; + } + + if (virDomainGetInfo(dom, &info) != 0) { + virDomainFree(dom); +- vshError(ctl, FALSE, "%s", _("Unable to verify current MemorySize")); ++ vshError(ctl, "%s", _("Unable to verify current MemorySize")); + return FALSE; + } + + if (kilobytes < info.memory) { + if (virDomainSetMemory(dom, kilobytes) != 0) { + virDomainFree(dom); +- vshError(ctl, FALSE, "%s", _("Unable to shrink current MemorySize")); ++ vshError(ctl, "%s", _("Unable to shrink current MemorySize")); + return FALSE; + } + } + + if (virDomainSetMaxMemory(dom, kilobytes) != 0) { +- vshError(ctl, FALSE, "%s", _("Unable to change MaxMemorySize")); ++ vshError(ctl, "%s", _("Unable to change MaxMemorySize")); + ret = FALSE; + } + +@@ -2169,7 +2168,7 @@ cmdNodeinfo(vshControl *ctl, const vshCm + return FALSE; + + if (virNodeGetInfo(ctl->conn, &info) < 0) { +- vshError(ctl, FALSE, "%s", _("failed to get node information")); ++ vshError(ctl, "%s", _("failed to get node information")); + return FALSE; + } + vshPrint(ctl, "%-20s %s\n", _("CPU model:"), info.model); +@@ -2202,7 +2201,7 @@ cmdCapabilities (vshControl *ctl, const + return FALSE; + + if ((caps = virConnectGetCapabilities (ctl->conn)) == NULL) { +- vshError(ctl, FALSE, "%s", _("failed to get capabilities")); ++ vshError(ctl, "%s", _("failed to get capabilities")); + return FALSE; + } + vshPrint (ctl, "%s\n", caps); +@@ -2446,7 +2445,7 @@ cmdDomuuid(vshControl *ctl, const vshCmd + if (virDomainGetUUIDString(dom, uuid) != -1) + vshPrint(ctl, "%s\n", uuid); + else +- vshError(ctl, FALSE, "%s", _("failed to get domain UUID")); ++ vshError(ctl, "%s", _("failed to get domain UUID")); + + virDomainFree(dom); + return TRUE; +@@ -2489,7 +2488,7 @@ cmdMigrate (vshControl *ctl, const vshCm + + desturi = vshCommandOptString (cmd, "desturi", &found); + if (!found) { +- vshError (ctl, FALSE, "%s", _("migrate: Missing desturi")); ++ vshError(ctl, "%s", _("migrate: Missing desturi")); + goto done; + } + +@@ -2550,11 +2549,9 @@ cmdNetworkAutostart(vshControl *ctl, con + + if (virNetworkSetAutostart(network, autostart) < 0) { + if (autostart) +- vshError(ctl, FALSE, _("failed to mark network %s as autostarted"), +- name); ++ vshError(ctl, _("failed to mark network %s as autostarted"), name); + else +- vshError(ctl, FALSE,_("failed to unmark network %s as autostarted"), +- name); ++ vshError(ctl, _("failed to unmark network %s as autostarted"), name); + virNetworkFree(network); + return FALSE; + } +@@ -2609,7 +2606,7 @@ cmdNetworkCreate(vshControl *ctl, const + virNetworkGetName(network), from); + virNetworkFree(network); + } else { +- vshError(ctl, FALSE, _("Failed to create network from %s"), from); ++ vshError(ctl, _("Failed to create network from %s"), from); + ret = FALSE; + } + return ret; +@@ -2657,7 +2654,7 @@ cmdNetworkDefine(vshControl *ctl, const + virNetworkGetName(network), from); + virNetworkFree(network); + } else { +- vshError(ctl, FALSE, _("Failed to define network from %s"), from); ++ vshError(ctl, _("Failed to define network from %s"), from); + ret = FALSE; + } + return ret; +@@ -2694,7 +2691,7 @@ cmdNetworkDestroy(vshControl *ctl, const + if (virNetworkDestroy(network) == 0) { + vshPrint(ctl, _("Network %s destroyed\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to destroy network %s"), name); ++ vshError(ctl, _("Failed to destroy network %s"), name); + ret = FALSE; + } + +@@ -2811,8 +2808,8 @@ cmdInterfaceEdit (vshControl *ctl, const + goto cleanup; + + if (STRNEQ (doc, doc_reread)) { +- vshError (ctl, FALSE, "%s", +- _("ERROR: the XML configuration was changed by another user")); ++ vshError(ctl, "%s", ++ _("ERROR: the XML configuration was changed by another user")); + goto cleanup; + } + +@@ -2874,7 +2871,7 @@ cmdNetworkList(vshControl *ctl, const vs + if (active) { + maxactive = virConnectNumOfNetworks(ctl->conn); + if (maxactive < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active networks")); ++ vshError(ctl, "%s", _("Failed to list active networks")); + return FALSE; + } + if (maxactive) { +@@ -2882,7 +2879,7 @@ cmdNetworkList(vshControl *ctl, const vs + + if ((maxactive = virConnectListNetworks(ctl->conn, activeNames, + maxactive)) < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active networks")); ++ vshError(ctl, "%s", _("Failed to list active networks")); + free(activeNames); + return FALSE; + } +@@ -2893,7 +2890,7 @@ cmdNetworkList(vshControl *ctl, const vs + if (inactive) { + maxinactive = virConnectNumOfDefinedNetworks(ctl->conn); + if (maxinactive < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list inactive networks")); ++ vshError(ctl, "%s", _("Failed to list inactive networks")); + free(activeNames); + return FALSE; + } +@@ -2903,8 +2900,7 @@ cmdNetworkList(vshControl *ctl, const vs + if ((maxinactive = + virConnectListDefinedNetworks(ctl->conn, inactiveNames, + maxinactive)) < 0) { +- vshError(ctl, FALSE, "%s", +- _("Failed to list inactive networks")); ++ vshError(ctl, "%s", _("Failed to list inactive networks")); + free(activeNames); + free(inactiveNames); + return FALSE; +@@ -3032,7 +3028,7 @@ cmdNetworkStart(vshControl *ctl, const v + vshPrint(ctl, _("Network %s started\n"), + virNetworkGetName(network)); + } else { +- vshError(ctl, FALSE, _("Failed to start network %s"), ++ vshError(ctl, _("Failed to start network %s"), + virNetworkGetName(network)); + ret = FALSE; + } +@@ -3071,7 +3067,7 @@ cmdNetworkUndefine(vshControl *ctl, cons + if (virNetworkUndefine(network) == 0) { + vshPrint(ctl, _("Network %s has been undefined\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to undefine network %s"), name); ++ vshError(ctl, _("Failed to undefine network %s"), name); + ret = FALSE; + } + +@@ -3110,7 +3106,7 @@ cmdNetworkUuid(vshControl *ctl, const vs + if (virNetworkGetUUIDString(network, uuid) != -1) + vshPrint(ctl, "%s\n", uuid); + else +- vshError(ctl, FALSE, "%s", _("failed to get network UUID")); ++ vshError(ctl, "%s", _("failed to get network UUID")); + + virNetworkFree(network); + return TRUE; +@@ -3148,7 +3144,7 @@ cmdInterfaceList(vshControl *ctl, const + if (active) { + maxactive = virConnectNumOfInterfaces(ctl->conn); + if (maxactive < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active interfaces")); ++ vshError(ctl, "%s", _("Failed to list active interfaces")); + return FALSE; + } + if (maxactive) { +@@ -3156,8 +3152,7 @@ cmdInterfaceList(vshControl *ctl, const + + if ((maxactive = virConnectListInterfaces(ctl->conn, activeNames, + maxactive)) < 0) { +- vshError(ctl, FALSE, "%s", +- _("Failed to list active interfaces")); ++ vshError(ctl, "%s", _("Failed to list active interfaces")); + free(activeNames); + return FALSE; + } +@@ -3168,8 +3163,7 @@ cmdInterfaceList(vshControl *ctl, const + if (inactive) { + maxinactive = virConnectNumOfDefinedInterfaces(ctl->conn); + if (maxinactive < 0) { +- vshError(ctl, FALSE, "%s", +- _("Failed to list inactive interfaces")); ++ vshError(ctl, "%s", _("Failed to list inactive interfaces")); + free(activeNames); + return FALSE; + } +@@ -3179,8 +3173,7 @@ cmdInterfaceList(vshControl *ctl, const + if ((maxinactive = + virConnectListDefinedInterfaces(ctl->conn, inactiveNames, + maxinactive)) < 0) { +- vshError(ctl, FALSE, "%s", +- _("Failed to list inactive interfaces")); ++ vshError(ctl, "%s", _("Failed to list inactive interfaces")); + free(activeNames); + free(inactiveNames); + return FALSE; +@@ -3373,7 +3366,7 @@ cmdInterfaceDefine(vshControl *ctl, cons + virInterfaceGetName(iface), from); + virInterfaceFree (iface); + } else { +- vshError(ctl, FALSE, _("Failed to define interface from %s"), from); ++ vshError(ctl, _("Failed to define interface from %s"), from); + ret = FALSE; + } + return ret; +@@ -3409,7 +3402,7 @@ cmdInterfaceUndefine(vshControl *ctl, co + if (virInterfaceUndefine(iface) == 0) { + vshPrint(ctl, _("Interface %s undefined\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to undefine interface %s"), name); ++ vshError(ctl, _("Failed to undefine interface %s"), name); + ret = FALSE; + } + +@@ -3447,7 +3440,7 @@ cmdInterfaceStart(vshControl *ctl, const + if (virInterfaceCreate(iface, 0) == 0) { + vshPrint(ctl, _("Interface %s started\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to start interface %s"), name); ++ vshError(ctl, _("Failed to start interface %s"), name); + ret = FALSE; + } + +@@ -3485,7 +3478,7 @@ cmdInterfaceDestroy(vshControl *ctl, con + if (virInterfaceDestroy(iface, 0) == 0) { + vshPrint(ctl, _("Interface %s destroyed\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to destroy interface %s"), name); ++ vshError(ctl, _("Failed to destroy interface %s"), name); + ret = FALSE; + } + +@@ -3527,11 +3520,9 @@ cmdPoolAutostart(vshControl *ctl, const + + if (virStoragePoolSetAutostart(pool, autostart) < 0) { + if (autostart) +- vshError(ctl, FALSE, _("failed to mark pool %s as autostarted"), +- name); ++ vshError(ctl, _("failed to mark pool %s as autostarted"), name); + else +- vshError(ctl, FALSE,_("failed to unmark pool %s as autostarted"), +- name); ++ vshError(ctl, _("failed to unmark pool %s as autostarted"), name); + virStoragePoolFree(pool); + return FALSE; + } +@@ -3587,7 +3578,7 @@ cmdPoolCreate(vshControl *ctl, const vsh + virStoragePoolGetName(pool), from); + virStoragePoolFree(pool); + } else { +- vshError(ctl, FALSE, _("Failed to create pool from %s"), from); ++ vshError(ctl, _("Failed to create pool from %s"), from); + ret = FALSE; + } + return ret; +@@ -3641,7 +3632,7 @@ cmdNodeDeviceCreate(vshControl *ctl, con + virNodeDeviceGetName(dev), from); + virNodeDeviceFree(dev); + } else { +- vshError(ctl, FALSE, _("Failed to create node device from %s"), from); ++ vshError(ctl, _("Failed to create node device from %s"), from); + ret = FALSE; + } + +@@ -3687,7 +3678,7 @@ cmdNodeDeviceDestroy(vshControl *ctl, co + if (virNodeDeviceDestroy(dev) == 0) { + vshPrint(ctl, _("Destroyed node device '%s'\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to destroy node device '%s'"), name); ++ vshError(ctl, _("Failed to destroy node device '%s'"), name); + ret = FALSE; + } + +@@ -3800,7 +3791,7 @@ cmdPoolCreateAs(vshControl *ctl, const v + vshPrint(ctl, _("Pool %s created\n"), name); + virStoragePoolFree(pool); + } else { +- vshError(ctl, FALSE, _("Failed to create pool %s"), name); ++ vshError(ctl, _("Failed to create pool %s"), name); + return FALSE; + } + } +@@ -3849,7 +3840,7 @@ cmdPoolDefine(vshControl *ctl, const vsh + virStoragePoolGetName(pool), from); + virStoragePoolFree(pool); + } else { +- vshError(ctl, FALSE, _("Failed to define pool from %s"), from); ++ vshError(ctl, _("Failed to define pool from %s"), from); + ret = FALSE; + } + return ret; +@@ -3889,7 +3880,7 @@ cmdPoolDefineAs(vshControl *ctl, const v + vshPrint(ctl, _("Pool %s defined\n"), name); + virStoragePoolFree(pool); + } else { +- vshError(ctl, FALSE, _("Failed to define pool %s"), name); ++ vshError(ctl, _("Failed to define pool %s"), name); + return FALSE; + } + } +@@ -3927,7 +3918,7 @@ cmdPoolBuild(vshControl *ctl, const vshC + if (virStoragePoolBuild(pool, 0) == 0) { + vshPrint(ctl, _("Pool %s built\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to build pool %s"), name); ++ vshError(ctl, _("Failed to build pool %s"), name); + ret = FALSE; + virStoragePoolFree(pool); + } +@@ -3966,7 +3957,7 @@ cmdPoolDestroy(vshControl *ctl, const vs + if (virStoragePoolDestroy(pool) == 0) { + vshPrint(ctl, _("Pool %s destroyed\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to destroy pool %s"), name); ++ vshError(ctl, _("Failed to destroy pool %s"), name); + ret = FALSE; + } + +@@ -4005,7 +3996,7 @@ cmdPoolDelete(vshControl *ctl, const vsh + if (virStoragePoolDelete(pool, 0) == 0) { + vshPrint(ctl, _("Pool %s deleted\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to delete pool %s"), name); ++ vshError(ctl, _("Failed to delete pool %s"), name); + ret = FALSE; + } + +@@ -4044,7 +4035,7 @@ cmdPoolRefresh(vshControl *ctl, const vs + if (virStoragePoolRefresh(pool, 0) == 0) { + vshPrint(ctl, _("Pool %s refreshed\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to refresh pool %s"), name); ++ vshError(ctl, _("Failed to refresh pool %s"), name); + ret = FALSE; + } + virStoragePoolFree(pool); +@@ -4124,7 +4115,7 @@ cmdPoolList(vshControl *ctl, const vshCm + if (active) { + maxactive = virConnectNumOfStoragePools(ctl->conn); + if (maxactive < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active pools")); ++ vshError(ctl, "%s", _("Failed to list active pools")); + return FALSE; + } + if (maxactive) { +@@ -4132,7 +4123,7 @@ cmdPoolList(vshControl *ctl, const vshCm + + if ((maxactive = virConnectListStoragePools(ctl->conn, activeNames, + maxactive)) < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active pools")); ++ vshError(ctl, "%s", _("Failed to list active pools")); + free(activeNames); + return FALSE; + } +@@ -4143,7 +4134,7 @@ cmdPoolList(vshControl *ctl, const vshCm + if (inactive) { + maxinactive = virConnectNumOfDefinedStoragePools(ctl->conn); + if (maxinactive < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list inactive pools")); ++ vshError(ctl, "%s", _("Failed to list inactive pools")); + free(activeNames); + return FALSE; + } +@@ -4151,7 +4142,7 @@ cmdPoolList(vshControl *ctl, const vshCm + inactiveNames = vshMalloc(ctl, sizeof(char *) * maxinactive); + + if ((maxinactive = virConnectListDefinedStoragePools(ctl->conn, inactiveNames, maxinactive)) < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list inactive pools")); ++ vshError(ctl, "%s", _("Failed to list inactive pools")); + free(activeNames); + free(inactiveNames); + return FALSE; +@@ -4273,10 +4264,10 @@ cmdPoolDiscoverSourcesAs(vshControl * ct + if (ret < 0) { + switch (errno) { + case ENOMEM: +- vshError(ctl, FALSE, "%s", _("Out of memory")); ++ vshError(ctl, "%s", _("Out of memory")); + break; + default: +- vshError(ctl, FALSE, _("virAsprintf failed (errno %d)"), errno); ++ vshError(ctl, _("virAsprintf failed (errno %d)"), errno); + } + return FALSE; + } +@@ -4285,7 +4276,7 @@ cmdPoolDiscoverSourcesAs(vshControl * ct + srcList = virConnectFindStoragePoolSources(ctl->conn, type, srcSpec, 0); + free(srcSpec); + if (srcList == NULL) { +- vshError(ctl, FALSE, _("Failed to find any %s pool sources"), type); ++ vshError(ctl, _("Failed to find any %s pool sources"), type); + return FALSE; + } + vshPrint(ctl, "%s", srcList); +@@ -4336,7 +4327,7 @@ cmdPoolDiscoverSources(vshControl * ctl, + srcList = virConnectFindStoragePoolSources(ctl->conn, type, srcSpec, 0); + free(srcSpec); + if (srcList == NULL) { +- vshError(ctl, FALSE, _("Failed to find any %s pool sources"), type); ++ vshError(ctl, _("Failed to find any %s pool sources"), type); + return FALSE; + } + vshPrint(ctl, "%s", srcList); +@@ -4503,8 +4494,7 @@ cmdPoolStart(vshControl *ctl, const vshC + vshPrint(ctl, _("Pool %s started\n"), + virStoragePoolGetName(pool)); + } else { +- vshError(ctl, FALSE, _("Failed to start pool %s"), +- virStoragePoolGetName(pool)); ++ vshError(ctl, _("Failed to start pool %s"), virStoragePoolGetName(pool)); + ret = FALSE; + } + +@@ -4585,12 +4575,12 @@ cmdVolCreateAs(vshControl *ctl, const vs + if (!found) + goto cleanup; + if (cmdVolSize(capacityStr, &capacity) < 0) +- vshError(ctl, FALSE, _("Malformed size %s"), capacityStr); ++ vshError(ctl, _("Malformed size %s"), capacityStr); + + allocationStr = vshCommandOptString(cmd, "allocation", &found); + if (allocationStr && + cmdVolSize(allocationStr, &allocation) < 0) +- vshError(ctl, FALSE, _("Malformed size %s"), allocationStr); ++ vshError(ctl, _("Malformed size %s"), allocationStr); + + format = vshCommandOptString(cmd, "format", &found); + +@@ -4623,7 +4613,7 @@ cmdVolCreateAs(vshControl *ctl, const vs + virStorageVolFree(vol); + return TRUE; + } else { +- vshError(ctl, FALSE, _("Failed to create vol %s"), name); ++ vshError(ctl, _("Failed to create vol %s"), name); + return FALSE; + } + +@@ -4664,7 +4654,7 @@ cmdPoolUndefine(vshControl *ctl, const v + if (virStoragePoolUndefine(pool) == 0) { + vshPrint(ctl, _("Pool %s has been undefined\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to undefine pool %s"), name); ++ vshError(ctl, _("Failed to undefine pool %s"), name); + ret = FALSE; + } + +@@ -4703,7 +4693,7 @@ cmdPoolUuid(vshControl *ctl, const vshCm + if (virStoragePoolGetUUIDString(pool, uuid) != -1) + vshPrint(ctl, "%s\n", uuid); + else +- vshError(ctl, FALSE, "%s", _("failed to get pool UUID")); ++ vshError(ctl, "%s", _("failed to get pool UUID")); + + virStoragePoolFree(pool); + return TRUE; +@@ -4762,7 +4752,7 @@ cmdVolCreate(vshControl *ctl, const vshC + virStorageVolGetName(vol), from); + virStorageVolFree(vol); + } else { +- vshError(ctl, FALSE, _("Failed to create vol from %s"), from); ++ vshError(ctl, _("Failed to create vol from %s"), from); + ret = FALSE; + } + return ret; +@@ -4819,7 +4809,7 @@ cmdVolCreateFrom(vshControl *ctl, const + vshPrint(ctl, _("Vol %s created from input vol %s\n"), + virStorageVolGetName(newvol), virStorageVolGetName(inputvol)); + } else { +- vshError(ctl, FALSE, _("Failed to create vol from %s"), from); ++ vshError(ctl, _("Failed to create vol from %s"), from); + goto cleanup; + } + +@@ -4901,7 +4891,7 @@ cmdVolClone(vshControl *ctl, const vshCm + + origpool = virStoragePoolLookupByVolume(origvol); + if (!origpool) { +- vshError(ctl, FALSE, "%s", _("failed to get parent pool")); ++ vshError(ctl, "%s", _("failed to get parent pool")); + goto cleanup; + } + +@@ -4925,7 +4915,7 @@ cmdVolClone(vshControl *ctl, const vshCm + vshPrint(ctl, _("Vol %s cloned from %s\n"), + virStorageVolGetName(newvol), virStorageVolGetName(origvol)); + } else { +- vshError(ctl, FALSE, _("Failed to clone vol from %s"), ++ vshError(ctl, _("Failed to clone vol from %s"), + virStorageVolGetName(origvol)); + goto cleanup; + } +@@ -4976,7 +4966,7 @@ cmdVolDelete(vshControl *ctl, const vshC + if (virStorageVolDelete(vol, 0) == 0) { + vshPrint(ctl, _("Vol %s deleted\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to delete vol %s"), name); ++ vshError(ctl, _("Failed to delete vol %s"), name); + ret = FALSE; + } + +@@ -5107,7 +5097,7 @@ cmdVolList(vshControl *ctl, const vshCmd + maxactive = virStoragePoolNumOfVolumes(pool); + if (maxactive < 0) { + virStoragePoolFree(pool); +- vshError(ctl, FALSE, "%s", _("Failed to list active vols")); ++ vshError(ctl, "%s", _("Failed to list active vols")); + return FALSE; + } + if (maxactive) { +@@ -5115,7 +5105,7 @@ cmdVolList(vshControl *ctl, const vshCmd + + if ((maxactive = virStoragePoolListVolumes(pool, activeNames, + maxactive)) < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list active vols")); ++ vshError(ctl, "%s", _("Failed to list active vols")); + free(activeNames); + virStoragePoolFree(pool); + return FALSE; +@@ -5288,12 +5278,11 @@ cmdSecretDefine(vshControl *ctl, const v + free (buffer); + + if (res == NULL) { +- vshError(ctl, FALSE, _("Failed to set attributes from %s"), from); ++ vshError(ctl, _("Failed to set attributes from %s"), from); + return FALSE; + } + if (virSecretGetUUIDString(res, &(uuid[0])) < 0) { +- vshError(ctl, FALSE, "%s", +- _("Failed to get UUID of created secret")); ++ vshError(ctl, "%s", _("Failed to get UUID of created secret")); + virSecretFree(res); + return FALSE; + } +@@ -5377,11 +5366,11 @@ cmdSecretSetValue(vshControl *ctl, const + goto cleanup; + + if (!base64_decode_alloc(base64, strlen(base64), &value, &value_size)) { +- vshError(ctl, FALSE, _("Invalid base64 data")); ++ vshError(ctl, _("Invalid base64 data")); + goto cleanup; + } + if (value == NULL) { +- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); ++ vshError(ctl, "%s", _("Failed to allocate memory")); + return FALSE; + } + +@@ -5390,7 +5379,7 @@ cmdSecretSetValue(vshControl *ctl, const + free (value); + + if (res != 0) { +- vshError(ctl, FALSE, "%s", _("Failed to set secret value")); ++ vshError(ctl, "%s", _("Failed to set secret value")); + goto cleanup; + } + vshPrint(ctl, "%s", _("Secret value set\n")); +@@ -5440,7 +5429,7 @@ cmdSecretGetValue(vshControl *ctl, const + free(value); + + if (base64 == NULL) { +- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); ++ vshError(ctl, "%s", _("Failed to allocate memory")); + goto cleanup; + } + printf("%s", base64); +@@ -5482,7 +5471,7 @@ cmdSecretUndefine(vshControl *ctl, const + return FALSE; + + if (virSecretUndefine(secret) < 0) { +- vshError(ctl, FALSE, _("Failed to delete secret %s"), uuid); ++ vshError(ctl, _("Failed to delete secret %s"), uuid); + goto cleanup; + } + vshPrint(ctl, _("Secret %s deleted\n"), uuid); +@@ -5513,14 +5502,14 @@ cmdSecretList(vshControl *ctl, const vsh + + maxuuids = virConnectNumOfSecrets(ctl->conn); + if (maxuuids < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list secrets")); ++ vshError(ctl, "%s", _("Failed to list secrets")); + return FALSE; + } + uuids = vshMalloc(ctl, sizeof(*uuids) * maxuuids); + + maxuuids = virConnectListSecrets(ctl->conn, uuids, maxuuids); + if (maxuuids < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list secrets")); ++ vshError(ctl, "%s", _("Failed to list secrets")); + free(uuids); + return FALSE; + } +@@ -5589,7 +5578,7 @@ cmdVersion(vshControl *ctl, const vshCmd + + hvType = virConnectGetType(ctl->conn); + if (hvType == NULL) { +- vshError(ctl, FALSE, "%s", _("failed to get hypervisor type")); ++ vshError(ctl, "%s", _("failed to get hypervisor type")); + return FALSE; + } + +@@ -5603,7 +5592,7 @@ cmdVersion(vshControl *ctl, const vshCmd + + ret = virGetVersion(&libVersion, hvType, &apiVersion); + if (ret < 0) { +- vshError(ctl, FALSE, "%s", _("failed to get the library version")); ++ vshError(ctl, "%s", _("failed to get the library version")); + return FALSE; + } + major = libVersion / 1000000; +@@ -5622,7 +5611,7 @@ cmdVersion(vshControl *ctl, const vshCmd + + ret = virConnectGetVersion(ctl->conn, &hvVersion); + if (ret < 0) { +- vshError(ctl, FALSE, "%s", _("failed to get the hypervisor version")); ++ vshError(ctl, "%s", _("failed to get the hypervisor version")); + return FALSE; + } + if (hvVersion == 0) { +@@ -5752,7 +5741,7 @@ cmdNodeListDevices (vshControl *ctl, con + + num_devices = virNodeNumOfDevices(ctl->conn, cap, 0); + if (num_devices < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to count node devices")); ++ vshError(ctl, "%s", _("Failed to count node devices")); + return FALSE; + } else if (num_devices == 0) { + return TRUE; +@@ -5762,7 +5751,7 @@ cmdNodeListDevices (vshControl *ctl, con + num_devices = + virNodeListDevices(ctl->conn, cap, devices, num_devices, 0); + if (num_devices < 0) { +- vshError(ctl, FALSE, "%s", _("Failed to list node devices")); ++ vshError(ctl, "%s", _("Failed to list node devices")); + free(devices); + return FALSE; + } +@@ -5835,7 +5824,7 @@ cmdNodeDeviceDumpXML (vshControl *ctl, c + if (!(name = vshCommandOptString(cmd, "device", NULL))) + return FALSE; + if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { +- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); ++ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); + return FALSE; + } + +@@ -5878,14 +5867,14 @@ cmdNodeDeviceDettach (vshControl *ctl, c + if (!(name = vshCommandOptString(cmd, "device", NULL))) + return FALSE; + if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { +- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); ++ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); + return FALSE; + } + + if (virNodeDeviceDettach(device) == 0) { + vshPrint(ctl, _("Device %s dettached\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to dettach device %s"), name); ++ vshError(ctl, _("Failed to dettach device %s"), name); + ret = FALSE; + } + virNodeDeviceFree(device); +@@ -5919,14 +5908,14 @@ cmdNodeDeviceReAttach (vshControl *ctl, + if (!(name = vshCommandOptString(cmd, "device", NULL))) + return FALSE; + if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { +- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); ++ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); + return FALSE; + } + + if (virNodeDeviceReAttach(device) == 0) { + vshPrint(ctl, _("Device %s re-attached\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to re-attach device %s"), name); ++ vshError(ctl, _("Failed to re-attach device %s"), name); + ret = FALSE; + } + virNodeDeviceFree(device); +@@ -5960,14 +5949,14 @@ cmdNodeDeviceReset (vshControl *ctl, con + if (!(name = vshCommandOptString(cmd, "device", NULL))) + return FALSE; + if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { +- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); ++ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); + return FALSE; + } + + if (virNodeDeviceReset(device) == 0) { + vshPrint(ctl, _("Device %s reset\n"), name); + } else { +- vshError(ctl, FALSE, _("Failed to reset device %s"), name); ++ vshError(ctl, _("Failed to reset device %s"), name); + ret = FALSE; + } + virNodeDeviceFree(device); +@@ -5993,7 +5982,7 @@ cmdHostname (vshControl *ctl, const vshC + + hostname = virConnectGetHostname (ctl->conn); + if (hostname == NULL) { +- vshError(ctl, FALSE, "%s", _("failed to get hostname")); ++ vshError(ctl, "%s", _("failed to get hostname")); + return FALSE; + } + +@@ -6022,7 +6011,7 @@ cmdURI (vshControl *ctl, const vshCmd *c + + uri = virConnectGetURI (ctl->conn); + if (uri == NULL) { +- vshError(ctl, FALSE, "%s", _("failed to get URI")); ++ vshError(ctl, "%s", _("failed to get URI")); + return FALSE; + } + +@@ -6200,7 +6189,7 @@ cmdAttachDevice(vshControl *ctl, const v + + from = vshCommandOptString(cmd, "file", &found); + if (!found) { +- vshError(ctl, FALSE, "%s", _("attach-device: Missing option")); ++ vshError(ctl, "%s", _("attach-device: Missing option")); + virDomainFree(dom); + return FALSE; + } +@@ -6214,7 +6203,7 @@ cmdAttachDevice(vshControl *ctl, const v + free (buffer); + + if (ret < 0) { +- vshError(ctl, FALSE, _("Failed to attach device from %s"), from); ++ vshError(ctl, _("Failed to attach device from %s"), from); + virDomainFree(dom); + return FALSE; + } else { +@@ -6258,7 +6247,7 @@ cmdDetachDevice(vshControl *ctl, const v + + from = vshCommandOptString(cmd, "file", &found); + if (!found) { +- vshError(ctl, FALSE, "%s", _("detach-device: Missing option")); ++ vshError(ctl, "%s", _("detach-device: Missing option")); + virDomainFree(dom); + return FALSE; + } +@@ -6272,7 +6261,7 @@ cmdDetachDevice(vshControl *ctl, const v + free (buffer); + + if (ret < 0) { +- vshError(ctl, FALSE, _("Failed to detach device from %s"), from); ++ vshError(ctl, _("Failed to detach device from %s"), from); + virDomainFree(dom); + return FALSE; + } else { +@@ -6331,7 +6320,7 @@ cmdAttachInterface(vshControl *ctl, cons + } else if (STREQ(type, "bridge")) { + typ = 2; + } else { +- vshError(ctl, FALSE, _("No support %s in command 'attach-interface'"), type); ++ vshError(ctl, _("No support %s in command 'attach-interface'"), type); + goto cleanup; + } + +@@ -6450,12 +6439,12 @@ cmdDetachInterface(vshControl *ctl, cons + XML_PARSE_NOWARNING); + free(doc); + if (!xml) { +- vshError(ctl, FALSE, "%s", _("Failed to get interface information")); ++ vshError(ctl, "%s", _("Failed to get interface information")); + goto cleanup; + } + ctxt = xmlXPathNewContext(xml); + if (!ctxt) { +- vshError(ctl, FALSE, "%s", _("Failed to get interface information")); ++ vshError(ctl, "%s", _("Failed to get interface information")); + goto cleanup; + } + +@@ -6463,7 +6452,7 @@ cmdDetachInterface(vshControl *ctl, cons + obj = xmlXPathEval(BAD_CAST buf, ctxt); + if ((obj == NULL) || (obj->type != XPATH_NODESET) || + (obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0)) { +- vshError(ctl, FALSE, _("No found interface whose type is %s"), type); ++ vshError(ctl, _("No found interface whose type is %s"), type); + goto cleanup; + } + +@@ -6485,18 +6474,18 @@ cmdDetachInterface(vshControl *ctl, cons + cur = cur->next; + } + } +- vshError(ctl, FALSE, _("No found interface whose MAC address is %s"), mac); ++ vshError(ctl, _("No found interface whose MAC address is %s"), mac); + goto cleanup; + + hit: + xml_buf = xmlBufferCreate(); + if (!xml_buf) { +- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); ++ vshError(ctl, "%s", _("Failed to allocate memory")); + goto cleanup; + } + + if(xmlNodeDump(xml_buf, xml, obj->nodesetval->nodeTab[i], 0, 0) < 0){ +- vshError(ctl, FALSE, "%s", _("Failed to create XML")); ++ vshError(ctl, "%s", _("Failed to create XML")); + goto cleanup; + } + +@@ -6569,14 +6558,14 @@ cmdAttachDisk(vshControl *ctl, const vsh + if (STREQ(driver, "file") || STREQ(driver, "tap")) { + isFile = 1; + } else if (STRNEQ(driver, "phy")) { +- vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), driver); ++ vshError(ctl, _("No support %s in command 'attach-disk'"), driver); + goto cleanup; + } + } + + if (mode) { + if (STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) { +- vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), mode); ++ vshError(ctl, _("No support %s in command 'attach-disk'"), mode); + goto cleanup; + } + } +@@ -6723,19 +6712,19 @@ cmdDetachDisk(vshControl *ctl, const vsh + XML_PARSE_NOWARNING); + free(doc); + if (!xml) { +- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); ++ vshError(ctl, "%s", _("Failed to get disk information")); + goto cleanup; + } + ctxt = xmlXPathNewContext(xml); + if (!ctxt) { +- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); ++ vshError(ctl, "%s", _("Failed to get disk information")); + goto cleanup; + } + + obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt); + if ((obj == NULL) || (obj->type != XPATH_NODESET) || + (obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0)) { +- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); ++ vshError(ctl, "%s", _("Failed to get disk information")); + goto cleanup; + } + +@@ -6754,18 +6743,18 @@ cmdDetachDisk(vshControl *ctl, const vsh + cur = cur->next; + } + } +- vshError(ctl, FALSE, _("No found disk whose target is %s"), target); ++ vshError(ctl, _("No found disk whose target is %s"), target); + goto cleanup; + + hit: + xml_buf = xmlBufferCreate(); + if (!xml_buf) { +- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); ++ vshError(ctl, "%s", _("Failed to allocate memory")); + goto cleanup; + } + + if(xmlNodeDump(xml_buf, xml, obj->nodesetval->nodeTab[i], 0, 0) < 0){ +- vshError(ctl, FALSE, "%s", _("Failed to create XML")); ++ vshError(ctl, "%s", _("Failed to create XML")); + goto cleanup; + } + +@@ -6799,9 +6788,8 @@ editWriteToTempFile (vshControl *ctl, co + + ret = malloc (PATH_MAX); + if (!ret) { +- vshError(ctl, FALSE, +- _("malloc: failed to allocate temporary file name: %s"), +- strerror (errno)); ++ vshError(ctl, _("malloc: failed to allocate temporary file name: %s"), ++ strerror(errno)); + return NULL; + } + +@@ -6810,25 +6798,22 @@ editWriteToTempFile (vshControl *ctl, co + snprintf (ret, PATH_MAX, "%s/virshXXXXXX", tmpdir); + fd = mkstemp (ret); + if (fd == -1) { +- vshError(ctl, FALSE, +- _("mkstemp: failed to create temporary file: %s"), +- strerror (errno)); ++ vshError(ctl, _("mkstemp: failed to create temporary file: %s"), ++ strerror(errno)); + return NULL; + } + + if (safewrite (fd, doc, strlen (doc)) == -1) { +- vshError(ctl, FALSE, +- _("write: %s: failed to write to temporary file: %s"), +- ret, strerror (errno)); ++ vshError(ctl, _("write: %s: failed to write to temporary file: %s"), ++ ret, strerror(errno)); + close (fd); + unlink (ret); + free (ret); + return NULL; + } + if (close (fd) == -1) { +- vshError(ctl, FALSE, +- _("close: %s: failed to write or close temporary file: %s"), +- ret, strerror (errno)); ++ vshError(ctl, _("close: %s: failed to write or close temporary file: %s"), ++ ret, strerror(errno)); + unlink (ret); + free (ret); + return NULL; +@@ -6856,35 +6841,37 @@ editFile (vshControl *ctl, const char *f + * it does, refuse to run. + */ + if (strspn (editor, ACCEPTED_CHARS) != strlen (editor)) { +- vshError(ctl, FALSE, +- _("%s: $EDITOR environment variable contains shell meta or other unacceptable characters"), ++ vshError(ctl, ++ _("%s: $EDITOR environment variable contains shell meta or " ++ "other unacceptable characters"), + editor); + return -1; + } + /* Same for the filename. */ + if (strspn (filename, ACCEPTED_CHARS) != strlen (filename)) { +- vshError(ctl, FALSE, +- _("%s: temporary filename contains shell meta or other unacceptable characters (is $TMPDIR wrong?)"), ++ vshError(ctl, ++ _("%s: temporary filename contains shell meta or other " ++ "unacceptable characters (is $TMPDIR wrong?)"), + filename); + return -1; + } + + if (virAsprintf(&command, "%s %s", editor, filename) == -1) { +- vshError(ctl, FALSE, ++ vshError(ctl, + _("virAsprintf: could not create editing command: %s"), +- strerror (errno)); ++ strerror(errno)); + return -1; + } + + command_ret = system (command); + if (command_ret == -1) { +- vshError(ctl, FALSE, +- _("%s: edit command failed: %s"), command, strerror (errno)); ++ vshError(ctl, ++ _("%s: edit command failed: %s"), command, strerror(errno)); + free (command); + return -1; + } + if (command_ret != WEXITSTATUS (0)) { +- vshError(ctl, FALSE, ++ vshError(ctl, + _("%s: command exited with non-zero status"), command); + free (command); + return -1; +@@ -6899,9 +6886,9 @@ editReadBackFile (vshControl *ctl, const + char *ret; + + if (virFileReadAll (filename, VIRSH_MAX_XML_FILE, &ret) == -1) { +- vshError(ctl, FALSE, ++ vshError(ctl, + _("%s: failed to read temporary file: %s"), +- filename, strerror (errno)); ++ filename, strerror(errno)); + return NULL; + } + return ret; +@@ -6930,8 +6917,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd + int found; + + if (!ctl->imode) { +- vshError(ctl, FALSE, "%s", +- _("cd: command valid only in interactive mode")); ++ vshError(ctl, "%s", _("cd: command valid only in interactive mode")); + return -1; + } + +@@ -6944,7 +6930,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd + dir = "/"; + + if (chdir (dir) == -1) { +- vshError(ctl, FALSE, _("cd: %s: %s"), strerror (errno), dir); ++ vshError(ctl, _("cd: %s: %s"), strerror(errno), dir); + return -1; + } + +@@ -6982,7 +6968,8 @@ cmdPwd(vshControl *ctl, const vshCmd *cm + } + + if (err) +- vshError(ctl, FALSE, _("pwd: cannot get current directory: %s"), strerror (errno)); ++ vshError(ctl, _("pwd: cannot get current directory: %s"), ++ strerror(errno)); + else + vshPrint (ctl, _("%s\n"), cwd); + +@@ -7062,8 +7049,8 @@ cmdEdit (vshControl *ctl, const vshCmd * + goto cleanup; + + if (STRNEQ (doc, doc_reread)) { +- vshError (ctl, FALSE, +- "%s", _("ERROR: the XML configuration was changed by another user")); ++ vshError(ctl, ++ "%s", _("ERROR: the XML configuration was changed by another user")); + goto cleanup; + } + +@@ -7348,7 +7335,7 @@ vshCommandCheckOpts(vshControl *ctl, con + o = o->next; + } + if (!ok) { +- vshError(ctl, FALSE, ++ vshError(ctl, + d->type == VSH_OT_DATA ? + _("command '%s' requires <%s> option") : + _("command '%s' requires --%s option"), +@@ -7378,7 +7365,7 @@ vshCmddefHelp(vshControl *ctl, const cha + const vshCmdDef *def = vshCmddefSearch(cmdname); + + if (!def) { +- vshError(ctl, FALSE, _("command '%s' doesn't exist"), cmdname); ++ vshError(ctl, _("command '%s' doesn't exist"), cmdname); + return FALSE; + } else { + const char *desc = N_(vshCmddefGetInfo(def, "desc")); +@@ -7577,8 +7564,7 @@ cmd_has_option (vshControl *ctl, const v + } + + if (!found) +- vshError(ctl, FALSE, +- _("internal error: virsh %s: no %s VSH_OT_DATA option"), ++ vshError(ctl, _("internal error: virsh %s: no %s VSH_OT_DATA option"), + cmd->def->name, optname); + return found; + } +@@ -7595,7 +7581,7 @@ vshCommandOptDomainBy(vshControl *ctl, c + return NULL; + + if (!(n = vshCommandOptString(cmd, optname, NULL))) { +- vshError(ctl, FALSE, "%s", _("undefined domain name or id")); ++ vshError(ctl, "%s", _("undefined domain name or id")); + return NULL; + } + +@@ -7627,7 +7613,7 @@ vshCommandOptDomainBy(vshControl *ctl, c + } + + if (!dom) +- vshError(ctl, FALSE, _("failed to get domain '%s'"), n); ++ vshError(ctl, _("failed to get domain '%s'"), n); + + return dom; + } +@@ -7643,7 +7629,7 @@ vshCommandOptNetworkBy(vshControl *ctl, + return NULL; + + if (!(n = vshCommandOptString(cmd, optname, NULL))) { +- vshError(ctl, FALSE, "%s", _("undefined network name")); ++ vshError(ctl, "%s", _("undefined network name")); + return NULL; + } + +@@ -7667,7 +7653,7 @@ vshCommandOptNetworkBy(vshControl *ctl, + } + + if (!network) +- vshError(ctl, FALSE, _("failed to get network '%s'"), n); ++ vshError(ctl, _("failed to get network '%s'"), n); + + return network; + } +@@ -7683,7 +7669,7 @@ vshCommandOptInterfaceBy(vshControl *ctl + return NULL; + + if (!(n = vshCommandOptString(cmd, optname, NULL))) { +- vshError(ctl, FALSE, "%s", _("undefined interface identifier")); ++ vshError(ctl, "%s", _("undefined interface identifier")); + return NULL; + } + +@@ -7707,7 +7693,7 @@ vshCommandOptInterfaceBy(vshControl *ctl + } + + if (!iface) +- vshError(ctl, FALSE, _("failed to get interface '%s'"), n); ++ vshError(ctl, _("failed to get interface '%s'"), n); + + return iface; + } +@@ -7720,7 +7706,7 @@ vshCommandOptPoolBy(vshControl *ctl, con + char *n; + + if (!(n = vshCommandOptString(cmd, optname, NULL))) { +- vshError(ctl, FALSE, "%s", _("undefined pool name")); ++ vshError(ctl, "%s", _("undefined pool name")); + return NULL; + } + +@@ -7744,7 +7730,7 @@ vshCommandOptPoolBy(vshControl *ctl, con + } + + if (!pool) +- vshError(ctl, FALSE, _("failed to get pool '%s'"), n); ++ vshError(ctl, _("failed to get pool '%s'"), n); + + return pool; + } +@@ -7761,12 +7747,12 @@ vshCommandOptVolBy(vshControl *ctl, cons + int found; + + if (!(n = vshCommandOptString(cmd, optname, NULL))) { +- vshError(ctl, FALSE, "%s", _("undefined vol name")); ++ vshError(ctl, "%s", _("undefined vol name")); + return NULL; + } + + if (!(p = vshCommandOptString(cmd, pooloptname, &found)) && found) { +- vshError(ctl, FALSE, "%s", _("undefined pool name")); ++ vshError(ctl, "%s", _("undefined pool name")); + return NULL; + } + +@@ -7797,7 +7783,7 @@ vshCommandOptVolBy(vshControl *ctl, cons + } + + if (!vol) +- vshError(ctl, FALSE, _("failed to get vol '%s'"), n); ++ vshError(ctl, _("failed to get vol '%s'"), n); + + if (pool) + virStoragePoolFree(pool); +@@ -7817,7 +7803,7 @@ vshCommandOptSecret(vshControl *ctl, con + + n = vshCommandOptString(cmd, optname, NULL); + if (n == NULL) { +- vshError(ctl, FALSE, "%s", _("undefined secret UUID")); ++ vshError(ctl, "%s", _("undefined secret UUID")); + return NULL; + } + +@@ -7829,7 +7815,7 @@ vshCommandOptSecret(vshControl *ctl, con + secret = virSecretLookupByUUIDString(ctl->conn, n); + + if (secret == NULL) +- vshError(ctl, FALSE, _("failed to get secret '%s'"), n); ++ vshError(ctl, _("failed to get secret '%s'"), n); + + return secret; + } +@@ -7934,7 +7920,7 @@ vshCommandGetToken(vshControl *ctl, char + sz++; + } + if (quote) { +- vshError(ctl, FALSE, "%s", _("missing \"")); ++ vshError(ctl, "%s", _("missing \"")); + return VSH_TK_ERROR; + } + if (tkstr == NULL || *tkstr == '\0' || p == NULL) +@@ -7994,19 +7980,19 @@ vshCommandParse(vshControl *ctl, char *c + if (cmd == NULL) { + /* first token must be command name */ + if (tk != VSH_TK_DATA) { +- vshError(ctl, FALSE, ++ vshError(ctl, + _("unexpected token (command name): '%s'"), + tkdata); + goto syntaxError; + } + if (!(cmd = vshCmddefSearch(tkdata))) { +- vshError(ctl, FALSE, _("unknown command: '%s'"), tkdata); ++ vshError(ctl, _("unknown command: '%s'"), tkdata); + goto syntaxError; /* ... or ignore this command only? */ + } + free(tkdata); + } else if (tk == VSH_TK_OPTION) { + if (!(opt = vshCmddefGetOption(cmd, tkdata))) { +- vshError(ctl, FALSE, ++ vshError(ctl, + _("command '%s' doesn't support option --%s"), + cmd->name, tkdata); + goto syntaxError; +@@ -8021,7 +8007,7 @@ vshCommandParse(vshControl *ctl, char *c + if (tk == VSH_TK_ERROR) + goto syntaxError; + if (tk != VSH_TK_DATA) { +- vshError(ctl, FALSE, ++ vshError(ctl, + _("expected syntax: --%s <%s>"), + opt->name, + opt->type == +@@ -8031,7 +8017,7 @@ vshCommandParse(vshControl *ctl, char *c + } + } else if (tk == VSH_TK_DATA) { + if (!(opt = vshCmddefGetData(cmd, data_ct++))) { +- vshError(ctl, FALSE, _("unexpected data '%s'"), tkdata); ++ vshError(ctl, _("unexpected data '%s'"), tkdata); + goto syntaxError; + } + } +@@ -8143,7 +8129,7 @@ vshConnectionUsability(vshControl *ctl, + */ + if (!conn) { + if (showerror) +- vshError(ctl, FALSE, "%s", _("no valid connection")); ++ vshError(ctl, "%s", _("no valid connection")); + return FALSE; + } + return TRUE; +@@ -8181,7 +8167,7 @@ vshPrintExtra(vshControl *ctl, const cha + + + static void +-vshError(vshControl *ctl, int doexit, const char *format, ...) ++vshError(vshControl *ctl, const char *format, ...) + { + va_list ap; + +@@ -8189,22 +8175,13 @@ vshError(vshControl *ctl, int doexit, co + vshOutputLogFile(ctl, VSH_ERR_ERROR, format, ap); + va_end(ap); + +- if (doexit) +- fprintf(stderr, _("%s: error: "), progname); +- else +- fputs(_("error: "), stderr); ++ fputs(_("error: "), stderr); + + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + + fputc('\n', stderr); +- +- if (doexit) { +- if (ctl) +- vshDeinit(ctl); +- exit(EXIT_FAILURE); +- } + } + + static void * +@@ -8214,9 +8191,9 @@ _vshMalloc(vshControl *ctl, size_t size, + + if ((x = malloc(size))) + return x; +- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), ++ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), + filename, line, (int) size); +- return NULL; ++ exit(EXIT_FAILURE); + } + + static void * +@@ -8226,9 +8203,9 @@ _vshCalloc(vshControl *ctl, size_t nmemb + + if ((x = calloc(nmemb, size))) + return x; +- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), ++ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), + filename, line, (int) (size*nmemb)); +- return NULL; ++ exit(EXIT_FAILURE); + } + + static void * +@@ -8239,9 +8216,9 @@ _vshRealloc(vshControl *ctl, void *ptr, + if ((x = realloc(ptr, size))) + return x; + free(ptr); +- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), ++ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), + filename, line, (int) size); +- return NULL; ++ exit(EXIT_FAILURE); + } + + static char * +@@ -8253,9 +8230,9 @@ _vshStrdup(vshControl *ctl, const char * + return(NULL); + if ((x = strdup(s))) + return x; +- vshError(ctl, TRUE, _("%s: %d: failed to allocate %lu bytes"), ++ vshError(ctl, _("%s: %d: failed to allocate %lu bytes"), + filename, line, (unsigned long)strlen(s)); +- return NULL; ++ exit(EXIT_FAILURE); + } + + /* +@@ -8283,7 +8260,7 @@ vshInit(vshControl *ctl) + */ + if (!ctl->conn) { + virshReportError(ctl); +- vshError(ctl, FALSE, "%s", _("failed to connect to the hypervisor")); ++ vshError(ctl, "%s", _("failed to connect to the hypervisor")); + return FALSE; + } + +@@ -8314,20 +8291,22 @@ vshOpenLogFile(vshControl *ctl) + case ENOENT: + break; + default: +- vshError(ctl, TRUE, "%s", ++ vshError(ctl, "%s", + _("failed to get the log file information")); +- break; ++ exit(EXIT_FAILURE); + } + } else { + if (!S_ISREG(st.st_mode)) { +- vshError(ctl, TRUE, "%s", _("the log path is not a file")); ++ vshError(ctl, "%s", _("the log path is not a file")); ++ exit(EXIT_FAILURE); + } + } + + /* log file open */ + if ((ctl->log_fd = open(ctl->logfile, LOGFILE_FLAGS, FILE_MODE)) < 0) { +- vshError(ctl, TRUE, "%s", ++ vshError(ctl, "%s", + _("failed to open the log file. check the log file path")); ++ exit(EXIT_FAILURE); + } + } + +@@ -8395,7 +8374,7 @@ vshOutputLogFile(vshControl *ctl, int lo + /* write log */ + if (safewrite(ctl->log_fd, msg_buf, strlen(msg_buf)) < 0) { + vshCloseLogFile(ctl); +- vshError(ctl, FALSE, "%s", _("failed to write the log file")); ++ vshError(ctl, "%s", _("failed to write the log file")); + } + } + +@@ -8410,7 +8389,7 @@ vshCloseLogFile(vshControl *ctl) + /* log file close */ + if (ctl->log_fd >= 0) { + if (close(ctl->log_fd) < 0) +- vshError(ctl, FALSE, _("%s: failed to write log file: %s"), ++ vshError(ctl, _("%s: failed to write log file: %s"), + ctl->logfile ? ctl->logfile : "?", strerror (errno)); + ctl->log_fd = -1; + } +@@ -8588,9 +8567,7 @@ vshDeinit(vshControl *ctl) + free(ctl->name); + if (ctl->conn) { + if (virConnectClose(ctl->conn) != 0) { +- ctl->conn = NULL; /* prevent recursive call from vshError() */ +- vshError(ctl, TRUE, "%s", +- _("failed to disconnect from the hypervisor")); ++ vshError(ctl, "%s", _("failed to disconnect from the hypervisor")); + } + } + virResetLastError(); +@@ -8715,16 +8692,16 @@ vshParseArgv(vshControl *ctl, int argc, + ctl->logfile = vshStrdup(ctl, optarg); + break; + default: +- vshError(ctl, TRUE, +- _("unsupported option '-%c'. See --help."), arg); +- break; ++ vshError(ctl, _("unsupported option '-%c'. See --help."), arg); ++ exit(EXIT_FAILURE); + } + } + + if (help) { +- if (end < argc) +- vshError(ctl, TRUE, +- _("extra argument '%s'. See --help."), argv[end]); ++ if (end < argc) { ++ vshError(ctl, _("extra argument '%s'. See --help."), argv[end]); ++ exit(EXIT_FAILURE); ++ } + + /* list all command */ + vshUsage(); diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 3188ac7..73c0874 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.1/src/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5324,7 +5324,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.1.orig/src/xend_internal.c ++++ libvirt-0.7.1/src/xend_internal.c +@@ -5306,7 +5306,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xen-refcnt.patch b/xen-refcnt.patch new file mode 100644 index 0000000..c54934c --- /dev/null +++ b/xen-refcnt.patch @@ -0,0 +1,41 @@ +Index: libvirt-0.7.1/src/xen_inotify.c +=================================================================== +--- libvirt-0.7.1.orig/src/xen_inotify.c ++++ libvirt-0.7.1/src/xen_inotify.c +@@ -463,7 +463,6 @@ xenInotifyOpen(virConnectPtr conn ATTRIB + DEBUG0("Failed to add inotify handle, disabling events"); + } + +- virConnectRef(conn); + return 0; + } + +@@ -486,7 +485,6 @@ xenInotifyClose(virConnectPtr conn) + if (priv->inotifyWatch != -1) + virEventRemoveHandle(priv->inotifyWatch); + close(priv->inotifyFD); +- virUnrefConnect(conn); + + return 0; + } +Index: libvirt-0.7.1/src/xs_internal.c +=================================================================== +--- libvirt-0.7.1.orig/src/xs_internal.c ++++ libvirt-0.7.1/src/xs_internal.c +@@ -1139,8 +1139,6 @@ int xenStoreAddWatch(virConnectPtr conn, + list->watches[n] = watch; + list->count++; + +- conn->refs++; +- + return xs_watch(priv->xshandle, watch->path, watch->token); + } + +@@ -1190,7 +1188,6 @@ int xenStoreRemoveWatch(virConnectPtr co + ; /* Failure to reduce memory allocation isn't fatal */ + } + list->count--; +- virUnrefConnect(conn); + return 0; + } + } From c9dd98a09fd4881c7e8581c9ec0472879662abba948458f4835076263fe8b8a9 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 5 Nov 2009 03:56:27 +0000 Subject: [PATCH 06/12] Fix polkit vs PolicyKit Requires OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=21 --- clone.patch | 6 +- detach-disk.patch | 24 +- devmap-no-pkgconfig.patch | 10 +- fs-ocfs2.patch | 25 + libvirt-0.7.1.tar.bz2 | 3 - libvirt-0.7.2.tar.bz2 | 3 + libvirt.changes | 31 + libvirt.spec | 21 +- libvirtd-defaults.patch | 16 +- migrate-params.patch | 8 +- msg-proc-memleak.patch | 48 - selinux-ldflags.patch | 13 + snapshots.patch | 542 +++++------ socat.patch | 8 +- suse-network.patch | 28 +- virsh-warning.patch | 19 + vshdeinit-recurse.patch | 1882 ------------------------------------- xen-pv-cdrom.patch | 8 +- xen-refcnt.patch | 41 - 19 files changed, 395 insertions(+), 2341 deletions(-) create mode 100644 fs-ocfs2.patch delete mode 100644 libvirt-0.7.1.tar.bz2 create mode 100644 libvirt-0.7.2.tar.bz2 delete mode 100644 msg-proc-memleak.patch create mode 100644 selinux-ldflags.patch create mode 100644 virsh-warning.patch delete mode 100644 vshdeinit-recurse.patch delete mode 100644 xen-refcnt.patch diff --git a/clone.patch b/clone.patch index 77a6481..7c92647 100644 --- a/clone.patch +++ b/clone.patch @@ -1,7 +1,7 @@ -Index: src/lxc_container.c +Index: src/lxc/lxc_container.c =================================================================== ---- src/lxc_container.c.orig -+++ src/lxc_container.c +--- src/lxc/lxc_container.c.orig ++++ src/lxc/lxc_container.c @@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de lxc_child_argv_t args = { def, nveths, veths, control, ttyPath }; diff --git a/detach-disk.patch b/detach-disk.patch index d6df91f..834deec 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xend_internal.c -+++ libvirt-0.7.1/src/xend_internal.c -@@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain, +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain, return -1; xenUnifiedLock(priv); xref = xenStoreDomainGetDiskID(domain->conn, domain->id, @@ -11,11 +11,11 @@ Index: libvirt-0.7.1/src/xend_internal.c xenUnifiedUnlock(priv); if (xref == NULL) return -1; -Index: libvirt-0.7.1/src/xs_internal.c +Index: libvirt-0.7.2/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.c -+++ libvirt-0.7.1/src/xs_internal.c -@@ -966,7 +966,8 @@ xenStoreDomainGetNetworkID(virConnectPtr +--- libvirt-0.7.2.orig/src/xen/xs_internal.c ++++ libvirt-0.7.2/src/xen/xs_internal.c +@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr * freed by the caller. */ char * @@ -25,7 +25,7 @@ Index: libvirt-0.7.1/src/xs_internal.c char dir[80], path[128], **list = NULL, *val = NULL; unsigned int devlen, len, i, num; char *ret = NULL; -@@ -984,7 +985,7 @@ xenStoreDomainGetDiskID(virConnectPtr co +@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co if (devlen <= 0) return (NULL); @@ -34,10 +34,10 @@ Index: libvirt-0.7.1/src/xs_internal.c list = xs_directory(priv->xshandle, 0, dir, &num); if (list != NULL) { for (i = 0; i < num; i++) { -Index: libvirt-0.7.1/src/xs_internal.h +Index: libvirt-0.7.2/src/xen/xs_internal.h =================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.h -+++ libvirt-0.7.1/src/xs_internal.h +--- libvirt-0.7.2.orig/src/xen/xs_internal.h ++++ libvirt-0.7.2/src/xen/xs_internal.h @@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo const char *mac); char * xenStoreDomainGetDiskID(virConnectPtr conn, diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch index 6956081..78d9b22 100644 --- a/devmap-no-pkgconfig.patch +++ b/devmap-no-pkgconfig.patch @@ -1,8 +1,8 @@ -diff --git a/configure.in b/configure.in -index cb5ce55..d1711fd 100644 ---- a/configure.in -+++ b/configure.in -@@ -1227,11 +1227,22 @@ if test "$with_storage_mpath" = "yes"; then +Index: libvirt-0.7.2/configure.in +=================================================================== +--- libvirt-0.7.2.orig/configure.in ++++ libvirt-0.7.2/configure.in +@@ -1304,11 +1304,22 @@ if test "$with_storage_mpath" = "yes"; t DEVMAPPER_REQUIRED=0.0 DEVMAPPER_CFLAGS= DEVMAPPER_LIBS= diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch new file mode 100644 index 0000000..95e84c7 --- /dev/null +++ b/fs-ocfs2.patch @@ -0,0 +1,25 @@ +Index: libvirt-0.7.2/src/conf/storage_conf.c +=================================================================== +--- libvirt-0.7.2.orig/src/conf/storage_conf.c ++++ libvirt-0.7.2/src/conf/storage_conf.c +@@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy + VIR_STORAGE_POOL_FS_LAST, + "auto", "ext2", "ext3", + "ext4", "ufs", "iso9660", "udf", +- "gfs", "gfs2", "vfat", "hfs+", "xfs") ++ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2") + + VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, + VIR_STORAGE_POOL_NETFS_LAST, +Index: libvirt-0.7.2/src/conf/storage_conf.h +=================================================================== +--- libvirt-0.7.2.orig/src/conf/storage_conf.h ++++ libvirt-0.7.2/src/conf/storage_conf.h +@@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { + VIR_STORAGE_POOL_FS_VFAT, + VIR_STORAGE_POOL_FS_HFSPLUS, + VIR_STORAGE_POOL_FS_XFS, ++ VIR_STORAGE_POOL_FS_OCFS2, + VIR_STORAGE_POOL_FS_LAST, + }; + VIR_ENUM_DECL(virStoragePoolFormatFileSystem) diff --git a/libvirt-0.7.1.tar.bz2 b/libvirt-0.7.1.tar.bz2 deleted file mode 100644 index 701a7c6..0000000 --- a/libvirt-0.7.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8edde9577fbf0e90d0b33d4b328a79c51cc821c78a4c04b101007c1d6eed1909 -size 5440029 diff --git a/libvirt-0.7.2.tar.bz2 b/libvirt-0.7.2.tar.bz2 new file mode 100644 index 0000000..9e7e304 --- /dev/null +++ b/libvirt-0.7.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311817f34ace89ee44b09a4d4854bbc3a5c0567bf9a8e8a6772c494432f94b33 +size 5563880 diff --git a/libvirt.changes b/libvirt.changes index e2e6164..de22566 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Wed Nov 4 20:53:11 MDT 2009 - jfehlig@novell.com + +- spec file: Fix polkit vs PolicyKit Requires + +------------------------------------------------------------------- +Mon Oct 19 14:13:47 MDT 2009 - jfehlig@novell.com + +- Fix compilation when selinux is enabled + selinux-ldflags.patch +- Fix compilation warnings + updated snapshots.patch + virsh-warning.patch + +------------------------------------------------------------------- +Thu Oct 15 22:26:35 MDT 2009 - jfehlig@novell.com + +- Updated to version 0.7.2 + - sVirt AppArmor security driver + - Add public API definition for data stream handling + - ESX add esxDomainDefineXML() + - LXC: suspend/resume support + - Big code tree cleanup + - Lots of bug fixes and improvements + +------------------------------------------------------------------- +Tue Oct 13 16:28:03 MDT 2009 - jfehlig@novell.com + +- Add ocfs2 to list of supported fs pool types + fate#307387 + ------------------------------------------------------------------- Mon Oct 12 22:39:42 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 3a24ac3..30d4bda 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.1) +# spec file for package libvirt (Version 0.7.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -35,7 +35,7 @@ %endif Name: libvirt -BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd +BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd %if %{with_xen} BuildRequires: xen-devel %endif @@ -64,7 +64,7 @@ Url: http://libvirt.org/ License: LGPL v2.1 or later Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.1 +Version: 0.7.2 Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux Requires: readline @@ -83,7 +83,7 @@ Requires: socat Requires: open-iscsi Requires: nfs-client Requires: hal -%if 0%{?suse_version} > 1100 +%if 0%{?suse_version} > 1110 Requires: polkit >= 0.9 %else Requires: PolicyKit >= 0.6 @@ -92,9 +92,9 @@ Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches Patch0: devmap-no-pkgconfig.patch -Patch1: xen-refcnt.patch -Patch2: vshdeinit-recurse.patch -Patch3: msg-proc-memleak.patch +Patch1: fs-ocfs2.patch +Patch2: selinux-ldflags.patch +Patch3: virsh-warning.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -247,7 +247,6 @@ rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt -rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*} rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a ln_dupes() { @@ -288,12 +287,14 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %{_bindir}/virsh %{_bindir}/virt-xml-validate +%{_bindir}/virt-pki-validate %{_sbindir}/libvirtd %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* +%doc %{_mandir}/man1/virt-pki-validate.1* %{_libdir}/*.so.* %dir %{_libdir}/%{name} %if 0%{?suse_version} > 1030 @@ -306,6 +307,9 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart +%if %{with_lxc} +%config %{_sysconfdir}/libvirt/lxc.conf +%endif %config %{_sysconfdir}/libvirt/qemu/networks/default.xml %config %{_sysconfdir}/logrotate.d/libvirtd %dir /%{_localstatedir}/run/libvirt/ @@ -332,7 +336,6 @@ rm -rf $RPM_BUILD_ROOT %files doc %defattr(-, root, root) %{_datadir}/gtk-doc/html/libvirt -%doc %{_docdir}/%{name}/*.gif %doc %{_docdir}/%{name}/*.png %doc %{_docdir}/%{name}/*.html %doc %{_docdir}/%{name}/html diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index f0d484d..ac89e2a 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.1/qemud/libvirtd.conf +Index: libvirt-0.7.2/daemon/libvirtd.conf =================================================================== ---- libvirt-0.7.1.orig/qemud/libvirtd.conf -+++ libvirt-0.7.1/qemud/libvirtd.conf +--- libvirt-0.7.2.orig/daemon/libvirtd.conf ++++ libvirt-0.7.2/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.7.1/qemud/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.1/qemud/qemud.c +Index: libvirt-0.7.2/daemon/libvirtd.c =================================================================== ---- libvirt-0.7.1.orig/qemud/qemud.c -+++ libvirt-0.7.1/qemud/qemud.c -@@ -134,7 +134,7 @@ static int sigwrite = -1; /* Signa +--- libvirt-0.7.2.orig/daemon/libvirtd.c ++++ libvirt-0.7.2/daemon/libvirtd.c +@@ -135,7 +135,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ /* Defaults for configuration file elements */ @@ -41,7 +41,7 @@ Index: libvirt-0.7.1/qemud/qemud.c static int listen_tcp = 0; static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR; static char *tls_port = (char *) LIBVIRTD_TLS_PORT; -@@ -156,7 +156,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; +@@ -157,7 +157,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; #endif static int auth_tls = REMOTE_AUTH_NONE; diff --git a/migrate-params.patch b/migrate-params.patch index c619f6a..fbcf3d9 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.6.5/src/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.6.5.orig/src/xend_internal.c -+++ libvirt-0.6.5/src/xend_internal.c -@@ -4480,6 +4480,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -4491,6 +4491,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/msg-proc-memleak.patch b/msg-proc-memleak.patch deleted file mode 100644 index cd40f75..0000000 --- a/msg-proc-memleak.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: libvirt-0.7.1/qemud/dispatch.c -=================================================================== ---- libvirt-0.7.1.orig/qemud/dispatch.c -+++ libvirt-0.7.1/qemud/dispatch.c -@@ -191,6 +191,7 @@ remoteSerializeError(struct qemud_client - - xdr_error: - xdr_destroy(&xdr); -+ VIR_FREE(msg); - fatal_error: - xdr_free((xdrproc_t)xdr_remote_error, (char *)rerr); - return -1; -@@ -336,6 +337,7 @@ remoteDispatchClientRequest (struct qemu - struct qemud_client *client, - struct qemud_client_message *msg) - { -+ int ret; - remote_error rerr; - - memset(&rerr, 0, sizeof rerr); -@@ -364,7 +366,12 @@ remoteDispatchClientRequest (struct qemu - } - - error: -- return remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ ret = remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ -+ if (ret >= 0) -+ VIR_FREE(msg); -+ -+ return ret; - } - - -@@ -521,8 +528,12 @@ remoteDispatchClientCall (struct qemud_s - rpc_error: - /* Semi-bad stuff happened, we can still try to send back - * an RPC error message to client */ -- return remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ rv = remoteSerializeReplyError(client, &rerr, &msg->hdr); -+ -+ if (rv >= 0) -+ VIR_FREE(msg); - -+ return rv; - - xdr_error: - /* Seriously bad stuff happened, so we'll kill off this client diff --git a/selinux-ldflags.patch b/selinux-ldflags.patch new file mode 100644 index 0000000..7b92fce --- /dev/null +++ b/selinux-ldflags.patch @@ -0,0 +1,13 @@ +Index: libvirt-0.7.2/src/Makefile.am +=================================================================== +--- libvirt-0.7.2.orig/src/Makefile.am ++++ libvirt-0.7.2/src/Makefile.am +@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \ + libvirt_driver_security_la_LDFLAGS = + if WITH_SECDRIVER_SELINUX + libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) ++libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) ++libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) + endif + if WITH_SECDRIVER_APPARMOR + libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) diff --git a/snapshots.patch b/snapshots.patch index d4a32f6..a00c62e 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/include/libvirt/libvirt.h.in +Index: libvirt-0.7.2/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.1.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.1/include/libvirt/libvirt.h.in -@@ -537,6 +537,21 @@ int virDomainRestore +--- libvirt-0.7.2.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.2/include/libvirt/libvirt.h.in +@@ -561,6 +561,21 @@ int virDomainRestore const char *from); /* @@ -24,16 +24,14 @@ Index: libvirt-0.7.1/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.1/src/libvirt.c +Index: libvirt-0.7.2/src/libvirt.c =================================================================== ---- libvirt-0.7.1.orig/src/libvirt.c -+++ libvirt-0.7.1/src/libvirt.c -@@ -2245,6 +2245,168 @@ error: - return -1; +--- libvirt-0.7.2.orig/src/libvirt.c ++++ libvirt-0.7.2/src/libvirt.c +@@ -2234,6 +2234,166 @@ error: } -+ -+/** + /** + * virDomainSnapshotCreate: + * @domain: a domain object + * @name: name for the new snapshot @@ -193,15 +191,15 @@ Index: libvirt-0.7.1/src/libvirt.c + return -1; +} + -+ - /** ++/** * virDomainCoreDump: * @domain: a domain object -Index: libvirt-0.7.1/src/driver.h + * @to: path for the core file +Index: libvirt-0.7.2/src/driver.h =================================================================== ---- libvirt-0.7.1.orig/src/driver.h -+++ libvirt-0.7.1/src/driver.h -@@ -152,6 +152,21 @@ typedef int +--- libvirt-0.7.2.orig/src/driver.h ++++ libvirt-0.7.2/src/driver.h +@@ -133,6 +133,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); typedef int @@ -223,10 +221,10 @@ Index: libvirt-0.7.1/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -427,6 +442,11 @@ struct _virDriver { - virDrvNodeDeviceDettach nodeDeviceDettach; +@@ -418,6 +433,11 @@ struct _virDriver { virDrvNodeDeviceReAttach nodeDeviceReAttach; virDrvNodeDeviceReset nodeDeviceReset; + virDrvDomainMigratePrepareTunnel domainMigratePrepareTunnel; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -235,11 +233,11 @@ Index: libvirt-0.7.1/src/driver.h }; typedef int -Index: libvirt-0.7.1/src/xen_unified.c +Index: libvirt-0.7.2/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/xen_unified.c -+++ libvirt-0.7.1/src/xen_unified.c -@@ -952,6 +952,81 @@ xenUnifiedDomainRestore (virConnectPtr c +--- libvirt-0.7.2.orig/src/xen/xen_driver.c ++++ libvirt-0.7.2/src/xen/xen_driver.c +@@ -955,6 +955,81 @@ xenUnifiedDomainRestore (virConnectPtr c } static int @@ -321,10 +319,10 @@ Index: libvirt-0.7.1/src/xen_unified.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1722,6 +1797,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedNodeDeviceDettach, /* nodeDeviceDettach */ +@@ -1726,6 +1801,11 @@ static virDriver xenUnifiedDriver = { xenUnifiedNodeDeviceReAttach, /* nodeDeviceReAttach */ xenUnifiedNodeDeviceReset, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + xenUnifiedDomainSnapshotCreate, + xenUnifiedDomainSnapshotApply, + xenUnifiedDomainSnapshotDelete, @@ -333,10 +331,10 @@ Index: libvirt-0.7.1/src/xen_unified.c }; /** -Index: libvirt-0.7.1/src/xen_unified.h +Index: libvirt-0.7.2/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.1.orig/src/xen_unified.h -+++ libvirt-0.7.1/src/xen_unified.h +--- libvirt-0.7.2.orig/src/xen/xen_driver.h ++++ libvirt-0.7.2/src/xen/xen_driver.h @@ -98,6 +98,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; @@ -349,10 +347,10 @@ Index: libvirt-0.7.1/src/xen_unified.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.1/src/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xend_internal.c -+++ libvirt-0.7.1/src/xend_internal.c +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -366,7 +364,7 @@ Index: libvirt-0.7.1/src/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3248,6 +3254,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3257,6 +3263,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -454,7 +452,7 @@ Index: libvirt-0.7.1/src/xend_internal.c #endif /* !PROXY */ /** -@@ -5064,6 +5151,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5082,6 +5169,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -466,10 +464,10 @@ Index: libvirt-0.7.1/src/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.1/src/proxy_internal.c +Index: libvirt-0.7.2/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/proxy_internal.c -+++ libvirt-0.7.1/src/proxy_internal.c +--- libvirt-0.7.2.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.2/src/xen/proxy_internal.c @@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -482,11 +480,11 @@ Index: libvirt-0.7.1/src/proxy_internal.c }; -Index: libvirt-0.7.1/src/xen_internal.c +Index: libvirt-0.7.2/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.1.orig/src/xen_internal.c -+++ libvirt-0.7.1/src/xen_internal.c -@@ -741,6 +741,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.2/src/xen/xen_hypervisor.c +@@ -742,6 +742,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -498,10 +496,10 @@ Index: libvirt-0.7.1/src/xen_internal.c }; #endif /* !PROXY */ -Index: libvirt-0.7.1/src/xm_internal.c +Index: libvirt-0.7.2/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xm_internal.c -+++ libvirt-0.7.1/src/xm_internal.c +--- libvirt-0.7.2.orig/src/xen/xm_internal.c ++++ libvirt-0.7.2/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -514,10 +512,10 @@ Index: libvirt-0.7.1/src/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.1/src/xs_internal.c +Index: libvirt-0.7.2/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.c -+++ libvirt-0.7.1/src/xs_internal.c +--- libvirt-0.7.2.orig/src/xen/xs_internal.c ++++ libvirt-0.7.2/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -530,16 +528,14 @@ Index: libvirt-0.7.1/src/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.1/src/virsh.c +Index: libvirt-0.7.2/tools/virsh.c =================================================================== ---- libvirt-0.7.1.orig/src/virsh.c -+++ libvirt-0.7.1/src/virsh.c -@@ -1167,6 +1167,189 @@ cmdSave(vshControl *ctl, const vshCmd *c - return ret; +--- libvirt-0.7.2.orig/tools/virsh.c ++++ libvirt-0.7.2/tools/virsh.c +@@ -1168,6 +1168,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } -+ -+/* + /* + * "snapshot-create" command + */ +static vshCmdInfo info_snapshot_create[] = { @@ -575,8 +571,8 @@ Index: libvirt-0.7.1/src/virsh.c + if (virDomainSnapshotCreate(dom, name) == 0) { + vshPrint(ctl, _("Snapshot %s created for domain %s\n"), name, domain); + } else { -+ vshError(ctl, FALSE, _("Failed to create snapshot %s for domain %s"), -+ name, domain); ++ vshError(ctl, _("Failed to create snapshot %s for domain %s"), ++ name, domain); + ret = FALSE; + } + @@ -621,8 +617,8 @@ Index: libvirt-0.7.1/src/virsh.c + vshPrint(ctl, _("Domain %s started using snapshot %s\n"), + domain, name); + } else { -+ vshError(ctl, FALSE, _("Failed to start domain %s using snapshot %s"), -+ domain, name); ++ vshError(ctl, _("Failed to start domain %s using snapshot %s"), ++ domain, name); + ret = FALSE; + } + @@ -666,8 +662,8 @@ Index: libvirt-0.7.1/src/virsh.c + if (virDomainSnapshotDelete(dom, name) == 0) { + vshPrint(ctl, _("Snapshot %s deleted from domain %s\n"), name, domain); + } else { -+ vshError(ctl, FALSE, _("Failed to delete snapshot %s from domain %s"), -+ name, domain); ++ vshError(ctl, _("Failed to delete snapshot %s from domain %s"), ++ name, domain); + ret = FALSE; + } + @@ -721,10 +717,11 @@ Index: libvirt-0.7.1/src/virsh.c + return ret; +} + - /* ++/* * "schedinfo" command */ -@@ -7252,6 +7435,12 @@ static const vshCmdDef commands[] = { + static const vshCmdInfo info_schedinfo[] = { +@@ -7273,6 +7455,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -737,14 +734,14 @@ Index: libvirt-0.7.1/src/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.1/src/lxc_driver.c +Index: libvirt-0.7.2/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/lxc_driver.c -+++ libvirt-0.7.1/src/lxc_driver.c -@@ -1931,6 +1931,11 @@ static virDriver lxcDriver = { - NULL, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.2/src/lxc/lxc_driver.c +@@ -2324,6 +2324,11 @@ static virDriver lxcDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -753,14 +750,14 @@ Index: libvirt-0.7.1/src/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.1/src/openvz_driver.c +Index: libvirt-0.7.2/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/openvz_driver.c -+++ libvirt-0.7.1/src/openvz_driver.c -@@ -1392,6 +1392,11 @@ static virDriver openvzDriver = { - NULL, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.2/src/openvz/openvz_driver.c +@@ -1433,6 +1433,11 @@ static virDriver openvzDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -769,14 +766,14 @@ Index: libvirt-0.7.1/src/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.1/src/qemu_driver.c +Index: libvirt-0.7.2/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/qemu_driver.c -+++ libvirt-0.7.1/src/qemu_driver.c -@@ -7576,6 +7576,11 @@ static virDriver qemuDriver = { - qemudNodeDeviceDettach, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.2/src/qemu/qemu_driver.c +@@ -7136,6 +7136,11 @@ static virDriver qemuDriver = { qemudNodeDeviceReAttach, /* nodeDeviceReAttach */ qemudNodeDeviceReset, /* nodeDeviceReset */ + qemudDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -785,14 +782,30 @@ Index: libvirt-0.7.1/src/qemu_driver.c }; -Index: libvirt-0.7.1/src/test.c +Index: libvirt-0.7.2/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/test.c -+++ libvirt-0.7.1/src/test.c -@@ -4257,6 +4257,11 @@ static virDriver testDriver = { - NULL, /* nodeDeviceDettach */ +--- libvirt-0.7.2.orig/src/esx/esx_driver.c ++++ libvirt-0.7.2/src/esx/esx_driver.c +@@ -3275,6 +3275,11 @@ static virDriver esxDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + +Index: libvirt-0.7.2/src/test/test_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/test/test_driver.c ++++ libvirt-0.7.2/src/test/test_driver.c +@@ -4558,6 +4558,11 @@ static virDriver testDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -801,23 +814,103 @@ Index: libvirt-0.7.1/src/test.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.1/docs/libvirt-api.xml +Index: libvirt-0.7.2/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.1.orig/docs/libvirt-api.xml -+++ libvirt-0.7.1/docs/libvirt-api.xml -@@ -208,6 +208,11 @@ - - +--- libvirt-0.7.2.orig/src/uml/uml_driver.c ++++ libvirt-0.7.2/src/uml/uml_driver.c +@@ -1862,6 +1862,11 @@ static virDriver umlDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + +Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c +=================================================================== +--- libvirt-0.7.2.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.2/src/vbox/vbox_tmpl.c +@@ -6468,6 +6468,11 @@ virDriver NAME(Driver) = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + virNetworkDriver NAME(NetworkDriver) = { +Index: libvirt-0.7.2/src/opennebula/one_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.2/src/opennebula/one_driver.c +@@ -788,6 +788,11 @@ static virDriver oneDriver = { + NULL, /* nodeDeviceReAttach; */ + NULL, /* nodeDeviceReset; */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + static virStateDriver oneStateDriver = { +Index: libvirt-0.7.2/src/phyp/phyp_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.2/src/phyp/phyp_driver.c +@@ -1378,6 +1378,11 @@ virDriver phypDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + int +Index: libvirt-0.7.2/src/remote/remote_driver.c +=================================================================== +--- libvirt-0.7.2.orig/src/remote/remote_driver.c ++++ libvirt-0.7.2/src/remote/remote_driver.c +@@ -8466,6 +8466,11 @@ static virDriver remote_driver = { + remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ + remoteNodeDeviceReset, /* nodeDeviceReset */ + remoteDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; + + static virNetworkDriver network_driver = { +Index: libvirt-0.7.2/docs/libvirt-api.xml +=================================================================== +--- libvirt-0.7.2.orig/docs/libvirt-api.xml ++++ libvirt-0.7.2/docs/libvirt-api.xml +@@ -262,6 +262,11 @@ + + + + + + + - - - -@@ -1432,6 +1437,36 @@ see note above'/> + + + +@@ -1817,6 +1822,36 @@ This function may requires privileged ac @@ -852,187 +945,41 @@ Index: libvirt-0.7.1/docs/libvirt-api.xml + + - Undefine a domain but does not stop it if it is running + -Index: libvirt-0.7.1/python/libvirt-py.c +Index: libvirt-0.7.2/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.1.orig/python/libvirt-py.c -+++ libvirt-0.7.1/python/libvirt-py.c -@@ -25,6 +25,25 @@ LIBVIRT_END_ALLOW_THREADS; - } +--- libvirt-0.7.2.orig/src/libvirt_public.syms ++++ libvirt-0.7.2/src/libvirt_public.syms +@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { + LIBVIRT_0.4.5 { + global: + virConnectFindStoragePoolSources; ++ virDomainSnapshotCreate; ++ virDomainSnapshotApply; ++ virDomainSnapshotDelete; ++ virDomainNumOfSnapshots; ++ virDomainListSnapshots; + } LIBVIRT_0.4.2; - PyObject * -+libvirt_virDomainSnapshotDelete(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ char * name; -+ -+ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotDelete", &pyobj_domain, &name)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainSnapshotDelete(domain, name); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); -+} -+ -+PyObject * - libvirt_virStorageVolGetKey(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - const char * c_retval; -@@ -1151,6 +1170,25 @@ LIBVIRT_END_ALLOW_THREADS; - } - - PyObject * -+libvirt_virDomainSnapshotCreate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ char * name; -+ -+ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotCreate", &pyobj_domain, &name)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainSnapshotCreate(domain, name); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); -+} -+ -+PyObject * - libvirt_virNetworkDefineXML(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - virNetworkPtr c_retval; -@@ -1186,6 +1224,24 @@ LIBVIRT_END_ALLOW_THREADS; - } - - PyObject * -+libvirt_virDomainNumOfSnapshots(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ -+ if (!PyArg_ParseTuple(args, (char *)"O:virDomainNumOfSnapshots", &pyobj_domain)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainNumOfSnapshots(domain); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); -+} -+ -+PyObject * - libvirt_virDomainResume(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - int c_retval; -@@ -1201,6 +1257,25 @@ LIBVIRT_BEGIN_ALLOW_THREADS; - LIBVIRT_END_ALLOW_THREADS; - py_retval = libvirt_intWrap((int) c_retval); - return(py_retval); -+} -+ -+PyObject * -+libvirt_virDomainSnapshotApply(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ char * name; -+ -+ if (!PyArg_ParseTuple(args, (char *)"Oz:virDomainSnapshotApply", &pyobj_domain, &name)) -+ return(NULL); -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+LIBVIRT_BEGIN_ALLOW_THREADS; -+ -+ c_retval = virDomainSnapshotApply(domain, name); -+LIBVIRT_END_ALLOW_THREADS; -+ py_retval = libvirt_intWrap((int) c_retval); -+ return(py_retval); - } - - PyObject * -Index: libvirt-0.7.1/python/libvirt-py.h + LIBVIRT_0.5.0 { +Index: libvirt-0.7.2/python/generator.py =================================================================== ---- libvirt-0.7.1.orig/python/libvirt-py.h -+++ libvirt-0.7.1/python/libvirt-py.h -@@ -1,6 +1,7 @@ - /* Generated */ - - PyObject * libvirt_virStoragePoolGetXMLDesc(PyObject *self, PyObject *args); -+PyObject * libvirt_virDomainSnapshotDelete(PyObject *self, PyObject *args); - PyObject * libvirt_virStorageVolGetKey(PyObject *self, PyObject *args); - PyObject * libvirt_virDomainUndefine(PyObject *self, PyObject *args); - PyObject * libvirt_virDomainDefineXML(PyObject *self, PyObject *args); -Index: libvirt-0.7.1/python/libvirt.py +--- libvirt-0.7.2.orig/python/generator.py ++++ libvirt-0.7.2/python/generator.py +@@ -286,6 +286,7 @@ skip_impl = ( + 'virDomainSetSchedulerParameters', + 'virDomainGetVcpus', + 'virDomainPinVcpu', ++ 'virDomainListSnapshots', + 'virSecretGetValue', + 'virSecretSetValue', + 'virSecretGetUUID', +Index: libvirt-0.7.2/python/libvirt-override.c =================================================================== ---- libvirt-0.7.1.orig/python/libvirt.py -+++ libvirt-0.7.1/python/libvirt.py -@@ -390,6 +390,12 @@ class virDomain: - ret = libvirtmod.virDomainGetName(self._o) - return ret - -+ def numOfSnapshots(self): -+ """Returns the number of snapshot a given domain has """ -+ ret = libvirtmod.virDomainNumOfSnapshots(self._o) -+ if ret == -1: raise libvirtError ('virDomainNumOfSnapshots() failed', dom=self) -+ return ret -+ - def reboot(self, flags): - """Reboot a domain, the domain object is still usable there - after but the domain OS is being stopped for a restart. -@@ -478,6 +484,24 @@ class virDomain: - if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self) - return ret - -+ def snapshotApply(self, name): -+ """Start a shut off domain based on a previously taken snapshot """ -+ ret = libvirtmod.virDomainSnapshotApply(self._o, name) -+ if ret == -1: raise libvirtError ('virDomainSnapshotApply() failed', dom=self) -+ return ret -+ -+ def snapshotCreate(self, name): -+ """Create a snapshot from a running domain """ -+ ret = libvirtmod.virDomainSnapshotCreate(self._o, name) -+ if ret == -1: raise libvirtError ('virDomainSnapshotCreate() failed', dom=self) -+ return ret -+ -+ def snapshotDelete(self, name): -+ """Delete a snapshot from a domain """ -+ ret = libvirtmod.virDomainSnapshotDelete(self._o, name) -+ if ret == -1: raise libvirtError ('virDomainSnapshotDelete() failed', dom=self) -+ return ret -+ - def suspend(self): - """Suspends an active domain, the process is frozen without - further access to CPU resources and I/O but the memory used -@@ -536,6 +560,12 @@ class virDomain: - if ret is None: raise libvirtError ('virDomainInterfaceStats() failed', dom=self) - return ret - -+ def listSnapshots(self): -+ """Returns the names of the snapshots of a domain """ -+ ret = libvirtmod.virDomainListSnapshots(self._o) -+ if ret is None: raise libvirtError ('virDomainListSnapshots() failed', dom=self) -+ return ret -+ - def pinVcpu(self, vcpu, cpumap): - """Dynamically change the real CPUs which can be allocated to - a virtual CPU. This function requires privileged access to -Index: libvirt-0.7.1/python/libvir.c -=================================================================== ---- libvirt-0.7.1.orig/python/libvir.c -+++ libvirt-0.7.1/python/libvir.c -@@ -1375,6 +1375,35 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.2.orig/python/libvirt-override.c ++++ libvirt-0.7.2/python/libvirt-override.c +@@ -1375,6 +1375,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1064,22 +1011,21 @@ Index: libvirt-0.7.1/python/libvir.c + + return(py_retval); +} -+ static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2420,6 +2449,7 @@ static PyMethodDef libvirtMethods[] = { - {(char *) "virDomainSetSchedulerParameters", libvirt_virDomainSetSchedulerParameters, METH_VARARGS, NULL}, - {(char *) "virDomainGetVcpus", libvirt_virDomainGetVcpus, METH_VARARGS, NULL}, - {(char *) "virDomainPinVcpu", libvirt_virDomainPinVcpu, METH_VARARGS, NULL}, -+ {(char *) "virDomainListSnapshots", libvirt_virDomainListSnapshots, METH_VARARGS, NULL}, - {(char *) "virConnectListStoragePools", libvirt_virConnectListStoragePools, METH_VARARGS, NULL}, - {(char *) "virConnectListDefinedStoragePools", libvirt_virConnectListDefinedStoragePools, METH_VARARGS, NULL}, +@@ -2425,6 +2453,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, -Index: libvirt-0.7.1/python/libvirt-python-api.xml + {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, ++ {(char *) "virDomainListSnapshots", libvirt_virDomainListSnapshots, METH_VARARGS, NULL}, + {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, + {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, +Index: libvirt-0.7.2/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.1.orig/python/libvirt-python-api.xml -+++ libvirt-0.7.1/python/libvirt-python-api.xml +--- libvirt-0.7.2.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.2/python/libvirt-override-api.xml @@ -135,6 +135,11 @@ @@ -1092,31 +1038,19 @@ Index: libvirt-0.7.1/python/libvirt-python-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.1/python/generator.py +Index: libvirt-0.7.2/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.1.orig/python/generator.py -+++ libvirt-0.7.1/python/generator.py -@@ -326,6 +326,7 @@ skip_impl = ( - 'virDomainSetSchedulerParameters', - 'virDomainGetVcpus', - 'virDomainPinVcpu', -+ 'virDomainListSnapshots', - 'virSecretGetValue', - 'virSecretSetValue', - 'virSecretGetUUID', -Index: libvirt-0.7.1/src/libvirt_public.syms -=================================================================== ---- libvirt-0.7.1.orig/src/libvirt_public.syms -+++ libvirt-0.7.1/src/libvirt_public.syms -@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { - LIBVIRT_0.4.5 { - global: - virConnectFindStoragePoolSources; -+ virDomainSnapshotCreate; -+ virDomainSnapshotApply; -+ virDomainSnapshotDelete; -+ virDomainNumOfSnapshots; -+ virDomainListSnapshots; - } LIBVIRT_0.4.2; +--- libvirt-0.7.2.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.2/src/xen/xen_inotify.c +@@ -88,6 +88,11 @@ struct xenUnifiedDriver xenInotifyDriver + NULL, /* domainGetSchedulerType */ + NULL, /* domainGetSchedulerParameters */ + NULL, /* domainSetSchedulerParameters */ ++ NULL, /* domainSnapshotCreate */ ++ NULL, /* domainSnapshotApply */ ++ NULL, /* domainSnapshotDelete */ ++ NULL, /* domainNumOfSnapshots */ ++ NULL, /* domainListSnapshots */ + }; - LIBVIRT_0.5.0 { + static int diff --git a/socat.patch b/socat.patch index 95e5213..de709b7 100644 --- a/socat.patch +++ b/socat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/remote_internal.c +Index: libvirt-0.7.2/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/remote_internal.c -+++ libvirt-0.7.1/src/remote_internal.c -@@ -728,12 +728,29 @@ doRemoteOpen (virConnectPtr conn, +--- libvirt-0.7.2.orig/src/remote/remote_driver.c ++++ libvirt-0.7.2/src/remote/remote_driver.c +@@ -760,12 +760,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } cmd_argv[j++] = strdup (priv->hostname); diff --git a/suse-network.patch b/suse-network.patch index 4bea8eb..9e9767f 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/network_conf.c +Index: libvirt-0.7.2/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.1.orig/src/network_conf.c -+++ libvirt-0.7.1/src/network_conf.c -@@ -770,6 +770,137 @@ error: +--- libvirt-0.7.2.orig/src/conf/network_conf.c ++++ libvirt-0.7.2/src/conf/network_conf.c +@@ -824,6 +824,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.1/src/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -809,6 +940,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -863,6 +994,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,11 +148,11 @@ Index: libvirt-0.7.1/src/network_conf.c return 0; } -Index: libvirt-0.7.1/src/network_conf.h +Index: libvirt-0.7.2/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.1.orig/src/network_conf.h -+++ libvirt-0.7.1/src/network_conf.h -@@ -89,6 +89,7 @@ struct _virNetworkObj { +--- libvirt-0.7.2.orig/src/conf/network_conf.h ++++ libvirt-0.7.2/src/conf/network_conf.h +@@ -92,6 +92,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; unsigned int persistent : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.1/src/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.1/src/network_driver.c +Index: libvirt-0.7.2/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.1.orig/src/network_driver.c -+++ libvirt-0.7.1/src/network_driver.c -@@ -963,6 +963,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.2.orig/src/network/bridge_driver.c ++++ libvirt-0.7.2/src/network/bridge_driver.c +@@ -977,6 +977,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.1/src/network_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1419,6 +1424,12 @@ static int networkSetAutostart(virNetwor +@@ -1433,6 +1438,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/virsh-warning.patch b/virsh-warning.patch new file mode 100644 index 0000000..69da082 --- /dev/null +++ b/virsh-warning.patch @@ -0,0 +1,19 @@ +commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 +Author: Jim Fehlig +Date: Mon Oct 19 13:53:40 2009 -0600 + + Remove extra arg in call to vshError() + +Index: libvirt-0.7.2/tools/virsh.c +=================================================================== +--- libvirt-0.7.2.orig/tools/virsh.c ++++ libvirt-0.7.2/tools/virsh.c +@@ -2510,7 +2510,7 @@ cmdMigrate (vshControl *ctl, const vshCm + * a libvirt URI, or a hypervisor specific URI. */ + + if (migrateuri != NULL) { +- vshError(ctl, FALSE, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); ++ vshError(ctl, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); + goto done; + } + diff --git a/vshdeinit-recurse.patch b/vshdeinit-recurse.patch deleted file mode 100644 index b8e7244..0000000 --- a/vshdeinit-recurse.patch +++ /dev/null @@ -1,1882 +0,0 @@ -Index: libvirt-0.7.1/src/virsh.c -=================================================================== ---- libvirt-0.7.1.orig/src/virsh.c -+++ libvirt-0.7.1/src/virsh.c -@@ -202,8 +202,8 @@ typedef struct __vshControl { - - static const vshCmdDef commands[]; - --static void vshError(vshControl *ctl, int doexit, const char *format, ...) -- ATTRIBUTE_FMT_PRINTF(3, 4); -+static void vshError(vshControl *ctl, const char *format, ...) -+ ATTRIBUTE_FMT_PRINTF(2, 3); - static int vshInit(vshControl *ctl); - static int vshDeinit(vshControl *ctl); - static void vshUsage(void); -@@ -351,11 +351,11 @@ virshReportError(vshControl *ctl) - return; - - if (last_error->code == VIR_ERR_OK) { -- vshError(ctl, FALSE, "%s", _("unknown error")); -+ vshError(ctl, "%s", _("unknown error")); - goto out; - } - -- vshError(ctl, FALSE, "%s", last_error->message); -+ vshError(ctl, "%s", last_error->message); - - out: - virFreeError(last_error); -@@ -433,11 +433,9 @@ cmdAutostart(vshControl *ctl, const vshC - - if (virDomainSetAutostart(dom, autostart) < 0) { - if (autostart) -- vshError(ctl, FALSE, _("Failed to mark domain %s as autostarted"), -- name); -+ vshError(ctl, _("Failed to mark domain %s as autostarted"), name); - else -- vshError(ctl, FALSE, _("Failed to unmark domain %s as autostarted"), -- name); -+ vshError(ctl, _("Failed to unmark domain %s as autostarted"), name); - virDomainFree(dom); - return FALSE; - } -@@ -474,8 +472,7 @@ cmdConnect(vshControl *ctl, const vshCmd - - if (ctl->conn) { - if (virConnectClose(ctl->conn) != 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to disconnect from the hypervisor")); -+ vshError(ctl, "%s", _("Failed to disconnect from the hypervisor")); - return FALSE; - } - ctl->conn = NULL; -@@ -494,7 +491,7 @@ cmdConnect(vshControl *ctl, const vshCmd - ctl->readonly ? VIR_CONNECT_RO : 0); - - if (!ctl->conn) -- vshError(ctl, FALSE, "%s", _("Failed to connect to the hypervisor")); -+ vshError(ctl, "%s", _("Failed to connect to the hypervisor")); - - return ctl->conn ? TRUE : FALSE; - } -@@ -528,17 +525,17 @@ cmdRunConsole(vshControl *ctl, virDomain - char *thisHost = NULL; - - if (!(thisHost = virGetHostname())) { -- vshError(ctl, FALSE, "%s", _("Failed to get local hostname")); -+ vshError(ctl, "%s", _("Failed to get local hostname")); - goto cleanup; - } - - if (!(thatHost = virConnectGetHostname(ctl->conn))) { -- vshError(ctl, FALSE, "%s", _("Failed to get connection hostname")); -+ vshError(ctl, "%s", _("Failed to get connection hostname")); - goto cleanup; - } - - if (STRNEQ(thisHost, thatHost)) { -- vshError(ctl, FALSE, "%s", _("Cannot connect to a remote console device")); -+ vshError(ctl, "%s", _("Cannot connect to a remote console device")); - goto cleanup; - } - -@@ -632,14 +629,14 @@ cmdList(vshControl *ctl, const vshCmd *c - if (active) { - maxid = virConnectNumOfDomains(ctl->conn); - if (maxid < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active domains")); -+ vshError(ctl, "%s", _("Failed to list active domains")); - return FALSE; - } - if (maxid) { - ids = vshMalloc(ctl, sizeof(int) * maxid); - - if ((maxid = virConnectListDomains(ctl->conn, &ids[0], maxid)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active domains")); -+ vshError(ctl, "%s", _("Failed to list active domains")); - free(ids); - return FALSE; - } -@@ -650,7 +647,7 @@ cmdList(vshControl *ctl, const vshCmd *c - if (inactive) { - maxname = virConnectNumOfDefinedDomains(ctl->conn); - if (maxname < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive domains")); -+ vshError(ctl, "%s", _("Failed to list inactive domains")); - free(ids); - return FALSE; - } -@@ -658,7 +655,7 @@ cmdList(vshControl *ctl, const vshCmd *c - names = vshMalloc(ctl, sizeof(char *) * maxname); - - if ((maxname = virConnectListDefinedDomains(ctl->conn, names, maxname)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive domains")); -+ vshError(ctl, "%s", _("Failed to list inactive domains")); - free(ids); - free(names); - return FALSE; -@@ -786,8 +783,7 @@ cmdDomblkstat (vshControl *ctl, const vs - } - - if (virDomainBlockStats (dom, device, &stats, sizeof stats) == -1) { -- vshError (ctl, FALSE, _("Failed to get block stats %s %s"), -- name, device); -+ vshError(ctl, _("Failed to get block stats %s %s"), name, device); - virDomainFree(dom); - return FALSE; - } -@@ -844,8 +840,7 @@ cmdDomIfstat (vshControl *ctl, const vsh - } - - if (virDomainInterfaceStats (dom, device, &stats, sizeof stats) == -1) { -- vshError (ctl, FALSE, _("Failed to get interface stats %s %s"), -- name, device); -+ vshError(ctl, _("Failed to get interface stats %s %s"), name, device); - virDomainFree(dom); - return FALSE; - } -@@ -908,7 +903,7 @@ cmdSuspend(vshControl *ctl, const vshCmd - if (virDomainSuspend(dom) == 0) { - vshPrint(ctl, _("Domain %s suspended\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to suspend domain %s"), name); -+ vshError(ctl, _("Failed to suspend domain %s"), name); - ret = FALSE; - } - -@@ -967,7 +962,7 @@ cmdCreate(vshControl *ctl, const vshCmd - #endif - virDomainFree(dom); - } else { -- vshError(ctl, FALSE, _("Failed to create domain from %s"), from); -+ vshError(ctl, _("Failed to create domain from %s"), from); - ret = FALSE; - } - return ret; -@@ -1014,7 +1009,7 @@ cmdDefine(vshControl *ctl, const vshCmd - virDomainGetName(dom), from); - virDomainFree(dom); - } else { -- vshError(ctl, FALSE, _("Failed to define domain from %s"), from); -+ vshError(ctl, _("Failed to define domain from %s"), from); - ret = FALSE; - } - return ret; -@@ -1052,9 +1047,11 @@ cmdUndefine(vshControl *ctl, const vshCm - - if (name && virStrToLong_i(name, NULL, 10, &id) == 0 - && id >= 0 && (dom = virDomainLookupByID(ctl->conn, id))) { -- vshError(ctl, FALSE, _("a running domain like %s cannot be undefined;\n" -- "to undefine, first shutdown then undefine" -- " using its name or UUID"), name); -+ vshError(ctl, -+ _("a running domain like %s cannot be undefined;\n" -+ "to undefine, first shutdown then undefine" -+ " using its name or UUID"), -+ name); - virDomainFree(dom); - return FALSE; - } -@@ -1065,7 +1062,7 @@ cmdUndefine(vshControl *ctl, const vshCm - if (virDomainUndefine(dom) == 0) { - vshPrint(ctl, _("Domain %s has been undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine domain %s"), name); -+ vshError(ctl, _("Failed to undefine domain %s"), name); - ret = FALSE; - } - -@@ -1107,7 +1104,7 @@ cmdStart(vshControl *ctl, const vshCmd * - return FALSE; - - if (virDomainGetID(dom) != (unsigned int)-1) { -- vshError(ctl, FALSE, "%s", _("Domain is already active")); -+ vshError(ctl, "%s", _("Domain is already active")); - virDomainFree(dom); - return FALSE; - } -@@ -1120,8 +1117,7 @@ cmdStart(vshControl *ctl, const vshCmd * - cmdRunConsole(ctl, dom); - #endif - } else { -- vshError(ctl, FALSE, _("Failed to start domain %s"), -- virDomainGetName(dom)); -+ vshError(ctl, _("Failed to start domain %s"), virDomainGetName(dom)); - ret = FALSE; - } - virDomainFree(dom); -@@ -1163,7 +1159,7 @@ cmdSave(vshControl *ctl, const vshCmd *c - if (virDomainSave(dom, to) == 0) { - vshPrint(ctl, _("Domain %s saved to %s\n"), name, to); - } else { -- vshError(ctl, FALSE, _("Failed to save domain %s to %s"), name, to); -+ vshError(ctl, _("Failed to save domain %s to %s"), name, to); - ret = FALSE; - } - -@@ -1202,7 +1198,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - int val; - val = vshCommandOptInt(cmd, "weight", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("Invalid value of weight")); -+ vshError(ctl, "%s", _("Invalid value of weight")); - return -1; - } else { - param->value.ui = val; -@@ -1217,7 +1213,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - int val; - val = vshCommandOptInt(cmd, "cap", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("Invalid value of cap")); -+ vshError(ctl, "%s", _("Invalid value of cap")); - return -1; - } else { - param->value.ui = val; -@@ -1229,7 +1225,7 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - char *val = strchr(data, '='); - int match = 0; - if (!val) { -- vshError(ctl, FALSE, "%s", _("Invalid syntax for --set, expecting name=value")); -+ vshError(ctl, "%s", _("Invalid syntax for --set, expecting name=value")); - return -1; - } - *val = '\0'; -@@ -1243,35 +1239,35 @@ cmdSchedInfoUpdate(vshControl *ctl, cons - switch (param->type) { - case VIR_DOMAIN_SCHED_FIELD_INT: - if (virStrToLong_i(val, NULL, 10, ¶m->value.i) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an int")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_UINT: - if (virStrToLong_ui(val, NULL, 10, ¶m->value.ui) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an unsigned int")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_LLONG: - if (virStrToLong_ll(val, NULL, 10, ¶m->value.l) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an long long")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_ULLONG: - if (virStrToLong_ull(val, NULL, 10, ¶m->value.ul) < 0) { -- vshError(ctl, FALSE, "%s", -+ vshError(ctl, "%s", - _("Invalid value for parameter, expecting an unsigned long long")); - return -1; - } - break; - case VIR_DOMAIN_SCHED_FIELD_DOUBLE: - if (virStrToDouble(val, NULL, ¶m->value.d) < 0) { -- vshError(ctl, FALSE, "%s", _("Invalid value for parameter, expecting a double")); -+ vshError(ctl, "%s", _("Invalid value for parameter, expecting a double")); - return -1; - } - break; -@@ -1408,7 +1404,7 @@ cmdRestore(vshControl *ctl, const vshCmd - if (virDomainRestore(ctl->conn, from) == 0) { - vshPrint(ctl, _("Domain restored from %s\n"), from); - } else { -- vshError(ctl, FALSE, _("Failed to restore domain from %s"), from); -+ vshError(ctl, _("Failed to restore domain from %s"), from); - ret = FALSE; - } - return ret; -@@ -1449,8 +1445,7 @@ cmdDump(vshControl *ctl, const vshCmd *c - if (virDomainCoreDump(dom, to, 0) == 0) { - vshPrint(ctl, _("Domain %s dumped to %s\n"), name, to); - } else { -- vshError(ctl, FALSE, _("Failed to core dump domain %s to %s"), -- name, to); -+ vshError(ctl, _("Failed to core dump domain %s to %s"), name, to); - ret = FALSE; - } - -@@ -1488,7 +1483,7 @@ cmdResume(vshControl *ctl, const vshCmd - if (virDomainResume(dom) == 0) { - vshPrint(ctl, _("Domain %s resumed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to resume domain %s"), name); -+ vshError(ctl, _("Failed to resume domain %s"), name); - ret = FALSE; - } - -@@ -1526,7 +1521,7 @@ cmdShutdown(vshControl *ctl, const vshCm - if (virDomainShutdown(dom) == 0) { - vshPrint(ctl, _("Domain %s is being shutdown\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to shutdown domain %s"), name); -+ vshError(ctl, _("Failed to shutdown domain %s"), name); - ret = FALSE; - } - -@@ -1564,7 +1559,7 @@ cmdReboot(vshControl *ctl, const vshCmd - if (virDomainReboot(dom, 0) == 0) { - vshPrint(ctl, _("Domain %s is being rebooted\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to reboot domain %s"), name); -+ vshError(ctl, _("Failed to reboot domain %s"), name); - ret = FALSE; - } - -@@ -1602,7 +1597,7 @@ cmdDestroy(vshControl *ctl, const vshCmd - if (virDomainDestroy(dom) == 0) { - vshPrint(ctl, _("Domain %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy domain %s"), name); -+ vshError(ctl, _("Failed to destroy domain %s"), name); - ret = FALSE; - } - -@@ -1835,8 +1830,8 @@ cmdVcpuinfo(vshControl *ctl, const vshCm - } - } else { - if (info.state == VIR_DOMAIN_SHUTOFF) { -- vshError(ctl, FALSE, "%s", -- _("Domain shut off, virtual CPUs not present.")); -+ vshError(ctl, "%s", -+ _("Domain shut off, virtual CPUs not present.")); - } - ret = FALSE; - } -@@ -1886,14 +1881,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd - - vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound); - if (!vcpufound) { -- vshError(ctl, FALSE, "%s", -- _("vcpupin: Invalid or missing vCPU number.")); -+ vshError(ctl, "%s", _("vcpupin: Invalid or missing vCPU number.")); - virDomainFree(dom); - return FALSE; - } - - if (!(cpulist = vshCommandOptString(cmd, "cpulist", NULL))) { -- vshError(ctl, FALSE, "%s", _("vcpupin: Missing cpulist")); -+ vshError(ctl, "%s", _("vcpupin: Missing cpulist")); - virDomainFree(dom); - return FALSE; - } -@@ -1904,14 +1898,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd - } - - if (virDomainGetInfo(dom, &info) != 0) { -- vshError(ctl, FALSE, "%s", -- _("vcpupin: failed to get domain informations.")); -+ vshError(ctl, "%s", _("vcpupin: failed to get domain informations.")); - virDomainFree(dom); - return FALSE; - } - - if (vcpu >= info.nrVirtCpu) { -- vshError(ctl, FALSE, "%s", _("vcpupin: Invalid vCPU number.")); -+ vshError(ctl, "%s", _("vcpupin: Invalid vCPU number.")); - virDomainFree(dom); - return FALSE; - } -@@ -1920,7 +1913,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd - * numbers and give an intelligent error message if not. - */ - if (cpulist[0] == '\0') { -- vshError(ctl, FALSE, "%s", _("cpulist: Invalid format. Empty string.")); -+ vshError(ctl, "%s", _("cpulist: Invalid format. Empty string.")); - virDomainFree (dom); - return FALSE; - } -@@ -1930,7 +1923,9 @@ cmdVcpupin(vshControl *ctl, const vshCmd - switch (state) { - case expect_num: - if (!c_isdigit (cpulist[i])) { -- vshError( ctl, FALSE, _("cpulist: %s: Invalid format. Expecting digit at position %d (near '%c')."), cpulist, i, cpulist[i]); -+ vshError(ctl, _("cpulist: %s: Invalid format. Expecting " -+ "digit at position %d (near '%c')."), -+ cpulist, i, cpulist[i]); - virDomainFree (dom); - return FALSE; - } -@@ -1940,14 +1935,18 @@ cmdVcpupin(vshControl *ctl, const vshCmd - if (cpulist[i] == ',') - state = expect_num; - else if (!c_isdigit (cpulist[i])) { -- vshError(ctl, FALSE, _("cpulist: %s: Invalid format. Expecting digit or comma at position %d (near '%c')."), cpulist, i, cpulist[i]); -+ vshError(ctl, _("cpulist: %s: Invalid format. Expecting " -+ "digit or comma at position %d (near '%c')."), -+ cpulist, i, cpulist[i]); - virDomainFree (dom); - return FALSE; - } - } - } - if (state == expect_num) { -- vshError(ctl, FALSE, _("cpulist: %s: Invalid format. Trailing comma at position %d."), cpulist, i); -+ vshError(ctl, _("cpulist: %s: Invalid format. Trailing comma " -+ "at position %d."), -+ cpulist, i); - virDomainFree (dom); - return FALSE; - } -@@ -1961,7 +1960,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd - if (cpu < VIR_NODEINFO_MAXCPUS(nodeinfo)) { - VIR_USE_CPU(cpumap, cpu); - } else { -- vshError(ctl, FALSE, _("Physical CPU %d doesn't exist."), cpu); -+ vshError(ctl, _("Physical CPU %d doesn't exist."), cpu); - free(cpumap); - virDomainFree(dom); - return FALSE; -@@ -2011,7 +2010,7 @@ cmdSetvcpus(vshControl *ctl, const vshCm - - count = vshCommandOptInt(cmd, "count", &count); - if (count <= 0) { -- vshError(ctl, FALSE, "%s", _("Invalid number of virtual CPUs.")); -+ vshError(ctl, "%s", _("Invalid number of virtual CPUs.")); - virDomainFree(dom); - return FALSE; - } -@@ -2023,7 +2022,7 @@ cmdSetvcpus(vshControl *ctl, const vshCm - } - - if (count > maxcpu) { -- vshError(ctl, FALSE, "%s", _("Too many virtual CPUs.")); -+ vshError(ctl, "%s", _("Too many virtual CPUs.")); - virDomainFree(dom); - return FALSE; - } -@@ -2068,19 +2067,19 @@ cmdSetmem(vshControl *ctl, const vshCmd - kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes); - if (kilobytes <= 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); -+ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); - return FALSE; - } - - if (virDomainGetInfo(dom, &info) != 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, "%s", _("Unable to verify MaxMemorySize")); -+ vshError(ctl, "%s", _("Unable to verify MaxMemorySize")); - return FALSE; - } - - if (kilobytes > info.maxMem) { - virDomainFree(dom); -- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); -+ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); - return FALSE; - } - -@@ -2124,26 +2123,26 @@ cmdSetmaxmem(vshControl *ctl, const vshC - kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes); - if (kilobytes <= 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, _("Invalid value of %d for memory size"), kilobytes); -+ vshError(ctl, _("Invalid value of %d for memory size"), kilobytes); - return FALSE; - } - - if (virDomainGetInfo(dom, &info) != 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, "%s", _("Unable to verify current MemorySize")); -+ vshError(ctl, "%s", _("Unable to verify current MemorySize")); - return FALSE; - } - - if (kilobytes < info.memory) { - if (virDomainSetMemory(dom, kilobytes) != 0) { - virDomainFree(dom); -- vshError(ctl, FALSE, "%s", _("Unable to shrink current MemorySize")); -+ vshError(ctl, "%s", _("Unable to shrink current MemorySize")); - return FALSE; - } - } - - if (virDomainSetMaxMemory(dom, kilobytes) != 0) { -- vshError(ctl, FALSE, "%s", _("Unable to change MaxMemorySize")); -+ vshError(ctl, "%s", _("Unable to change MaxMemorySize")); - ret = FALSE; - } - -@@ -2169,7 +2168,7 @@ cmdNodeinfo(vshControl *ctl, const vshCm - return FALSE; - - if (virNodeGetInfo(ctl->conn, &info) < 0) { -- vshError(ctl, FALSE, "%s", _("failed to get node information")); -+ vshError(ctl, "%s", _("failed to get node information")); - return FALSE; - } - vshPrint(ctl, "%-20s %s\n", _("CPU model:"), info.model); -@@ -2202,7 +2201,7 @@ cmdCapabilities (vshControl *ctl, const - return FALSE; - - if ((caps = virConnectGetCapabilities (ctl->conn)) == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get capabilities")); -+ vshError(ctl, "%s", _("failed to get capabilities")); - return FALSE; - } - vshPrint (ctl, "%s\n", caps); -@@ -2446,7 +2445,7 @@ cmdDomuuid(vshControl *ctl, const vshCmd - if (virDomainGetUUIDString(dom, uuid) != -1) - vshPrint(ctl, "%s\n", uuid); - else -- vshError(ctl, FALSE, "%s", _("failed to get domain UUID")); -+ vshError(ctl, "%s", _("failed to get domain UUID")); - - virDomainFree(dom); - return TRUE; -@@ -2489,7 +2488,7 @@ cmdMigrate (vshControl *ctl, const vshCm - - desturi = vshCommandOptString (cmd, "desturi", &found); - if (!found) { -- vshError (ctl, FALSE, "%s", _("migrate: Missing desturi")); -+ vshError(ctl, "%s", _("migrate: Missing desturi")); - goto done; - } - -@@ -2550,11 +2549,9 @@ cmdNetworkAutostart(vshControl *ctl, con - - if (virNetworkSetAutostart(network, autostart) < 0) { - if (autostart) -- vshError(ctl, FALSE, _("failed to mark network %s as autostarted"), -- name); -+ vshError(ctl, _("failed to mark network %s as autostarted"), name); - else -- vshError(ctl, FALSE,_("failed to unmark network %s as autostarted"), -- name); -+ vshError(ctl, _("failed to unmark network %s as autostarted"), name); - virNetworkFree(network); - return FALSE; - } -@@ -2609,7 +2606,7 @@ cmdNetworkCreate(vshControl *ctl, const - virNetworkGetName(network), from); - virNetworkFree(network); - } else { -- vshError(ctl, FALSE, _("Failed to create network from %s"), from); -+ vshError(ctl, _("Failed to create network from %s"), from); - ret = FALSE; - } - return ret; -@@ -2657,7 +2654,7 @@ cmdNetworkDefine(vshControl *ctl, const - virNetworkGetName(network), from); - virNetworkFree(network); - } else { -- vshError(ctl, FALSE, _("Failed to define network from %s"), from); -+ vshError(ctl, _("Failed to define network from %s"), from); - ret = FALSE; - } - return ret; -@@ -2694,7 +2691,7 @@ cmdNetworkDestroy(vshControl *ctl, const - if (virNetworkDestroy(network) == 0) { - vshPrint(ctl, _("Network %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy network %s"), name); -+ vshError(ctl, _("Failed to destroy network %s"), name); - ret = FALSE; - } - -@@ -2811,8 +2808,8 @@ cmdInterfaceEdit (vshControl *ctl, const - goto cleanup; - - if (STRNEQ (doc, doc_reread)) { -- vshError (ctl, FALSE, "%s", -- _("ERROR: the XML configuration was changed by another user")); -+ vshError(ctl, "%s", -+ _("ERROR: the XML configuration was changed by another user")); - goto cleanup; - } - -@@ -2874,7 +2871,7 @@ cmdNetworkList(vshControl *ctl, const vs - if (active) { - maxactive = virConnectNumOfNetworks(ctl->conn); - if (maxactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active networks")); -+ vshError(ctl, "%s", _("Failed to list active networks")); - return FALSE; - } - if (maxactive) { -@@ -2882,7 +2879,7 @@ cmdNetworkList(vshControl *ctl, const vs - - if ((maxactive = virConnectListNetworks(ctl->conn, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active networks")); -+ vshError(ctl, "%s", _("Failed to list active networks")); - free(activeNames); - return FALSE; - } -@@ -2893,7 +2890,7 @@ cmdNetworkList(vshControl *ctl, const vs - if (inactive) { - maxinactive = virConnectNumOfDefinedNetworks(ctl->conn); - if (maxinactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive networks")); -+ vshError(ctl, "%s", _("Failed to list inactive networks")); - free(activeNames); - return FALSE; - } -@@ -2903,8 +2900,7 @@ cmdNetworkList(vshControl *ctl, const vs - if ((maxinactive = - virConnectListDefinedNetworks(ctl->conn, inactiveNames, - maxinactive)) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list inactive networks")); -+ vshError(ctl, "%s", _("Failed to list inactive networks")); - free(activeNames); - free(inactiveNames); - return FALSE; -@@ -3032,7 +3028,7 @@ cmdNetworkStart(vshControl *ctl, const v - vshPrint(ctl, _("Network %s started\n"), - virNetworkGetName(network)); - } else { -- vshError(ctl, FALSE, _("Failed to start network %s"), -+ vshError(ctl, _("Failed to start network %s"), - virNetworkGetName(network)); - ret = FALSE; - } -@@ -3071,7 +3067,7 @@ cmdNetworkUndefine(vshControl *ctl, cons - if (virNetworkUndefine(network) == 0) { - vshPrint(ctl, _("Network %s has been undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine network %s"), name); -+ vshError(ctl, _("Failed to undefine network %s"), name); - ret = FALSE; - } - -@@ -3110,7 +3106,7 @@ cmdNetworkUuid(vshControl *ctl, const vs - if (virNetworkGetUUIDString(network, uuid) != -1) - vshPrint(ctl, "%s\n", uuid); - else -- vshError(ctl, FALSE, "%s", _("failed to get network UUID")); -+ vshError(ctl, "%s", _("failed to get network UUID")); - - virNetworkFree(network); - return TRUE; -@@ -3148,7 +3144,7 @@ cmdInterfaceList(vshControl *ctl, const - if (active) { - maxactive = virConnectNumOfInterfaces(ctl->conn); - if (maxactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active interfaces")); -+ vshError(ctl, "%s", _("Failed to list active interfaces")); - return FALSE; - } - if (maxactive) { -@@ -3156,8 +3152,7 @@ cmdInterfaceList(vshControl *ctl, const - - if ((maxactive = virConnectListInterfaces(ctl->conn, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list active interfaces")); -+ vshError(ctl, "%s", _("Failed to list active interfaces")); - free(activeNames); - return FALSE; - } -@@ -3168,8 +3163,7 @@ cmdInterfaceList(vshControl *ctl, const - if (inactive) { - maxinactive = virConnectNumOfDefinedInterfaces(ctl->conn); - if (maxinactive < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list inactive interfaces")); -+ vshError(ctl, "%s", _("Failed to list inactive interfaces")); - free(activeNames); - return FALSE; - } -@@ -3179,8 +3173,7 @@ cmdInterfaceList(vshControl *ctl, const - if ((maxinactive = - virConnectListDefinedInterfaces(ctl->conn, inactiveNames, - maxinactive)) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to list inactive interfaces")); -+ vshError(ctl, "%s", _("Failed to list inactive interfaces")); - free(activeNames); - free(inactiveNames); - return FALSE; -@@ -3373,7 +3366,7 @@ cmdInterfaceDefine(vshControl *ctl, cons - virInterfaceGetName(iface), from); - virInterfaceFree (iface); - } else { -- vshError(ctl, FALSE, _("Failed to define interface from %s"), from); -+ vshError(ctl, _("Failed to define interface from %s"), from); - ret = FALSE; - } - return ret; -@@ -3409,7 +3402,7 @@ cmdInterfaceUndefine(vshControl *ctl, co - if (virInterfaceUndefine(iface) == 0) { - vshPrint(ctl, _("Interface %s undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine interface %s"), name); -+ vshError(ctl, _("Failed to undefine interface %s"), name); - ret = FALSE; - } - -@@ -3447,7 +3440,7 @@ cmdInterfaceStart(vshControl *ctl, const - if (virInterfaceCreate(iface, 0) == 0) { - vshPrint(ctl, _("Interface %s started\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to start interface %s"), name); -+ vshError(ctl, _("Failed to start interface %s"), name); - ret = FALSE; - } - -@@ -3485,7 +3478,7 @@ cmdInterfaceDestroy(vshControl *ctl, con - if (virInterfaceDestroy(iface, 0) == 0) { - vshPrint(ctl, _("Interface %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy interface %s"), name); -+ vshError(ctl, _("Failed to destroy interface %s"), name); - ret = FALSE; - } - -@@ -3527,11 +3520,9 @@ cmdPoolAutostart(vshControl *ctl, const - - if (virStoragePoolSetAutostart(pool, autostart) < 0) { - if (autostart) -- vshError(ctl, FALSE, _("failed to mark pool %s as autostarted"), -- name); -+ vshError(ctl, _("failed to mark pool %s as autostarted"), name); - else -- vshError(ctl, FALSE,_("failed to unmark pool %s as autostarted"), -- name); -+ vshError(ctl, _("failed to unmark pool %s as autostarted"), name); - virStoragePoolFree(pool); - return FALSE; - } -@@ -3587,7 +3578,7 @@ cmdPoolCreate(vshControl *ctl, const vsh - virStoragePoolGetName(pool), from); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to create pool from %s"), from); -+ vshError(ctl, _("Failed to create pool from %s"), from); - ret = FALSE; - } - return ret; -@@ -3641,7 +3632,7 @@ cmdNodeDeviceCreate(vshControl *ctl, con - virNodeDeviceGetName(dev), from); - virNodeDeviceFree(dev); - } else { -- vshError(ctl, FALSE, _("Failed to create node device from %s"), from); -+ vshError(ctl, _("Failed to create node device from %s"), from); - ret = FALSE; - } - -@@ -3687,7 +3678,7 @@ cmdNodeDeviceDestroy(vshControl *ctl, co - if (virNodeDeviceDestroy(dev) == 0) { - vshPrint(ctl, _("Destroyed node device '%s'\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy node device '%s'"), name); -+ vshError(ctl, _("Failed to destroy node device '%s'"), name); - ret = FALSE; - } - -@@ -3800,7 +3791,7 @@ cmdPoolCreateAs(vshControl *ctl, const v - vshPrint(ctl, _("Pool %s created\n"), name); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to create pool %s"), name); -+ vshError(ctl, _("Failed to create pool %s"), name); - return FALSE; - } - } -@@ -3849,7 +3840,7 @@ cmdPoolDefine(vshControl *ctl, const vsh - virStoragePoolGetName(pool), from); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to define pool from %s"), from); -+ vshError(ctl, _("Failed to define pool from %s"), from); - ret = FALSE; - } - return ret; -@@ -3889,7 +3880,7 @@ cmdPoolDefineAs(vshControl *ctl, const v - vshPrint(ctl, _("Pool %s defined\n"), name); - virStoragePoolFree(pool); - } else { -- vshError(ctl, FALSE, _("Failed to define pool %s"), name); -+ vshError(ctl, _("Failed to define pool %s"), name); - return FALSE; - } - } -@@ -3927,7 +3918,7 @@ cmdPoolBuild(vshControl *ctl, const vshC - if (virStoragePoolBuild(pool, 0) == 0) { - vshPrint(ctl, _("Pool %s built\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to build pool %s"), name); -+ vshError(ctl, _("Failed to build pool %s"), name); - ret = FALSE; - virStoragePoolFree(pool); - } -@@ -3966,7 +3957,7 @@ cmdPoolDestroy(vshControl *ctl, const vs - if (virStoragePoolDestroy(pool) == 0) { - vshPrint(ctl, _("Pool %s destroyed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to destroy pool %s"), name); -+ vshError(ctl, _("Failed to destroy pool %s"), name); - ret = FALSE; - } - -@@ -4005,7 +3996,7 @@ cmdPoolDelete(vshControl *ctl, const vsh - if (virStoragePoolDelete(pool, 0) == 0) { - vshPrint(ctl, _("Pool %s deleted\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to delete pool %s"), name); -+ vshError(ctl, _("Failed to delete pool %s"), name); - ret = FALSE; - } - -@@ -4044,7 +4035,7 @@ cmdPoolRefresh(vshControl *ctl, const vs - if (virStoragePoolRefresh(pool, 0) == 0) { - vshPrint(ctl, _("Pool %s refreshed\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to refresh pool %s"), name); -+ vshError(ctl, _("Failed to refresh pool %s"), name); - ret = FALSE; - } - virStoragePoolFree(pool); -@@ -4124,7 +4115,7 @@ cmdPoolList(vshControl *ctl, const vshCm - if (active) { - maxactive = virConnectNumOfStoragePools(ctl->conn); - if (maxactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active pools")); -+ vshError(ctl, "%s", _("Failed to list active pools")); - return FALSE; - } - if (maxactive) { -@@ -4132,7 +4123,7 @@ cmdPoolList(vshControl *ctl, const vshCm - - if ((maxactive = virConnectListStoragePools(ctl->conn, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active pools")); -+ vshError(ctl, "%s", _("Failed to list active pools")); - free(activeNames); - return FALSE; - } -@@ -4143,7 +4134,7 @@ cmdPoolList(vshControl *ctl, const vshCm - if (inactive) { - maxinactive = virConnectNumOfDefinedStoragePools(ctl->conn); - if (maxinactive < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive pools")); -+ vshError(ctl, "%s", _("Failed to list inactive pools")); - free(activeNames); - return FALSE; - } -@@ -4151,7 +4142,7 @@ cmdPoolList(vshControl *ctl, const vshCm - inactiveNames = vshMalloc(ctl, sizeof(char *) * maxinactive); - - if ((maxinactive = virConnectListDefinedStoragePools(ctl->conn, inactiveNames, maxinactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list inactive pools")); -+ vshError(ctl, "%s", _("Failed to list inactive pools")); - free(activeNames); - free(inactiveNames); - return FALSE; -@@ -4273,10 +4264,10 @@ cmdPoolDiscoverSourcesAs(vshControl * ct - if (ret < 0) { - switch (errno) { - case ENOMEM: -- vshError(ctl, FALSE, "%s", _("Out of memory")); -+ vshError(ctl, "%s", _("Out of memory")); - break; - default: -- vshError(ctl, FALSE, _("virAsprintf failed (errno %d)"), errno); -+ vshError(ctl, _("virAsprintf failed (errno %d)"), errno); - } - return FALSE; - } -@@ -4285,7 +4276,7 @@ cmdPoolDiscoverSourcesAs(vshControl * ct - srcList = virConnectFindStoragePoolSources(ctl->conn, type, srcSpec, 0); - free(srcSpec); - if (srcList == NULL) { -- vshError(ctl, FALSE, _("Failed to find any %s pool sources"), type); -+ vshError(ctl, _("Failed to find any %s pool sources"), type); - return FALSE; - } - vshPrint(ctl, "%s", srcList); -@@ -4336,7 +4327,7 @@ cmdPoolDiscoverSources(vshControl * ctl, - srcList = virConnectFindStoragePoolSources(ctl->conn, type, srcSpec, 0); - free(srcSpec); - if (srcList == NULL) { -- vshError(ctl, FALSE, _("Failed to find any %s pool sources"), type); -+ vshError(ctl, _("Failed to find any %s pool sources"), type); - return FALSE; - } - vshPrint(ctl, "%s", srcList); -@@ -4503,8 +4494,7 @@ cmdPoolStart(vshControl *ctl, const vshC - vshPrint(ctl, _("Pool %s started\n"), - virStoragePoolGetName(pool)); - } else { -- vshError(ctl, FALSE, _("Failed to start pool %s"), -- virStoragePoolGetName(pool)); -+ vshError(ctl, _("Failed to start pool %s"), virStoragePoolGetName(pool)); - ret = FALSE; - } - -@@ -4585,12 +4575,12 @@ cmdVolCreateAs(vshControl *ctl, const vs - if (!found) - goto cleanup; - if (cmdVolSize(capacityStr, &capacity) < 0) -- vshError(ctl, FALSE, _("Malformed size %s"), capacityStr); -+ vshError(ctl, _("Malformed size %s"), capacityStr); - - allocationStr = vshCommandOptString(cmd, "allocation", &found); - if (allocationStr && - cmdVolSize(allocationStr, &allocation) < 0) -- vshError(ctl, FALSE, _("Malformed size %s"), allocationStr); -+ vshError(ctl, _("Malformed size %s"), allocationStr); - - format = vshCommandOptString(cmd, "format", &found); - -@@ -4623,7 +4613,7 @@ cmdVolCreateAs(vshControl *ctl, const vs - virStorageVolFree(vol); - return TRUE; - } else { -- vshError(ctl, FALSE, _("Failed to create vol %s"), name); -+ vshError(ctl, _("Failed to create vol %s"), name); - return FALSE; - } - -@@ -4664,7 +4654,7 @@ cmdPoolUndefine(vshControl *ctl, const v - if (virStoragePoolUndefine(pool) == 0) { - vshPrint(ctl, _("Pool %s has been undefined\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to undefine pool %s"), name); -+ vshError(ctl, _("Failed to undefine pool %s"), name); - ret = FALSE; - } - -@@ -4703,7 +4693,7 @@ cmdPoolUuid(vshControl *ctl, const vshCm - if (virStoragePoolGetUUIDString(pool, uuid) != -1) - vshPrint(ctl, "%s\n", uuid); - else -- vshError(ctl, FALSE, "%s", _("failed to get pool UUID")); -+ vshError(ctl, "%s", _("failed to get pool UUID")); - - virStoragePoolFree(pool); - return TRUE; -@@ -4762,7 +4752,7 @@ cmdVolCreate(vshControl *ctl, const vshC - virStorageVolGetName(vol), from); - virStorageVolFree(vol); - } else { -- vshError(ctl, FALSE, _("Failed to create vol from %s"), from); -+ vshError(ctl, _("Failed to create vol from %s"), from); - ret = FALSE; - } - return ret; -@@ -4819,7 +4809,7 @@ cmdVolCreateFrom(vshControl *ctl, const - vshPrint(ctl, _("Vol %s created from input vol %s\n"), - virStorageVolGetName(newvol), virStorageVolGetName(inputvol)); - } else { -- vshError(ctl, FALSE, _("Failed to create vol from %s"), from); -+ vshError(ctl, _("Failed to create vol from %s"), from); - goto cleanup; - } - -@@ -4901,7 +4891,7 @@ cmdVolClone(vshControl *ctl, const vshCm - - origpool = virStoragePoolLookupByVolume(origvol); - if (!origpool) { -- vshError(ctl, FALSE, "%s", _("failed to get parent pool")); -+ vshError(ctl, "%s", _("failed to get parent pool")); - goto cleanup; - } - -@@ -4925,7 +4915,7 @@ cmdVolClone(vshControl *ctl, const vshCm - vshPrint(ctl, _("Vol %s cloned from %s\n"), - virStorageVolGetName(newvol), virStorageVolGetName(origvol)); - } else { -- vshError(ctl, FALSE, _("Failed to clone vol from %s"), -+ vshError(ctl, _("Failed to clone vol from %s"), - virStorageVolGetName(origvol)); - goto cleanup; - } -@@ -4976,7 +4966,7 @@ cmdVolDelete(vshControl *ctl, const vshC - if (virStorageVolDelete(vol, 0) == 0) { - vshPrint(ctl, _("Vol %s deleted\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to delete vol %s"), name); -+ vshError(ctl, _("Failed to delete vol %s"), name); - ret = FALSE; - } - -@@ -5107,7 +5097,7 @@ cmdVolList(vshControl *ctl, const vshCmd - maxactive = virStoragePoolNumOfVolumes(pool); - if (maxactive < 0) { - virStoragePoolFree(pool); -- vshError(ctl, FALSE, "%s", _("Failed to list active vols")); -+ vshError(ctl, "%s", _("Failed to list active vols")); - return FALSE; - } - if (maxactive) { -@@ -5115,7 +5105,7 @@ cmdVolList(vshControl *ctl, const vshCmd - - if ((maxactive = virStoragePoolListVolumes(pool, activeNames, - maxactive)) < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list active vols")); -+ vshError(ctl, "%s", _("Failed to list active vols")); - free(activeNames); - virStoragePoolFree(pool); - return FALSE; -@@ -5288,12 +5278,11 @@ cmdSecretDefine(vshControl *ctl, const v - free (buffer); - - if (res == NULL) { -- vshError(ctl, FALSE, _("Failed to set attributes from %s"), from); -+ vshError(ctl, _("Failed to set attributes from %s"), from); - return FALSE; - } - if (virSecretGetUUIDString(res, &(uuid[0])) < 0) { -- vshError(ctl, FALSE, "%s", -- _("Failed to get UUID of created secret")); -+ vshError(ctl, "%s", _("Failed to get UUID of created secret")); - virSecretFree(res); - return FALSE; - } -@@ -5377,11 +5366,11 @@ cmdSecretSetValue(vshControl *ctl, const - goto cleanup; - - if (!base64_decode_alloc(base64, strlen(base64), &value, &value_size)) { -- vshError(ctl, FALSE, _("Invalid base64 data")); -+ vshError(ctl, _("Invalid base64 data")); - goto cleanup; - } - if (value == NULL) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - return FALSE; - } - -@@ -5390,7 +5379,7 @@ cmdSecretSetValue(vshControl *ctl, const - free (value); - - if (res != 0) { -- vshError(ctl, FALSE, "%s", _("Failed to set secret value")); -+ vshError(ctl, "%s", _("Failed to set secret value")); - goto cleanup; - } - vshPrint(ctl, "%s", _("Secret value set\n")); -@@ -5440,7 +5429,7 @@ cmdSecretGetValue(vshControl *ctl, const - free(value); - - if (base64 == NULL) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - goto cleanup; - } - printf("%s", base64); -@@ -5482,7 +5471,7 @@ cmdSecretUndefine(vshControl *ctl, const - return FALSE; - - if (virSecretUndefine(secret) < 0) { -- vshError(ctl, FALSE, _("Failed to delete secret %s"), uuid); -+ vshError(ctl, _("Failed to delete secret %s"), uuid); - goto cleanup; - } - vshPrint(ctl, _("Secret %s deleted\n"), uuid); -@@ -5513,14 +5502,14 @@ cmdSecretList(vshControl *ctl, const vsh - - maxuuids = virConnectNumOfSecrets(ctl->conn); - if (maxuuids < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list secrets")); -+ vshError(ctl, "%s", _("Failed to list secrets")); - return FALSE; - } - uuids = vshMalloc(ctl, sizeof(*uuids) * maxuuids); - - maxuuids = virConnectListSecrets(ctl->conn, uuids, maxuuids); - if (maxuuids < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list secrets")); -+ vshError(ctl, "%s", _("Failed to list secrets")); - free(uuids); - return FALSE; - } -@@ -5589,7 +5578,7 @@ cmdVersion(vshControl *ctl, const vshCmd - - hvType = virConnectGetType(ctl->conn); - if (hvType == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get hypervisor type")); -+ vshError(ctl, "%s", _("failed to get hypervisor type")); - return FALSE; - } - -@@ -5603,7 +5592,7 @@ cmdVersion(vshControl *ctl, const vshCmd - - ret = virGetVersion(&libVersion, hvType, &apiVersion); - if (ret < 0) { -- vshError(ctl, FALSE, "%s", _("failed to get the library version")); -+ vshError(ctl, "%s", _("failed to get the library version")); - return FALSE; - } - major = libVersion / 1000000; -@@ -5622,7 +5611,7 @@ cmdVersion(vshControl *ctl, const vshCmd - - ret = virConnectGetVersion(ctl->conn, &hvVersion); - if (ret < 0) { -- vshError(ctl, FALSE, "%s", _("failed to get the hypervisor version")); -+ vshError(ctl, "%s", _("failed to get the hypervisor version")); - return FALSE; - } - if (hvVersion == 0) { -@@ -5752,7 +5741,7 @@ cmdNodeListDevices (vshControl *ctl, con - - num_devices = virNodeNumOfDevices(ctl->conn, cap, 0); - if (num_devices < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to count node devices")); -+ vshError(ctl, "%s", _("Failed to count node devices")); - return FALSE; - } else if (num_devices == 0) { - return TRUE; -@@ -5762,7 +5751,7 @@ cmdNodeListDevices (vshControl *ctl, con - num_devices = - virNodeListDevices(ctl->conn, cap, devices, num_devices, 0); - if (num_devices < 0) { -- vshError(ctl, FALSE, "%s", _("Failed to list node devices")); -+ vshError(ctl, "%s", _("Failed to list node devices")); - free(devices); - return FALSE; - } -@@ -5835,7 +5824,7 @@ cmdNodeDeviceDumpXML (vshControl *ctl, c - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - -@@ -5878,14 +5867,14 @@ cmdNodeDeviceDettach (vshControl *ctl, c - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - - if (virNodeDeviceDettach(device) == 0) { - vshPrint(ctl, _("Device %s dettached\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to dettach device %s"), name); -+ vshError(ctl, _("Failed to dettach device %s"), name); - ret = FALSE; - } - virNodeDeviceFree(device); -@@ -5919,14 +5908,14 @@ cmdNodeDeviceReAttach (vshControl *ctl, - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - - if (virNodeDeviceReAttach(device) == 0) { - vshPrint(ctl, _("Device %s re-attached\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to re-attach device %s"), name); -+ vshError(ctl, _("Failed to re-attach device %s"), name); - ret = FALSE; - } - virNodeDeviceFree(device); -@@ -5960,14 +5949,14 @@ cmdNodeDeviceReset (vshControl *ctl, con - if (!(name = vshCommandOptString(cmd, "device", NULL))) - return FALSE; - if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) { -- vshError(ctl, FALSE, "%s '%s'", _("Could not find matching device"), name); -+ vshError(ctl, "%s '%s'", _("Could not find matching device"), name); - return FALSE; - } - - if (virNodeDeviceReset(device) == 0) { - vshPrint(ctl, _("Device %s reset\n"), name); - } else { -- vshError(ctl, FALSE, _("Failed to reset device %s"), name); -+ vshError(ctl, _("Failed to reset device %s"), name); - ret = FALSE; - } - virNodeDeviceFree(device); -@@ -5993,7 +5982,7 @@ cmdHostname (vshControl *ctl, const vshC - - hostname = virConnectGetHostname (ctl->conn); - if (hostname == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get hostname")); -+ vshError(ctl, "%s", _("failed to get hostname")); - return FALSE; - } - -@@ -6022,7 +6011,7 @@ cmdURI (vshControl *ctl, const vshCmd *c - - uri = virConnectGetURI (ctl->conn); - if (uri == NULL) { -- vshError(ctl, FALSE, "%s", _("failed to get URI")); -+ vshError(ctl, "%s", _("failed to get URI")); - return FALSE; - } - -@@ -6200,7 +6189,7 @@ cmdAttachDevice(vshControl *ctl, const v - - from = vshCommandOptString(cmd, "file", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("attach-device: Missing option")); -+ vshError(ctl, "%s", _("attach-device: Missing option")); - virDomainFree(dom); - return FALSE; - } -@@ -6214,7 +6203,7 @@ cmdAttachDevice(vshControl *ctl, const v - free (buffer); - - if (ret < 0) { -- vshError(ctl, FALSE, _("Failed to attach device from %s"), from); -+ vshError(ctl, _("Failed to attach device from %s"), from); - virDomainFree(dom); - return FALSE; - } else { -@@ -6258,7 +6247,7 @@ cmdDetachDevice(vshControl *ctl, const v - - from = vshCommandOptString(cmd, "file", &found); - if (!found) { -- vshError(ctl, FALSE, "%s", _("detach-device: Missing option")); -+ vshError(ctl, "%s", _("detach-device: Missing option")); - virDomainFree(dom); - return FALSE; - } -@@ -6272,7 +6261,7 @@ cmdDetachDevice(vshControl *ctl, const v - free (buffer); - - if (ret < 0) { -- vshError(ctl, FALSE, _("Failed to detach device from %s"), from); -+ vshError(ctl, _("Failed to detach device from %s"), from); - virDomainFree(dom); - return FALSE; - } else { -@@ -6331,7 +6320,7 @@ cmdAttachInterface(vshControl *ctl, cons - } else if (STREQ(type, "bridge")) { - typ = 2; - } else { -- vshError(ctl, FALSE, _("No support %s in command 'attach-interface'"), type); -+ vshError(ctl, _("No support %s in command 'attach-interface'"), type); - goto cleanup; - } - -@@ -6450,12 +6439,12 @@ cmdDetachInterface(vshControl *ctl, cons - XML_PARSE_NOWARNING); - free(doc); - if (!xml) { -- vshError(ctl, FALSE, "%s", _("Failed to get interface information")); -+ vshError(ctl, "%s", _("Failed to get interface information")); - goto cleanup; - } - ctxt = xmlXPathNewContext(xml); - if (!ctxt) { -- vshError(ctl, FALSE, "%s", _("Failed to get interface information")); -+ vshError(ctl, "%s", _("Failed to get interface information")); - goto cleanup; - } - -@@ -6463,7 +6452,7 @@ cmdDetachInterface(vshControl *ctl, cons - obj = xmlXPathEval(BAD_CAST buf, ctxt); - if ((obj == NULL) || (obj->type != XPATH_NODESET) || - (obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0)) { -- vshError(ctl, FALSE, _("No found interface whose type is %s"), type); -+ vshError(ctl, _("No found interface whose type is %s"), type); - goto cleanup; - } - -@@ -6485,18 +6474,18 @@ cmdDetachInterface(vshControl *ctl, cons - cur = cur->next; - } - } -- vshError(ctl, FALSE, _("No found interface whose MAC address is %s"), mac); -+ vshError(ctl, _("No found interface whose MAC address is %s"), mac); - goto cleanup; - - hit: - xml_buf = xmlBufferCreate(); - if (!xml_buf) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - goto cleanup; - } - - if(xmlNodeDump(xml_buf, xml, obj->nodesetval->nodeTab[i], 0, 0) < 0){ -- vshError(ctl, FALSE, "%s", _("Failed to create XML")); -+ vshError(ctl, "%s", _("Failed to create XML")); - goto cleanup; - } - -@@ -6569,14 +6558,14 @@ cmdAttachDisk(vshControl *ctl, const vsh - if (STREQ(driver, "file") || STREQ(driver, "tap")) { - isFile = 1; - } else if (STRNEQ(driver, "phy")) { -- vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), driver); -+ vshError(ctl, _("No support %s in command 'attach-disk'"), driver); - goto cleanup; - } - } - - if (mode) { - if (STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) { -- vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), mode); -+ vshError(ctl, _("No support %s in command 'attach-disk'"), mode); - goto cleanup; - } - } -@@ -6723,19 +6712,19 @@ cmdDetachDisk(vshControl *ctl, const vsh - XML_PARSE_NOWARNING); - free(doc); - if (!xml) { -- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); -+ vshError(ctl, "%s", _("Failed to get disk information")); - goto cleanup; - } - ctxt = xmlXPathNewContext(xml); - if (!ctxt) { -- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); -+ vshError(ctl, "%s", _("Failed to get disk information")); - goto cleanup; - } - - obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt); - if ((obj == NULL) || (obj->type != XPATH_NODESET) || - (obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0)) { -- vshError(ctl, FALSE, "%s", _("Failed to get disk information")); -+ vshError(ctl, "%s", _("Failed to get disk information")); - goto cleanup; - } - -@@ -6754,18 +6743,18 @@ cmdDetachDisk(vshControl *ctl, const vsh - cur = cur->next; - } - } -- vshError(ctl, FALSE, _("No found disk whose target is %s"), target); -+ vshError(ctl, _("No found disk whose target is %s"), target); - goto cleanup; - - hit: - xml_buf = xmlBufferCreate(); - if (!xml_buf) { -- vshError(ctl, FALSE, "%s", _("Failed to allocate memory")); -+ vshError(ctl, "%s", _("Failed to allocate memory")); - goto cleanup; - } - - if(xmlNodeDump(xml_buf, xml, obj->nodesetval->nodeTab[i], 0, 0) < 0){ -- vshError(ctl, FALSE, "%s", _("Failed to create XML")); -+ vshError(ctl, "%s", _("Failed to create XML")); - goto cleanup; - } - -@@ -6799,9 +6788,8 @@ editWriteToTempFile (vshControl *ctl, co - - ret = malloc (PATH_MAX); - if (!ret) { -- vshError(ctl, FALSE, -- _("malloc: failed to allocate temporary file name: %s"), -- strerror (errno)); -+ vshError(ctl, _("malloc: failed to allocate temporary file name: %s"), -+ strerror(errno)); - return NULL; - } - -@@ -6810,25 +6798,22 @@ editWriteToTempFile (vshControl *ctl, co - snprintf (ret, PATH_MAX, "%s/virshXXXXXX", tmpdir); - fd = mkstemp (ret); - if (fd == -1) { -- vshError(ctl, FALSE, -- _("mkstemp: failed to create temporary file: %s"), -- strerror (errno)); -+ vshError(ctl, _("mkstemp: failed to create temporary file: %s"), -+ strerror(errno)); - return NULL; - } - - if (safewrite (fd, doc, strlen (doc)) == -1) { -- vshError(ctl, FALSE, -- _("write: %s: failed to write to temporary file: %s"), -- ret, strerror (errno)); -+ vshError(ctl, _("write: %s: failed to write to temporary file: %s"), -+ ret, strerror(errno)); - close (fd); - unlink (ret); - free (ret); - return NULL; - } - if (close (fd) == -1) { -- vshError(ctl, FALSE, -- _("close: %s: failed to write or close temporary file: %s"), -- ret, strerror (errno)); -+ vshError(ctl, _("close: %s: failed to write or close temporary file: %s"), -+ ret, strerror(errno)); - unlink (ret); - free (ret); - return NULL; -@@ -6856,35 +6841,37 @@ editFile (vshControl *ctl, const char *f - * it does, refuse to run. - */ - if (strspn (editor, ACCEPTED_CHARS) != strlen (editor)) { -- vshError(ctl, FALSE, -- _("%s: $EDITOR environment variable contains shell meta or other unacceptable characters"), -+ vshError(ctl, -+ _("%s: $EDITOR environment variable contains shell meta or " -+ "other unacceptable characters"), - editor); - return -1; - } - /* Same for the filename. */ - if (strspn (filename, ACCEPTED_CHARS) != strlen (filename)) { -- vshError(ctl, FALSE, -- _("%s: temporary filename contains shell meta or other unacceptable characters (is $TMPDIR wrong?)"), -+ vshError(ctl, -+ _("%s: temporary filename contains shell meta or other " -+ "unacceptable characters (is $TMPDIR wrong?)"), - filename); - return -1; - } - - if (virAsprintf(&command, "%s %s", editor, filename) == -1) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("virAsprintf: could not create editing command: %s"), -- strerror (errno)); -+ strerror(errno)); - return -1; - } - - command_ret = system (command); - if (command_ret == -1) { -- vshError(ctl, FALSE, -- _("%s: edit command failed: %s"), command, strerror (errno)); -+ vshError(ctl, -+ _("%s: edit command failed: %s"), command, strerror(errno)); - free (command); - return -1; - } - if (command_ret != WEXITSTATUS (0)) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("%s: command exited with non-zero status"), command); - free (command); - return -1; -@@ -6899,9 +6886,9 @@ editReadBackFile (vshControl *ctl, const - char *ret; - - if (virFileReadAll (filename, VIRSH_MAX_XML_FILE, &ret) == -1) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("%s: failed to read temporary file: %s"), -- filename, strerror (errno)); -+ filename, strerror(errno)); - return NULL; - } - return ret; -@@ -6930,8 +6917,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd - int found; - - if (!ctl->imode) { -- vshError(ctl, FALSE, "%s", -- _("cd: command valid only in interactive mode")); -+ vshError(ctl, "%s", _("cd: command valid only in interactive mode")); - return -1; - } - -@@ -6944,7 +6930,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd - dir = "/"; - - if (chdir (dir) == -1) { -- vshError(ctl, FALSE, _("cd: %s: %s"), strerror (errno), dir); -+ vshError(ctl, _("cd: %s: %s"), strerror(errno), dir); - return -1; - } - -@@ -6982,7 +6968,8 @@ cmdPwd(vshControl *ctl, const vshCmd *cm - } - - if (err) -- vshError(ctl, FALSE, _("pwd: cannot get current directory: %s"), strerror (errno)); -+ vshError(ctl, _("pwd: cannot get current directory: %s"), -+ strerror(errno)); - else - vshPrint (ctl, _("%s\n"), cwd); - -@@ -7062,8 +7049,8 @@ cmdEdit (vshControl *ctl, const vshCmd * - goto cleanup; - - if (STRNEQ (doc, doc_reread)) { -- vshError (ctl, FALSE, -- "%s", _("ERROR: the XML configuration was changed by another user")); -+ vshError(ctl, -+ "%s", _("ERROR: the XML configuration was changed by another user")); - goto cleanup; - } - -@@ -7348,7 +7335,7 @@ vshCommandCheckOpts(vshControl *ctl, con - o = o->next; - } - if (!ok) { -- vshError(ctl, FALSE, -+ vshError(ctl, - d->type == VSH_OT_DATA ? - _("command '%s' requires <%s> option") : - _("command '%s' requires --%s option"), -@@ -7378,7 +7365,7 @@ vshCmddefHelp(vshControl *ctl, const cha - const vshCmdDef *def = vshCmddefSearch(cmdname); - - if (!def) { -- vshError(ctl, FALSE, _("command '%s' doesn't exist"), cmdname); -+ vshError(ctl, _("command '%s' doesn't exist"), cmdname); - return FALSE; - } else { - const char *desc = N_(vshCmddefGetInfo(def, "desc")); -@@ -7577,8 +7564,7 @@ cmd_has_option (vshControl *ctl, const v - } - - if (!found) -- vshError(ctl, FALSE, -- _("internal error: virsh %s: no %s VSH_OT_DATA option"), -+ vshError(ctl, _("internal error: virsh %s: no %s VSH_OT_DATA option"), - cmd->def->name, optname); - return found; - } -@@ -7595,7 +7581,7 @@ vshCommandOptDomainBy(vshControl *ctl, c - return NULL; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined domain name or id")); -+ vshError(ctl, "%s", _("undefined domain name or id")); - return NULL; - } - -@@ -7627,7 +7613,7 @@ vshCommandOptDomainBy(vshControl *ctl, c - } - - if (!dom) -- vshError(ctl, FALSE, _("failed to get domain '%s'"), n); -+ vshError(ctl, _("failed to get domain '%s'"), n); - - return dom; - } -@@ -7643,7 +7629,7 @@ vshCommandOptNetworkBy(vshControl *ctl, - return NULL; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined network name")); -+ vshError(ctl, "%s", _("undefined network name")); - return NULL; - } - -@@ -7667,7 +7653,7 @@ vshCommandOptNetworkBy(vshControl *ctl, - } - - if (!network) -- vshError(ctl, FALSE, _("failed to get network '%s'"), n); -+ vshError(ctl, _("failed to get network '%s'"), n); - - return network; - } -@@ -7683,7 +7669,7 @@ vshCommandOptInterfaceBy(vshControl *ctl - return NULL; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined interface identifier")); -+ vshError(ctl, "%s", _("undefined interface identifier")); - return NULL; - } - -@@ -7707,7 +7693,7 @@ vshCommandOptInterfaceBy(vshControl *ctl - } - - if (!iface) -- vshError(ctl, FALSE, _("failed to get interface '%s'"), n); -+ vshError(ctl, _("failed to get interface '%s'"), n); - - return iface; - } -@@ -7720,7 +7706,7 @@ vshCommandOptPoolBy(vshControl *ctl, con - char *n; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined pool name")); -+ vshError(ctl, "%s", _("undefined pool name")); - return NULL; - } - -@@ -7744,7 +7730,7 @@ vshCommandOptPoolBy(vshControl *ctl, con - } - - if (!pool) -- vshError(ctl, FALSE, _("failed to get pool '%s'"), n); -+ vshError(ctl, _("failed to get pool '%s'"), n); - - return pool; - } -@@ -7761,12 +7747,12 @@ vshCommandOptVolBy(vshControl *ctl, cons - int found; - - if (!(n = vshCommandOptString(cmd, optname, NULL))) { -- vshError(ctl, FALSE, "%s", _("undefined vol name")); -+ vshError(ctl, "%s", _("undefined vol name")); - return NULL; - } - - if (!(p = vshCommandOptString(cmd, pooloptname, &found)) && found) { -- vshError(ctl, FALSE, "%s", _("undefined pool name")); -+ vshError(ctl, "%s", _("undefined pool name")); - return NULL; - } - -@@ -7797,7 +7783,7 @@ vshCommandOptVolBy(vshControl *ctl, cons - } - - if (!vol) -- vshError(ctl, FALSE, _("failed to get vol '%s'"), n); -+ vshError(ctl, _("failed to get vol '%s'"), n); - - if (pool) - virStoragePoolFree(pool); -@@ -7817,7 +7803,7 @@ vshCommandOptSecret(vshControl *ctl, con - - n = vshCommandOptString(cmd, optname, NULL); - if (n == NULL) { -- vshError(ctl, FALSE, "%s", _("undefined secret UUID")); -+ vshError(ctl, "%s", _("undefined secret UUID")); - return NULL; - } - -@@ -7829,7 +7815,7 @@ vshCommandOptSecret(vshControl *ctl, con - secret = virSecretLookupByUUIDString(ctl->conn, n); - - if (secret == NULL) -- vshError(ctl, FALSE, _("failed to get secret '%s'"), n); -+ vshError(ctl, _("failed to get secret '%s'"), n); - - return secret; - } -@@ -7934,7 +7920,7 @@ vshCommandGetToken(vshControl *ctl, char - sz++; - } - if (quote) { -- vshError(ctl, FALSE, "%s", _("missing \"")); -+ vshError(ctl, "%s", _("missing \"")); - return VSH_TK_ERROR; - } - if (tkstr == NULL || *tkstr == '\0' || p == NULL) -@@ -7994,19 +7980,19 @@ vshCommandParse(vshControl *ctl, char *c - if (cmd == NULL) { - /* first token must be command name */ - if (tk != VSH_TK_DATA) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("unexpected token (command name): '%s'"), - tkdata); - goto syntaxError; - } - if (!(cmd = vshCmddefSearch(tkdata))) { -- vshError(ctl, FALSE, _("unknown command: '%s'"), tkdata); -+ vshError(ctl, _("unknown command: '%s'"), tkdata); - goto syntaxError; /* ... or ignore this command only? */ - } - free(tkdata); - } else if (tk == VSH_TK_OPTION) { - if (!(opt = vshCmddefGetOption(cmd, tkdata))) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("command '%s' doesn't support option --%s"), - cmd->name, tkdata); - goto syntaxError; -@@ -8021,7 +8007,7 @@ vshCommandParse(vshControl *ctl, char *c - if (tk == VSH_TK_ERROR) - goto syntaxError; - if (tk != VSH_TK_DATA) { -- vshError(ctl, FALSE, -+ vshError(ctl, - _("expected syntax: --%s <%s>"), - opt->name, - opt->type == -@@ -8031,7 +8017,7 @@ vshCommandParse(vshControl *ctl, char *c - } - } else if (tk == VSH_TK_DATA) { - if (!(opt = vshCmddefGetData(cmd, data_ct++))) { -- vshError(ctl, FALSE, _("unexpected data '%s'"), tkdata); -+ vshError(ctl, _("unexpected data '%s'"), tkdata); - goto syntaxError; - } - } -@@ -8143,7 +8129,7 @@ vshConnectionUsability(vshControl *ctl, - */ - if (!conn) { - if (showerror) -- vshError(ctl, FALSE, "%s", _("no valid connection")); -+ vshError(ctl, "%s", _("no valid connection")); - return FALSE; - } - return TRUE; -@@ -8181,7 +8167,7 @@ vshPrintExtra(vshControl *ctl, const cha - - - static void --vshError(vshControl *ctl, int doexit, const char *format, ...) -+vshError(vshControl *ctl, const char *format, ...) - { - va_list ap; - -@@ -8189,22 +8175,13 @@ vshError(vshControl *ctl, int doexit, co - vshOutputLogFile(ctl, VSH_ERR_ERROR, format, ap); - va_end(ap); - -- if (doexit) -- fprintf(stderr, _("%s: error: "), progname); -- else -- fputs(_("error: "), stderr); -+ fputs(_("error: "), stderr); - - va_start(ap, format); - vfprintf(stderr, format, ap); - va_end(ap); - - fputc('\n', stderr); -- -- if (doexit) { -- if (ctl) -- vshDeinit(ctl); -- exit(EXIT_FAILURE); -- } - } - - static void * -@@ -8214,9 +8191,9 @@ _vshMalloc(vshControl *ctl, size_t size, - - if ((x = malloc(size))) - return x; -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) size); -- return NULL; -+ exit(EXIT_FAILURE); - } - - static void * -@@ -8226,9 +8203,9 @@ _vshCalloc(vshControl *ctl, size_t nmemb - - if ((x = calloc(nmemb, size))) - return x; -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) (size*nmemb)); -- return NULL; -+ exit(EXIT_FAILURE); - } - - static void * -@@ -8239,9 +8216,9 @@ _vshRealloc(vshControl *ctl, void *ptr, - if ((x = realloc(ptr, size))) - return x; - free(ptr); -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) size); -- return NULL; -+ exit(EXIT_FAILURE); - } - - static char * -@@ -8253,9 +8230,9 @@ _vshStrdup(vshControl *ctl, const char * - return(NULL); - if ((x = strdup(s))) - return x; -- vshError(ctl, TRUE, _("%s: %d: failed to allocate %lu bytes"), -+ vshError(ctl, _("%s: %d: failed to allocate %lu bytes"), - filename, line, (unsigned long)strlen(s)); -- return NULL; -+ exit(EXIT_FAILURE); - } - - /* -@@ -8283,7 +8260,7 @@ vshInit(vshControl *ctl) - */ - if (!ctl->conn) { - virshReportError(ctl); -- vshError(ctl, FALSE, "%s", _("failed to connect to the hypervisor")); -+ vshError(ctl, "%s", _("failed to connect to the hypervisor")); - return FALSE; - } - -@@ -8314,20 +8291,22 @@ vshOpenLogFile(vshControl *ctl) - case ENOENT: - break; - default: -- vshError(ctl, TRUE, "%s", -+ vshError(ctl, "%s", - _("failed to get the log file information")); -- break; -+ exit(EXIT_FAILURE); - } - } else { - if (!S_ISREG(st.st_mode)) { -- vshError(ctl, TRUE, "%s", _("the log path is not a file")); -+ vshError(ctl, "%s", _("the log path is not a file")); -+ exit(EXIT_FAILURE); - } - } - - /* log file open */ - if ((ctl->log_fd = open(ctl->logfile, LOGFILE_FLAGS, FILE_MODE)) < 0) { -- vshError(ctl, TRUE, "%s", -+ vshError(ctl, "%s", - _("failed to open the log file. check the log file path")); -+ exit(EXIT_FAILURE); - } - } - -@@ -8395,7 +8374,7 @@ vshOutputLogFile(vshControl *ctl, int lo - /* write log */ - if (safewrite(ctl->log_fd, msg_buf, strlen(msg_buf)) < 0) { - vshCloseLogFile(ctl); -- vshError(ctl, FALSE, "%s", _("failed to write the log file")); -+ vshError(ctl, "%s", _("failed to write the log file")); - } - } - -@@ -8410,7 +8389,7 @@ vshCloseLogFile(vshControl *ctl) - /* log file close */ - if (ctl->log_fd >= 0) { - if (close(ctl->log_fd) < 0) -- vshError(ctl, FALSE, _("%s: failed to write log file: %s"), -+ vshError(ctl, _("%s: failed to write log file: %s"), - ctl->logfile ? ctl->logfile : "?", strerror (errno)); - ctl->log_fd = -1; - } -@@ -8588,9 +8567,7 @@ vshDeinit(vshControl *ctl) - free(ctl->name); - if (ctl->conn) { - if (virConnectClose(ctl->conn) != 0) { -- ctl->conn = NULL; /* prevent recursive call from vshError() */ -- vshError(ctl, TRUE, "%s", -- _("failed to disconnect from the hypervisor")); -+ vshError(ctl, "%s", _("failed to disconnect from the hypervisor")); - } - } - virResetLastError(); -@@ -8715,16 +8692,16 @@ vshParseArgv(vshControl *ctl, int argc, - ctl->logfile = vshStrdup(ctl, optarg); - break; - default: -- vshError(ctl, TRUE, -- _("unsupported option '-%c'. See --help."), arg); -- break; -+ vshError(ctl, _("unsupported option '-%c'. See --help."), arg); -+ exit(EXIT_FAILURE); - } - } - - if (help) { -- if (end < argc) -- vshError(ctl, TRUE, -- _("extra argument '%s'. See --help."), argv[end]); -+ if (end < argc) { -+ vshError(ctl, _("extra argument '%s'. See --help."), argv[end]); -+ exit(EXIT_FAILURE); -+ } - - /* list all command */ - vshUsage(); diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 73c0874..3188ac7 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.1/src/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.1.orig/src/xend_internal.c -+++ libvirt-0.7.1/src/xend_internal.c -@@ -5306,7 +5306,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -5324,7 +5324,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xen-refcnt.patch b/xen-refcnt.patch deleted file mode 100644 index c54934c..0000000 --- a/xen-refcnt.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: libvirt-0.7.1/src/xen_inotify.c -=================================================================== ---- libvirt-0.7.1.orig/src/xen_inotify.c -+++ libvirt-0.7.1/src/xen_inotify.c -@@ -463,7 +463,6 @@ xenInotifyOpen(virConnectPtr conn ATTRIB - DEBUG0("Failed to add inotify handle, disabling events"); - } - -- virConnectRef(conn); - return 0; - } - -@@ -486,7 +485,6 @@ xenInotifyClose(virConnectPtr conn) - if (priv->inotifyWatch != -1) - virEventRemoveHandle(priv->inotifyWatch); - close(priv->inotifyFD); -- virUnrefConnect(conn); - - return 0; - } -Index: libvirt-0.7.1/src/xs_internal.c -=================================================================== ---- libvirt-0.7.1.orig/src/xs_internal.c -+++ libvirt-0.7.1/src/xs_internal.c -@@ -1139,8 +1139,6 @@ int xenStoreAddWatch(virConnectPtr conn, - list->watches[n] = watch; - list->count++; - -- conn->refs++; -- - return xs_watch(priv->xshandle, watch->path, watch->token); - } - -@@ -1190,7 +1188,6 @@ int xenStoreRemoveWatch(virConnectPtr co - ; /* Failure to reduce memory allocation isn't fatal */ - } - list->count--; -- virUnrefConnect(conn); - return 0; - } - } From 8564dd97e408345caf3883c824cf30d68fc67fb3d27c0c99fe1bfbdb2067b7e0 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Fri, 20 Nov 2009 00:34:56 +0000 Subject: [PATCH 07/12] fix libvirt compilation against xen-unstable OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=22 --- detach-disk.patch | 102 ++++++++++++++++++++++++------------------- libvirt.changes | 7 +++ libvirt.spec | 7 ++- migrate-params.patch | 2 +- snapshots.patch | 4 +- xen-max-vcpus.patch | 28 ++++++++++++ xen-pv-cdrom.patch | 2 +- 7 files changed, 102 insertions(+), 50 deletions(-) create mode 100644 xen-max-vcpus.patch diff --git a/detach-disk.patch b/detach-disk.patch index 834deec..0cb3ae7 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -2,49 +2,63 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== --- libvirt-0.7.2.orig/src/xen/xend_internal.c +++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain, - return -1; - xenUnifiedLock(priv); - xref = xenStoreDomainGetDiskID(domain->conn, domain->id, -- dev->data.disk->dst); -+ dev->data.disk->dst, class); - xenUnifiedUnlock(priv); - if (xref == NULL) - return -1; -Index: libvirt-0.7.2/src/xen/xs_internal.c -=================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.c -+++ libvirt-0.7.2/src/xen/xs_internal.c -@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr - * freed by the caller. - */ - char * --xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) { -+xenStoreDomainGetDiskID(virConnectPtr conn, int id, -+ const char *dev, const char *class) { - char dir[80], path[128], **list = NULL, *val = NULL; - unsigned int devlen, len, i, num; - char *ret = NULL; -@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co - if (devlen <= 0) - return (NULL); +@@ -4087,13 +4087,12 @@ xenDaemonAttachDevice(virDomainPtr domai -- snprintf(dir, sizeof(dir), "/local/domain/0/backend/vbd/%d", id); -+ snprintf(dir, sizeof(dir), "/local/domain/0/backend/%s/%d", class, id); - list = xs_directory(priv->xshandle, 0, dir, &num); - if (list != NULL) { - for (i = 0; i < num; i++) { -Index: libvirt-0.7.2/src/xen/xs_internal.h + priv = (xenUnifiedPrivatePtr) domain->conn->privateData; + +- /* +- * on older Xen without the inactive guests management +- * avoid doing this on inactive guests +- */ +- if ((domain->id < 0) && (priv->xendConfigVersion < 3)) ++ if (domain->id < 0) { ++ virXendError(domain->conn, VIR_ERR_OPERATION_INVALID, ++ "%s", _("cannot attach device on inactive domain")); + return -1; +- ++ } ++ + if (!(def = xenDaemonDomainFetch(domain->conn, + domain->id, + domain->name, +@@ -4191,12 +4190,11 @@ xenDaemonDetachDevice(virDomainPtr domai + + priv = (xenUnifiedPrivatePtr) domain->conn->privateData; + +- /* +- * on older Xen without the inactive guests management +- * avoid doing this on inactive guests +- */ +- if ((domain->id < 0) && (priv->xendConfigVersion < 3)) ++ if (domain->id < 0) { ++ virXendError(domain->conn, VIR_ERR_OPERATION_INVALID, ++ "%s", _("cannot detach device on inactive domain")); + return -1; ++ } + + if (!(def = xenDaemonDomainFetch(domain->conn, + domain->id, +Index: libvirt-0.7.2/src/libvirt.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.h -+++ libvirt-0.7.2/src/xen/xs_internal.h -@@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo - const char *mac); - char * xenStoreDomainGetDiskID(virConnectPtr conn, - int id, -- const char *dev); -+ const char *dev, -+ const char *class); - char * xenStoreDomainGetName(virConnectPtr conn, - int id); - int xenStoreDomainGetUUID(virConnectPtr conn, +--- libvirt-0.7.2.orig/src/libvirt.c ++++ libvirt-0.7.2/src/libvirt.c +@@ -4868,7 +4868,8 @@ error: + * @domain: pointer to domain object + * @xml: pointer to XML description of one device + * +- * Create a virtual device attachment to backend. ++ * Create a virtual device attachment to backend. This function, having ++ * hotplug semantics, is only allowed on an active domain. + * + * Returns 0 in case of success, -1 in case of failure. + */ +@@ -4911,7 +4912,8 @@ error: + * @domain: pointer to domain object + * @xml: pointer to XML description of one device + * +- * Destroy a virtual device attachment to backend. ++ * Destroy a virtual device attachment to backend. This function, having ++ * hot-unplug semantics, is only allowed on an active domain. + * + * Returns 0 in case of success, -1 in case of failure. + */ diff --git a/libvirt.changes b/libvirt.changes index de22566..9e6e417 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Nov 19 16:48:36 MST 2009 - jfehlig@novell.com + +- Fix compilation against xen-unstable + xen-max-vcpus.patch +- Modify detach-disk.patch as per upstream suggestions + ------------------------------------------------------------------- Wed Nov 4 20:53:11 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 30d4bda..c39cdeb 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -95,12 +95,13 @@ Patch0: devmap-no-pkgconfig.patch Patch1: fs-ocfs2.patch Patch2: selinux-ldflags.patch Patch3: virsh-warning.patch +Patch4: xen-max-vcpus.patch +Patch5: detach-disk.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch Patch102: migrate-params.patch Patch103: xen-pv-cdrom.patch -Patch104: detach-disk.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: suse-network.patch @@ -200,11 +201,12 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 %patch100 -p1 %patch101 %patch102 -p1 %patch103 -p1 -%patch104 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 @@ -345,5 +347,6 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* %{py_sitedir}/libvirtmod* +#%attr(0755, root, root) %{_libdir}/%{name}/virt-aa-helper %changelog diff --git a/migrate-params.patch b/migrate-params.patch index fbcf3d9..62e0540 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== --- libvirt-0.7.2.orig/src/xen/xend_internal.c +++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -4491,6 +4491,8 @@ xenDaemonDomainMigratePerform (virDomain +@@ -4489,6 +4489,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/snapshots.patch b/snapshots.patch index a00c62e..a1f9822 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -452,7 +452,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5082,6 +5169,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5080,6 +5167,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -484,7 +484,7 @@ Index: libvirt-0.7.2/src/xen/xen_hypervisor.c =================================================================== --- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c +++ libvirt-0.7.2/src/xen/xen_hypervisor.c -@@ -742,6 +742,11 @@ struct xenUnifiedDriver xenHypervisorDri +@@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ diff --git a/xen-max-vcpus.patch b/xen-max-vcpus.patch new file mode 100644 index 0000000..8e40871 --- /dev/null +++ b/xen-max-vcpus.patch @@ -0,0 +1,28 @@ +commit d08067f04248c7f1bd797f4401308ea9a8971f1b +Author: Jim Fehlig +Date: Fri Nov 13 14:44:56 2009 -0700 + + xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public + headers, breaking compilation of libvirt on -unstable. Its + semanitc was retained with XEN_LEGACY_MAX_VCPUS. Ensure + MAX_VIRT_CPUS is defined accordingly. + +diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c +index 6d8bfdd..843102a 100644 +--- a/src/xen/xen_hypervisor.c ++++ b/src/xen/xen_hypervisor.c +@@ -109,6 +109,14 @@ typedef privcmd_hypercall_t hypercall_t; + #define SYS_IFACE_MIN_VERS_NUMA 4 + #endif + ++/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public ++ * headers. Its semanitc was retained with XEN_LEGACY_MAX_VCPUS. ++ * Ensure MAX_VIRT_CPUS is defined accordingly. ++ */ ++#if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS) ++#define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS ++#endif ++ + static int xen_ioctl_hypercall_cmd = 0; + static int initialized = 0; + static int in_init = 0; diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 3188ac7..c4728ae 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== --- libvirt-0.7.2.orig/src/xen/xend_internal.c +++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5324,7 +5324,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +@@ -5322,7 +5322,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { From 48020eedc52abd236b940018d70fed54a9113b80067000beff9b8decc9a94839 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 24 Nov 2009 21:18:07 +0000 Subject: [PATCH 08/12] Update to libvirt 0.7.4 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=23 --- clone.patch | 8 +- detach-disk.patch | 20 +-- devmap-no-pkgconfig.patch | 32 ----- fs-ocfs2.patch | 25 ---- libvirt-0.7.2.tar.bz2 | 3 - libvirt-0.7.4.tar.bz2 | 3 + libvirt.changes | 11 ++ libvirt.spec | 16 +-- migrate-params.patch | 8 +- selinux-ldflags.patch | 13 -- snapshots.patch | 296 ++++++++++++++++++-------------------- socat.patch | 8 +- suse-network.patch | 28 ++-- virsh-warning.patch | 19 --- xen-max-vcpus.patch | 28 ---- xen-pv-cdrom.patch | 8 +- 16 files changed, 199 insertions(+), 327 deletions(-) delete mode 100644 devmap-no-pkgconfig.patch delete mode 100644 fs-ocfs2.patch delete mode 100644 libvirt-0.7.2.tar.bz2 create mode 100644 libvirt-0.7.4.tar.bz2 delete mode 100644 selinux-ldflags.patch delete mode 100644 virsh-warning.patch delete mode 100644 xen-max-vcpus.patch diff --git a/clone.patch b/clone.patch index 7c92647..f2d33cf 100644 --- a/clone.patch +++ b/clone.patch @@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c =================================================================== --- src/lxc/lxc_container.c.orig +++ src/lxc/lxc_container.c -@@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de +@@ -813,6 +813,9 @@ int lxcContainerStart(virDomainDefPtr de lxc_child_argv_t args = { def, nveths, veths, control, ttyPath }; /* allocate a stack for the container */ @@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c if (VIR_ALLOC_N(stack, stacksize) < 0) { virReportOOMError(NULL); return -1; -@@ -810,7 +813,11 @@ int lxcContainerStart(virDomainDefPtr de +@@ -827,7 +830,11 @@ int lxcContainerStart(virDomainDefPtr de if (def->nets != NULL) flags |= CLONE_NEWNET; @@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c VIR_FREE(stack); DEBUG("clone() returned, %d", pid); -@@ -836,6 +843,7 @@ int lxcContainerAvailable(int features) +@@ -853,6 +860,7 @@ int lxcContainerAvailable(int features) char *childStack; char *stack; int childStatus; @@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c if (features & LXC_CONTAINER_FEATURE_USER) flags |= CLONE_NEWUSER; -@@ -843,14 +851,21 @@ int lxcContainerAvailable(int features) +@@ -860,14 +868,21 @@ int lxcContainerAvailable(int features) if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; diff --git a/detach-disk.patch b/detach-disk.patch index 0cb3ae7..c70c688 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -4087,13 +4087,12 @@ xenDaemonAttachDevice(virDomainPtr domai +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4109,13 +4109,12 @@ xenDaemonAttachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -21,7 +21,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, domain->name, -@@ -4191,12 +4190,11 @@ xenDaemonDetachDevice(virDomainPtr domai +@@ -4213,12 +4212,11 @@ xenDaemonDetachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -38,11 +38,11 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, -Index: libvirt-0.7.2/src/libvirt.c +Index: libvirt-0.7.4/src/libvirt.c =================================================================== ---- libvirt-0.7.2.orig/src/libvirt.c -+++ libvirt-0.7.2/src/libvirt.c -@@ -4868,7 +4868,8 @@ error: +--- libvirt-0.7.4.orig/src/libvirt.c ++++ libvirt-0.7.4/src/libvirt.c +@@ -4919,7 +4919,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * @@ -52,7 +52,7 @@ Index: libvirt-0.7.2/src/libvirt.c * * Returns 0 in case of success, -1 in case of failure. */ -@@ -4911,7 +4912,8 @@ error: +@@ -4962,7 +4963,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch deleted file mode 100644 index 78d9b22..0000000 --- a/devmap-no-pkgconfig.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: libvirt-0.7.2/configure.in -=================================================================== ---- libvirt-0.7.2.orig/configure.in -+++ libvirt-0.7.2/configure.in -@@ -1304,11 +1304,22 @@ if test "$with_storage_mpath" = "yes"; t - DEVMAPPER_REQUIRED=0.0 - DEVMAPPER_CFLAGS= - DEVMAPPER_LIBS= -- PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED, -- [], [ -- AC_MSG_ERROR( -- [You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt]) -- ]) -+ PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no]) -+ if test "$DEVMAPPER_FOUND" = "no"; then -+ # devmapper is missing pkg-config files in ubuntu, suse, etc -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ DEVMAPPER_FOUND=yes -+ AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no]) -+ AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no]) -+ DEVMAPPER_LIBS="-ldevmapper" -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ fi -+ if test "$DEVMAPPER_FOUND" = "no" ; then -+ AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt]) -+ fi -+ - fi - AC_SUBST([DEVMAPPER_CFLAGS]) - AC_SUBST([DEVMAPPER_LIBS]) diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch deleted file mode 100644 index 95e84c7..0000000 --- a/fs-ocfs2.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: libvirt-0.7.2/src/conf/storage_conf.c -=================================================================== ---- libvirt-0.7.2.orig/src/conf/storage_conf.c -+++ libvirt-0.7.2/src/conf/storage_conf.c -@@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy - VIR_STORAGE_POOL_FS_LAST, - "auto", "ext2", "ext3", - "ext4", "ufs", "iso9660", "udf", -- "gfs", "gfs2", "vfat", "hfs+", "xfs") -+ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2") - - VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, - VIR_STORAGE_POOL_NETFS_LAST, -Index: libvirt-0.7.2/src/conf/storage_conf.h -=================================================================== ---- libvirt-0.7.2.orig/src/conf/storage_conf.h -+++ libvirt-0.7.2/src/conf/storage_conf.h -@@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { - VIR_STORAGE_POOL_FS_VFAT, - VIR_STORAGE_POOL_FS_HFSPLUS, - VIR_STORAGE_POOL_FS_XFS, -+ VIR_STORAGE_POOL_FS_OCFS2, - VIR_STORAGE_POOL_FS_LAST, - }; - VIR_ENUM_DECL(virStoragePoolFormatFileSystem) diff --git a/libvirt-0.7.2.tar.bz2 b/libvirt-0.7.2.tar.bz2 deleted file mode 100644 index 9e7e304..0000000 --- a/libvirt-0.7.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:311817f34ace89ee44b09a4d4854bbc3a5c0567bf9a8e8a6772c494432f94b33 -size 5563880 diff --git a/libvirt-0.7.4.tar.bz2 b/libvirt-0.7.4.tar.bz2 new file mode 100644 index 0000000..c5fa49f --- /dev/null +++ b/libvirt-0.7.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6316a53b4cfaf184e795c7be69a371c5dc90a8a6dd6cd05c4208a1314aac10d4 +size 5692288 diff --git a/libvirt.changes b/libvirt.changes index 9e6e417..9425066 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Nov 24 10:29:03 MST 2009 - jfehlig@novell.com + +- Updated to version 0.7.4 + - Implement a node device backend using libudev + - New APIs for checking some object properties + - Fully asynchronous monitor I/O processing + - add MAC address based port filtering to qemu + - support for IPv6 / multiple addresses per interfaces + - lots of improvements and bug fixes + ------------------------------------------------------------------- Thu Nov 19 16:48:36 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index c39cdeb..26f3a4b 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.2) +# spec file for package libvirt (Version 0.7.4) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -64,7 +64,7 @@ Url: http://libvirt.org/ License: LGPL v2.1 or later Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.2 +Version: 0.7.4 Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux Requires: readline @@ -91,12 +91,7 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: devmap-no-pkgconfig.patch -Patch1: fs-ocfs2.patch -Patch2: selinux-ldflags.patch -Patch3: virsh-warning.patch -Patch4: xen-max-vcpus.patch -Patch5: detach-disk.patch +Patch0: detach-disk.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -198,11 +193,6 @@ Authors: %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %patch100 -p1 %patch101 %patch102 -p1 diff --git a/migrate-params.patch b/migrate-params.patch index 62e0540..9b1b15d 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -4489,6 +4489,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4514,6 +4514,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/selinux-ldflags.patch b/selinux-ldflags.patch deleted file mode 100644 index 7b92fce..0000000 --- a/selinux-ldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libvirt-0.7.2/src/Makefile.am -=================================================================== ---- libvirt-0.7.2.orig/src/Makefile.am -+++ libvirt-0.7.2/src/Makefile.am -@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \ - libvirt_driver_security_la_LDFLAGS = - if WITH_SECDRIVER_SELINUX - libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) -+libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) -+libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) - endif - if WITH_SECDRIVER_APPARMOR - libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) diff --git a/snapshots.patch b/snapshots.patch index a1f9822..cb9b980 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/include/libvirt/libvirt.h.in +Index: libvirt-0.7.4/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.2.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.2/include/libvirt/libvirt.h.in -@@ -561,6 +561,21 @@ int virDomainRestore +--- libvirt-0.7.4.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.4/include/libvirt/libvirt.h.in +@@ -565,6 +565,21 @@ int virDomainRestore const char *from); /* @@ -24,11 +24,11 @@ Index: libvirt-0.7.2/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.2/src/libvirt.c +Index: libvirt-0.7.4/src/libvirt.c =================================================================== ---- libvirt-0.7.2.orig/src/libvirt.c -+++ libvirt-0.7.2/src/libvirt.c -@@ -2234,6 +2234,166 @@ error: +--- libvirt-0.7.4.orig/src/libvirt.c ++++ libvirt-0.7.4/src/libvirt.c +@@ -2281,6 +2281,166 @@ error: } /** @@ -195,11 +195,11 @@ Index: libvirt-0.7.2/src/libvirt.c * virDomainCoreDump: * @domain: a domain object * @to: path for the core file -Index: libvirt-0.7.2/src/driver.h +Index: libvirt-0.7.4/src/driver.h =================================================================== ---- libvirt-0.7.2.orig/src/driver.h -+++ libvirt-0.7.2/src/driver.h -@@ -133,6 +133,21 @@ typedef int +--- libvirt-0.7.4.orig/src/driver.h ++++ libvirt-0.7.4/src/driver.h +@@ -136,6 +136,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); typedef int @@ -221,10 +221,10 @@ Index: libvirt-0.7.2/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -418,6 +433,11 @@ struct _virDriver { - virDrvNodeDeviceReAttach nodeDeviceReAttach; - virDrvNodeDeviceReset nodeDeviceReset; - virDrvDomainMigratePrepareTunnel domainMigratePrepareTunnel; +@@ -435,6 +450,11 @@ struct _virDriver { + virDrvConnectIsSecure isSecure; + virDrvDomainIsActive domainIsActive; + virDrvDomainIsPersistent domainIsPersistent; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,11 +233,11 @@ Index: libvirt-0.7.2/src/driver.h }; typedef int -Index: libvirt-0.7.2/src/xen/xen_driver.c +Index: libvirt-0.7.4/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_driver.c -+++ libvirt-0.7.2/src/xen/xen_driver.c -@@ -955,6 +955,81 @@ xenUnifiedDomainRestore (virConnectPtr c +--- libvirt-0.7.4.orig/src/xen/xen_driver.c ++++ libvirt-0.7.4/src/xen/xen_driver.c +@@ -1052,6 +1052,81 @@ xenUnifiedDomainRestore (virConnectPtr c } static int @@ -319,23 +319,11 @@ Index: libvirt-0.7.2/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1726,6 +1801,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedNodeDeviceReAttach, /* nodeDeviceReAttach */ - xenUnifiedNodeDeviceReset, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ -+ xenUnifiedDomainSnapshotCreate, -+ xenUnifiedDomainSnapshotApply, -+ xenUnifiedDomainSnapshotDelete, -+ xenUnifiedDomainNumOfSnapshots, -+ xenUnifiedDomainListSnapshots, - }; - - /** -Index: libvirt-0.7.2/src/xen/xen_driver.h +Index: libvirt-0.7.4/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_driver.h -+++ libvirt-0.7.2/src/xen/xen_driver.h -@@ -98,6 +98,11 @@ struct xenUnifiedDriver { +--- libvirt-0.7.4.orig/src/xen/xen_driver.h ++++ libvirt-0.7.4/src/xen/xen_driver.h +@@ -100,6 +100,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; virDrvDomainSetSchedulerParameters domainSetSchedulerParameters; @@ -347,10 +335,10 @@ Index: libvirt-0.7.2/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +352,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3257,6 +3263,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3268,6 +3274,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +440,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5080,6 +5167,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5115,6 +5202,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,11 +452,11 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.2/src/xen/proxy_internal.c +Index: libvirt-0.7.4/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.2/src/xen/proxy_internal.c -@@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver = +--- libvirt-0.7.4.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.4/src/xen/proxy_internal.c +@@ -83,6 +83,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ NULL, /* domainSetSchedulerParameters */ @@ -480,10 +468,10 @@ Index: libvirt-0.7.2/src/xen/proxy_internal.c }; -Index: libvirt-0.7.2/src/xen/xen_hypervisor.c +Index: libvirt-0.7.4/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.2/src/xen/xen_hypervisor.c +--- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.4/src/xen/xen_hypervisor.c @@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ @@ -496,10 +484,10 @@ Index: libvirt-0.7.2/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.2/src/xen/xm_internal.c +Index: libvirt-0.7.4/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xm_internal.c -+++ libvirt-0.7.2/src/xen/xm_internal.c +--- libvirt-0.7.4.orig/src/xen/xm_internal.c ++++ libvirt-0.7.4/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +500,10 @@ Index: libvirt-0.7.2/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.2/src/xen/xs_internal.c +Index: libvirt-0.7.4/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.c -+++ libvirt-0.7.2/src/xen/xs_internal.c +--- libvirt-0.7.4.orig/src/xen/xs_internal.c ++++ libvirt-0.7.4/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,11 +516,11 @@ Index: libvirt-0.7.2/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.2/tools/virsh.c +Index: libvirt-0.7.4/tools/virsh.c =================================================================== ---- libvirt-0.7.2.orig/tools/virsh.c -+++ libvirt-0.7.2/tools/virsh.c -@@ -1168,6 +1168,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.4.orig/tools/virsh.c ++++ libvirt-0.7.4/tools/virsh.c +@@ -1179,6 +1179,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } /* @@ -721,7 +709,7 @@ Index: libvirt-0.7.2/tools/virsh.c * "schedinfo" command */ static const vshCmdInfo info_schedinfo[] = { -@@ -7273,6 +7455,12 @@ static const vshCmdDef commands[] = { +@@ -7298,6 +7480,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +722,14 @@ Index: libvirt-0.7.2/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.2/src/lxc/lxc_driver.c +Index: libvirt-0.7.4/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.2/src/lxc/lxc_driver.c -@@ -2324,6 +2324,11 @@ static virDriver lxcDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.4/src/lxc/lxc_driver.c +@@ -2404,6 +2404,11 @@ static virDriver lxcDriver = { + lxcIsSecure, + lxcDomainIsActive, + lxcDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +738,14 @@ Index: libvirt-0.7.2/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.2/src/openvz/openvz_driver.c +Index: libvirt-0.7.4/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.2/src/openvz/openvz_driver.c -@@ -1433,6 +1433,11 @@ static virDriver openvzDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.4/src/openvz/openvz_driver.c +@@ -1534,6 +1534,11 @@ static virDriver openvzDriver = { + openvzIsSecure, + openvzDomainIsActive, + openvzDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +754,14 @@ Index: libvirt-0.7.2/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.2/src/qemu/qemu_driver.c +Index: libvirt-0.7.4/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.2/src/qemu/qemu_driver.c -@@ -7136,6 +7136,11 @@ static virDriver qemuDriver = { - qemudNodeDeviceReAttach, /* nodeDeviceReAttach */ - qemudNodeDeviceReset, /* nodeDeviceReset */ - qemudDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.4/src/qemu/qemu_driver.c +@@ -7559,6 +7559,11 @@ static virDriver qemuDriver = { + qemuIsSecure, + qemuDomainIsActive, + qemuDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,14 +770,14 @@ Index: libvirt-0.7.2/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.2/src/esx/esx_driver.c +Index: libvirt-0.7.4/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/esx/esx_driver.c -+++ libvirt-0.7.2/src/esx/esx_driver.c -@@ -3275,6 +3275,11 @@ static virDriver esxDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/esx/esx_driver.c ++++ libvirt-0.7.4/src/esx/esx_driver.c +@@ -3425,6 +3425,11 @@ static virDriver esxDriver = { + esxIsSecure, /* isSecure */ + esxDomainIsActive, /* domainIsActive */ + esxDomainIsPersistent, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -798,14 +786,14 @@ Index: libvirt-0.7.2/src/esx/esx_driver.c }; -Index: libvirt-0.7.2/src/test/test_driver.c +Index: libvirt-0.7.4/src/test/test_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/test/test_driver.c -+++ libvirt-0.7.2/src/test/test_driver.c -@@ -4558,6 +4558,11 @@ static virDriver testDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/test/test_driver.c ++++ libvirt-0.7.4/src/test/test_driver.c +@@ -5233,6 +5233,11 @@ static virDriver testDriver = { + testIsSecure, /* isEncrypted */ + testDomainIsActive, /* domainIsActive */ + testDomainIsPersistent, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,14 +802,14 @@ Index: libvirt-0.7.2/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.2/src/uml/uml_driver.c +Index: libvirt-0.7.4/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/uml/uml_driver.c -+++ libvirt-0.7.2/src/uml/uml_driver.c -@@ -1862,6 +1862,11 @@ static virDriver umlDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/uml/uml_driver.c ++++ libvirt-0.7.4/src/uml/uml_driver.c +@@ -1888,6 +1888,11 @@ static virDriver umlDriver = { + umlIsSecure, + umlDomainIsActive, + umlDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -830,14 +818,14 @@ Index: libvirt-0.7.2/src/uml/uml_driver.c }; -Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c +Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c =================================================================== ---- libvirt-0.7.2.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.2/src/vbox/vbox_tmpl.c -@@ -6468,6 +6468,11 @@ virDriver NAME(Driver) = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.4/src/vbox/vbox_tmpl.c +@@ -6571,6 +6571,11 @@ virDriver NAME(Driver) = { + vboxIsSecure, + vboxDomainIsActive, + vboxDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -846,14 +834,14 @@ Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c }; virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.2/src/opennebula/one_driver.c +Index: libvirt-0.7.4/src/opennebula/one_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.2/src/opennebula/one_driver.c -@@ -788,6 +788,11 @@ static virDriver oneDriver = { - NULL, /* nodeDeviceReAttach; */ - NULL, /* nodeDeviceReset; */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.4/src/opennebula/one_driver.c +@@ -781,6 +781,11 @@ static virDriver oneDriver = { + oneIsSecure, + NULL, /* domainIsActive */ + NULL, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -862,14 +850,14 @@ Index: libvirt-0.7.2/src/opennebula/one_driver.c }; static virStateDriver oneStateDriver = { -Index: libvirt-0.7.2/src/phyp/phyp_driver.c +Index: libvirt-0.7.4/src/phyp/phyp_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.2/src/phyp/phyp_driver.c -@@ -1378,6 +1378,11 @@ virDriver phypDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.4/src/phyp/phyp_driver.c +@@ -1650,6 +1650,11 @@ virDriver phypDriver = { + phypIsSecure, + NULL, /* domainIsActive */ + NULL, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -878,14 +866,14 @@ Index: libvirt-0.7.2/src/phyp/phyp_driver.c }; int -Index: libvirt-0.7.2/src/remote/remote_driver.c +Index: libvirt-0.7.4/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/remote/remote_driver.c -+++ libvirt-0.7.2/src/remote/remote_driver.c -@@ -8466,6 +8466,11 @@ static virDriver remote_driver = { - remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ - remoteNodeDeviceReset, /* nodeDeviceReset */ - remoteDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/remote/remote_driver.c ++++ libvirt-0.7.4/src/remote/remote_driver.c +@@ -8847,6 +8847,11 @@ static virDriver remote_driver = { + remoteIsSecure, /* isSecure */ + remoteDomainIsActive, /* domainIsActive */ + remoteDomainIsPersistent, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -894,11 +882,11 @@ Index: libvirt-0.7.2/src/remote/remote_driver.c }; static virNetworkDriver network_driver = { -Index: libvirt-0.7.2/docs/libvirt-api.xml +Index: libvirt-0.7.4/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.2.orig/docs/libvirt-api.xml -+++ libvirt-0.7.2/docs/libvirt-api.xml -@@ -262,6 +262,11 @@ +--- libvirt-0.7.4.orig/docs/libvirt-api.xml ++++ libvirt-0.7.4/docs/libvirt-api.xml +@@ -271,6 +271,11 @@ @@ -910,7 +898,7 @@ Index: libvirt-0.7.2/docs/libvirt-api.xml -@@ -1817,6 +1822,36 @@ This function may requires privileged ac +@@ -1878,6 +1883,36 @@ This function may requires privileged ac @@ -947,10 +935,10 @@ Index: libvirt-0.7.2/docs/libvirt-api.xml -Index: libvirt-0.7.2/src/libvirt_public.syms +Index: libvirt-0.7.4/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.2.orig/src/libvirt_public.syms -+++ libvirt-0.7.2/src/libvirt_public.syms +--- libvirt-0.7.4.orig/src/libvirt_public.syms ++++ libvirt-0.7.4/src/libvirt_public.syms @@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { LIBVIRT_0.4.5 { global: @@ -963,11 +951,11 @@ Index: libvirt-0.7.2/src/libvirt_public.syms } LIBVIRT_0.4.2; LIBVIRT_0.5.0 { -Index: libvirt-0.7.2/python/generator.py +Index: libvirt-0.7.4/python/generator.py =================================================================== ---- libvirt-0.7.2.orig/python/generator.py -+++ libvirt-0.7.2/python/generator.py -@@ -286,6 +286,7 @@ skip_impl = ( +--- libvirt-0.7.4.orig/python/generator.py ++++ libvirt-0.7.4/python/generator.py +@@ -287,6 +287,7 @@ skip_impl = ( 'virDomainSetSchedulerParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', @@ -975,11 +963,11 @@ Index: libvirt-0.7.2/python/generator.py 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', -Index: libvirt-0.7.2/python/libvirt-override.c +Index: libvirt-0.7.4/python/libvirt-override.c =================================================================== ---- libvirt-0.7.2.orig/python/libvirt-override.c -+++ libvirt-0.7.2/python/libvirt-override.c -@@ -1375,6 +1375,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.4.orig/python/libvirt-override.c ++++ libvirt-0.7.4/python/libvirt-override.c +@@ -1400,6 +1400,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1014,7 +1002,7 @@ Index: libvirt-0.7.2/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2425,6 +2453,7 @@ static PyMethodDef libvirtMethods[] = { +@@ -2557,6 +2585,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, @@ -1022,11 +1010,11 @@ Index: libvirt-0.7.2/python/libvirt-override.c {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.2/python/libvirt-override-api.xml +Index: libvirt-0.7.4/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.2.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.2/python/libvirt-override-api.xml -@@ -135,6 +135,11 @@ +--- libvirt-0.7.4.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.4/python/libvirt-override-api.xml +@@ -140,6 +140,11 @@ @@ -1038,11 +1026,11 @@ Index: libvirt-0.7.2/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.2/src/xen/xen_inotify.c +Index: libvirt-0.7.4/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.2/src/xen/xen_inotify.c -@@ -88,6 +88,11 @@ struct xenUnifiedDriver xenInotifyDriver +--- libvirt-0.7.4.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.4/src/xen/xen_inotify.c +@@ -86,6 +86,11 @@ struct xenUnifiedDriver xenInotifyDriver NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ NULL, /* domainSetSchedulerParameters */ diff --git a/socat.patch b/socat.patch index de709b7..f1d9c14 100644 --- a/socat.patch +++ b/socat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/remote/remote_driver.c +Index: libvirt-0.7.4/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/remote/remote_driver.c -+++ libvirt-0.7.2/src/remote/remote_driver.c -@@ -760,12 +760,29 @@ doRemoteOpen (virConnectPtr conn, +--- libvirt-0.7.4.orig/src/remote/remote_driver.c ++++ libvirt-0.7.4/src/remote/remote_driver.c +@@ -763,12 +763,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } cmd_argv[j++] = strdup (priv->hostname); diff --git a/suse-network.patch b/suse-network.patch index 9e9767f..5a1146c 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/conf/network_conf.c +Index: libvirt-0.7.4/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.2.orig/src/conf/network_conf.c -+++ libvirt-0.7.2/src/conf/network_conf.c -@@ -824,6 +824,137 @@ error: +--- libvirt-0.7.4.orig/src/conf/network_conf.c ++++ libvirt-0.7.4/src/conf/network_conf.c +@@ -865,6 +865,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.2/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -863,6 +994,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -904,6 +1035,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,11 +148,11 @@ Index: libvirt-0.7.2/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.2/src/conf/network_conf.h +Index: libvirt-0.7.4/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.2.orig/src/conf/network_conf.h -+++ libvirt-0.7.2/src/conf/network_conf.h -@@ -92,6 +92,7 @@ struct _virNetworkObj { +--- libvirt-0.7.4.orig/src/conf/network_conf.h ++++ libvirt-0.7.4/src/conf/network_conf.h +@@ -94,6 +94,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; unsigned int persistent : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.2/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.2/src/network/bridge_driver.c +Index: libvirt-0.7.4/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/network/bridge_driver.c -+++ libvirt-0.7.2/src/network/bridge_driver.c -@@ -977,6 +977,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.4.orig/src/network/bridge_driver.c ++++ libvirt-0.7.4/src/network/bridge_driver.c +@@ -994,6 +994,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.2/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1433,6 +1438,12 @@ static int networkSetAutostart(virNetwor +@@ -1494,6 +1499,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/virsh-warning.patch b/virsh-warning.patch deleted file mode 100644 index 69da082..0000000 --- a/virsh-warning.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 -Author: Jim Fehlig -Date: Mon Oct 19 13:53:40 2009 -0600 - - Remove extra arg in call to vshError() - -Index: libvirt-0.7.2/tools/virsh.c -=================================================================== ---- libvirt-0.7.2.orig/tools/virsh.c -+++ libvirt-0.7.2/tools/virsh.c -@@ -2510,7 +2510,7 @@ cmdMigrate (vshControl *ctl, const vshCm - * a libvirt URI, or a hypervisor specific URI. */ - - if (migrateuri != NULL) { -- vshError(ctl, FALSE, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); -+ vshError(ctl, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); - goto done; - } - diff --git a/xen-max-vcpus.patch b/xen-max-vcpus.patch deleted file mode 100644 index 8e40871..0000000 --- a/xen-max-vcpus.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit d08067f04248c7f1bd797f4401308ea9a8971f1b -Author: Jim Fehlig -Date: Fri Nov 13 14:44:56 2009 -0700 - - xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public - headers, breaking compilation of libvirt on -unstable. Its - semanitc was retained with XEN_LEGACY_MAX_VCPUS. Ensure - MAX_VIRT_CPUS is defined accordingly. - -diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c -index 6d8bfdd..843102a 100644 ---- a/src/xen/xen_hypervisor.c -+++ b/src/xen/xen_hypervisor.c -@@ -109,6 +109,14 @@ typedef privcmd_hypercall_t hypercall_t; - #define SYS_IFACE_MIN_VERS_NUMA 4 - #endif - -+/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public -+ * headers. Its semanitc was retained with XEN_LEGACY_MAX_VCPUS. -+ * Ensure MAX_VIRT_CPUS is defined accordingly. -+ */ -+#if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS) -+#define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS -+#endif -+ - static int xen_ioctl_hypercall_cmd = 0; - static int initialized = 0; - static int in_init = 0; diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index c4728ae..e732f9c 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5322,7 +5322,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -5357,7 +5357,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { From f43c97a7dcacf994523c94b39c4156c8beedf2202a674430d56a50b9c94763fc Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 25 Nov 2009 00:52:16 +0000 Subject: [PATCH 09/12] Fix listing of defined but inactive Xen domains OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=24 --- libvirt.changes | 6 ++++++ libvirt.spec | 4 +++- snapshots.patch | 2 +- xen-list-defined.patch | 20 ++++++++++++++++++++ xen-pv-cdrom.patch | 2 +- 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 xen-list-defined.patch diff --git a/libvirt.changes b/libvirt.changes index 9425066..e9b0146 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 24 17:46:08 MST 2009 - jfehlig@novell.com + +- Fix listing of defined but inactive Xen domains + xen-list-defined.patch + ------------------------------------------------------------------- Tue Nov 24 10:29:03 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 26f3a4b..e926eb0 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -91,7 +91,8 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: detach-disk.patch +Patch0: xen-list-defined.patch +Patch1: detach-disk.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -193,6 +194,7 @@ Authors: %prep %setup -q %patch0 -p1 +%patch1 -p1 %patch100 -p1 %patch101 %patch102 -p1 diff --git a/snapshots.patch b/snapshots.patch index cb9b980..988a733 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -440,7 +440,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5115,6 +5202,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5116,6 +5203,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ diff --git a/xen-list-defined.patch b/xen-list-defined.patch new file mode 100644 index 0000000..0a75e30 --- /dev/null +++ b/xen-list-defined.patch @@ -0,0 +1,20 @@ +Index: libvirt-0.7.4/src/xen/xend_internal.c +=================================================================== +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4693,13 +4693,14 @@ xenDaemonListDefinedDomains(virConnectPt + } + + if (ret >= maxnames) +- break; ++ goto out; + } + + error: + for (i = 0; i < ret; ++i) + VIR_FREE(names[i]); + ++out: + sexpr_free(root); + return(ret); + } diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index e732f9c..7a9498a 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== --- libvirt-0.7.4.orig/src/xen/xend_internal.c +++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -5357,7 +5357,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +@@ -5358,7 +5358,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { From e07dd7f89946d8220582188859252c852a46025c82004dacfbb4d48ee08c7044 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 7 Dec 2009 22:08:05 +0000 Subject: [PATCH 10/12] Plumb domain description in xend backend OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=25 --- libvirt.changes | 6 ++++++ libvirt.spec | 2 ++ migrate-params.patch | 2 +- snapshots.patch | 16 +++++++++++++-- xen-list-defined.patch | 42 ++++++++++++++++++++++++++------------ xen-pv-cdrom.patch | 2 +- xend-description-tag.patch | 36 ++++++++++++++++++++++++++++++++ 7 files changed, 89 insertions(+), 17 deletions(-) create mode 100644 xend-description-tag.patch diff --git a/libvirt.changes b/libvirt.changes index e9b0146..3eb631f 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 7 14:51:36 MST 2009 - jfehlig@novell.com + +- Plumb domain description in xend backend + xend-description-tag.patch + ------------------------------------------------------------------- Tue Nov 24 17:46:08 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index e926eb0..f9f8dd9 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -93,6 +93,7 @@ Source1: libvirtd.init # Upstream patches Patch0: xen-list-defined.patch Patch1: detach-disk.patch +Patch2: xend-description-tag.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -195,6 +196,7 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch100 -p1 %patch101 %patch102 -p1 diff --git a/migrate-params.patch b/migrate-params.patch index 9b1b15d..2720c04 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== --- libvirt-0.7.4.orig/src/xen/xend_internal.c +++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4514,6 +4514,8 @@ xenDaemonDomainMigratePerform (virDomain +@@ -4517,6 +4517,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/snapshots.patch b/snapshots.patch index 988a733..72fd6de 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -319,6 +319,18 @@ Index: libvirt-0.7.4/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); +@@ -1860,6 +1935,11 @@ static virDriver xenUnifiedDriver = { + xenUnifiedIsSecure, + xenUnifiedDomainIsActive, + xenUnifiedDomainisPersistent, ++ xenUnifiedDomainSnapshotCreate, ++ xenUnifiedDomainSnapshotApply, ++ xenUnifiedDomainSnapshotDelete, ++ xenUnifiedDomainNumOfSnapshots, ++ xenUnifiedDomainListSnapshots, + }; + + /** Index: libvirt-0.7.4/src/xen/xen_driver.h =================================================================== --- libvirt-0.7.4.orig/src/xen/xen_driver.h @@ -352,7 +364,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3268,6 +3274,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3271,6 +3277,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -440,7 +452,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5116,6 +5203,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5123,6 +5210,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ diff --git a/xen-list-defined.patch b/xen-list-defined.patch index 0a75e30..8b5cc01 100644 --- a/xen-list-defined.patch +++ b/xen-list-defined.patch @@ -1,20 +1,36 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c -=================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4693,13 +4693,14 @@ xenDaemonListDefinedDomains(virConnectPt - } - - if (ret >= maxnames) -- break; -+ goto out; +commit 7cfbb17978c467625afab866b7a22119789abee0 +Author: Matthias Bolte +Date: Thu Nov 26 00:09:40 2009 +0100 + + xen: Fix unconditional freeing in xenDaemonListDefinedDomains() + + Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of + the names array to be freed even on success, resulting in no listing of + defined but inactive Xen domains. + + Spotted by Jim Fehlig + +diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c +index e370eb8..4d9dcd1 100644 +--- a/src/xen/xend_internal.c ++++ b/src/xen/xend_internal.c +@@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames + break; } ++cleanup: ++ sexpr_free(root); ++ return(ret); ++ error: for (i = 0; i < ret; ++i) VIR_FREE(names[i]); -+out: - sexpr_free(root); - return(ret); +- sexpr_free(root); +- return(ret); ++ ret = -1; ++ ++ goto cleanup; } + + /** diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 7a9498a..87e6ca6 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== --- libvirt-0.7.4.orig/src/xen/xend_internal.c +++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -5358,7 +5358,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +@@ -5365,7 +5365,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xend-description-tag.patch b/xend-description-tag.patch new file mode 100644 index 0000000..cd0ef24 --- /dev/null +++ b/xend-description-tag.patch @@ -0,0 +1,36 @@ +From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001 +From: Jim Fehlig +Date: Mon, 7 Dec 2009 14:24:21 -0700 +Subject: [PATCH] Plumb domain description tag in xend backend + +xen-unstable changesets 20321 and 20521 added support for +description in xend domain config. This patch extends that +support in xend backend. +--- + src/xen/xend_internal.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +Index: libvirt-0.7.4/src/xen/xend_internal.c +=================================================================== +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn, + } + virUUIDParse(tmp, def->uuid); + ++ if (sexpr_node_copy(root, "domain/description", &def->description) < 0) ++ goto no_memory; ++ + hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0; + if (!hvm) { + if (sexpr_node_copy(root, "domain/bootloader", +@@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn, + virUUIDFormat(def->uuid, uuidstr); + virBufferVSprintf(&buf, "(uuid '%s')", uuidstr); + ++ if (def->description) ++ virBufferVSprintf(&buf, "(description '%s')", def->description); ++ + if (def->os.bootloader) { + if (def->os.bootloader[0]) + virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader); From 0aef316e617b05e952c28322b02ba86d959c7353bfd44fed55a9fc5dc642b27e Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 11 Dec 2009 15:19:28 +0000 Subject: [PATCH 11/12] checked in OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=26 --- clone.patch | 8 +- detach-disk.patch | 108 ++++++-------- devmap-no-pkgconfig.patch | 32 ++++ fs-ocfs2.patch | 25 ++++ libvirt-0.7.2.tar.bz2 | 3 + libvirt-0.7.4.tar.bz2 | 3 - libvirt.changes | 35 ----- libvirt.spec | 19 ++- migrate-params.patch | 8 +- selinux-ldflags.patch | 13 ++ snapshots.patch | 294 ++++++++++++++++++------------------- socat.patch | 8 +- suse-network.patch | 28 ++-- virsh-warning.patch | 19 +++ xen-list-defined.patch | 36 ----- xen-pv-cdrom.patch | 8 +- xend-description-tag.patch | 36 ----- 17 files changed, 327 insertions(+), 356 deletions(-) create mode 100644 devmap-no-pkgconfig.patch create mode 100644 fs-ocfs2.patch create mode 100644 libvirt-0.7.2.tar.bz2 delete mode 100644 libvirt-0.7.4.tar.bz2 create mode 100644 selinux-ldflags.patch create mode 100644 virsh-warning.patch delete mode 100644 xen-list-defined.patch delete mode 100644 xend-description-tag.patch diff --git a/clone.patch b/clone.patch index f2d33cf..7c92647 100644 --- a/clone.patch +++ b/clone.patch @@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c =================================================================== --- src/lxc/lxc_container.c.orig +++ src/lxc/lxc_container.c -@@ -813,6 +813,9 @@ int lxcContainerStart(virDomainDefPtr de +@@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de lxc_child_argv_t args = { def, nveths, veths, control, ttyPath }; /* allocate a stack for the container */ @@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c if (VIR_ALLOC_N(stack, stacksize) < 0) { virReportOOMError(NULL); return -1; -@@ -827,7 +830,11 @@ int lxcContainerStart(virDomainDefPtr de +@@ -810,7 +813,11 @@ int lxcContainerStart(virDomainDefPtr de if (def->nets != NULL) flags |= CLONE_NEWNET; @@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c VIR_FREE(stack); DEBUG("clone() returned, %d", pid); -@@ -853,6 +860,7 @@ int lxcContainerAvailable(int features) +@@ -836,6 +843,7 @@ int lxcContainerAvailable(int features) char *childStack; char *stack; int childStatus; @@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c if (features & LXC_CONTAINER_FEATURE_USER) flags |= CLONE_NEWUSER; -@@ -860,14 +868,21 @@ int lxcContainerAvailable(int features) +@@ -843,14 +851,21 @@ int lxcContainerAvailable(int features) if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; diff --git a/detach-disk.patch b/detach-disk.patch index c70c688..834deec 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,64 +1,50 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4109,13 +4109,12 @@ xenDaemonAttachDevice(virDomainPtr domai - - priv = (xenUnifiedPrivatePtr) domain->conn->privateData; - -- /* -- * on older Xen without the inactive guests management -- * avoid doing this on inactive guests -- */ -- if ((domain->id < 0) && (priv->xendConfigVersion < 3)) -+ if (domain->id < 0) { -+ virXendError(domain->conn, VIR_ERR_OPERATION_INVALID, -+ "%s", _("cannot attach device on inactive domain")); - return -1; -- -+ } -+ - if (!(def = xenDaemonDomainFetch(domain->conn, - domain->id, - domain->name, -@@ -4213,12 +4212,11 @@ xenDaemonDetachDevice(virDomainPtr domai - - priv = (xenUnifiedPrivatePtr) domain->conn->privateData; - -- /* -- * on older Xen without the inactive guests management -- * avoid doing this on inactive guests -- */ -- if ((domain->id < 0) && (priv->xendConfigVersion < 3)) -+ if (domain->id < 0) { -+ virXendError(domain->conn, VIR_ERR_OPERATION_INVALID, -+ "%s", _("cannot detach device on inactive domain")); - return -1; -+ } - - if (!(def = xenDaemonDomainFetch(domain->conn, - domain->id, -Index: libvirt-0.7.4/src/libvirt.c +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain, + return -1; + xenUnifiedLock(priv); + xref = xenStoreDomainGetDiskID(domain->conn, domain->id, +- dev->data.disk->dst); ++ dev->data.disk->dst, class); + xenUnifiedUnlock(priv); + if (xref == NULL) + return -1; +Index: libvirt-0.7.2/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/libvirt.c -+++ libvirt-0.7.4/src/libvirt.c -@@ -4919,7 +4919,8 @@ error: - * @domain: pointer to domain object - * @xml: pointer to XML description of one device - * -- * Create a virtual device attachment to backend. -+ * Create a virtual device attachment to backend. This function, having -+ * hotplug semantics, is only allowed on an active domain. - * - * Returns 0 in case of success, -1 in case of failure. - */ -@@ -4962,7 +4963,8 @@ error: - * @domain: pointer to domain object - * @xml: pointer to XML description of one device - * -- * Destroy a virtual device attachment to backend. -+ * Destroy a virtual device attachment to backend. This function, having -+ * hot-unplug semantics, is only allowed on an active domain. - * - * Returns 0 in case of success, -1 in case of failure. +--- libvirt-0.7.2.orig/src/xen/xs_internal.c ++++ libvirt-0.7.2/src/xen/xs_internal.c +@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr + * freed by the caller. */ + char * +-xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) { ++xenStoreDomainGetDiskID(virConnectPtr conn, int id, ++ const char *dev, const char *class) { + char dir[80], path[128], **list = NULL, *val = NULL; + unsigned int devlen, len, i, num; + char *ret = NULL; +@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co + if (devlen <= 0) + return (NULL); + +- snprintf(dir, sizeof(dir), "/local/domain/0/backend/vbd/%d", id); ++ snprintf(dir, sizeof(dir), "/local/domain/0/backend/%s/%d", class, id); + list = xs_directory(priv->xshandle, 0, dir, &num); + if (list != NULL) { + for (i = 0; i < num; i++) { +Index: libvirt-0.7.2/src/xen/xs_internal.h +=================================================================== +--- libvirt-0.7.2.orig/src/xen/xs_internal.h ++++ libvirt-0.7.2/src/xen/xs_internal.h +@@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo + const char *mac); + char * xenStoreDomainGetDiskID(virConnectPtr conn, + int id, +- const char *dev); ++ const char *dev, ++ const char *class); + char * xenStoreDomainGetName(virConnectPtr conn, + int id); + int xenStoreDomainGetUUID(virConnectPtr conn, diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch new file mode 100644 index 0000000..78d9b22 --- /dev/null +++ b/devmap-no-pkgconfig.patch @@ -0,0 +1,32 @@ +Index: libvirt-0.7.2/configure.in +=================================================================== +--- libvirt-0.7.2.orig/configure.in ++++ libvirt-0.7.2/configure.in +@@ -1304,11 +1304,22 @@ if test "$with_storage_mpath" = "yes"; t + DEVMAPPER_REQUIRED=0.0 + DEVMAPPER_CFLAGS= + DEVMAPPER_LIBS= +- PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED, +- [], [ +- AC_MSG_ERROR( +- [You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt]) +- ]) ++ PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no]) ++ if test "$DEVMAPPER_FOUND" = "no"; then ++ # devmapper is missing pkg-config files in ubuntu, suse, etc ++ save_LIBS="$LIBS" ++ save_CFLAGS="$CFLAGS" ++ DEVMAPPER_FOUND=yes ++ AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no]) ++ AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no]) ++ DEVMAPPER_LIBS="-ldevmapper" ++ LIBS="$save_LIBS" ++ CFLAGS="$save_CFLAGS" ++ fi ++ if test "$DEVMAPPER_FOUND" = "no" ; then ++ AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt]) ++ fi ++ + fi + AC_SUBST([DEVMAPPER_CFLAGS]) + AC_SUBST([DEVMAPPER_LIBS]) diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch new file mode 100644 index 0000000..95e84c7 --- /dev/null +++ b/fs-ocfs2.patch @@ -0,0 +1,25 @@ +Index: libvirt-0.7.2/src/conf/storage_conf.c +=================================================================== +--- libvirt-0.7.2.orig/src/conf/storage_conf.c ++++ libvirt-0.7.2/src/conf/storage_conf.c +@@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy + VIR_STORAGE_POOL_FS_LAST, + "auto", "ext2", "ext3", + "ext4", "ufs", "iso9660", "udf", +- "gfs", "gfs2", "vfat", "hfs+", "xfs") ++ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2") + + VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, + VIR_STORAGE_POOL_NETFS_LAST, +Index: libvirt-0.7.2/src/conf/storage_conf.h +=================================================================== +--- libvirt-0.7.2.orig/src/conf/storage_conf.h ++++ libvirt-0.7.2/src/conf/storage_conf.h +@@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { + VIR_STORAGE_POOL_FS_VFAT, + VIR_STORAGE_POOL_FS_HFSPLUS, + VIR_STORAGE_POOL_FS_XFS, ++ VIR_STORAGE_POOL_FS_OCFS2, + VIR_STORAGE_POOL_FS_LAST, + }; + VIR_ENUM_DECL(virStoragePoolFormatFileSystem) diff --git a/libvirt-0.7.2.tar.bz2 b/libvirt-0.7.2.tar.bz2 new file mode 100644 index 0000000..9e7e304 --- /dev/null +++ b/libvirt-0.7.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311817f34ace89ee44b09a4d4854bbc3a5c0567bf9a8e8a6772c494432f94b33 +size 5563880 diff --git a/libvirt-0.7.4.tar.bz2 b/libvirt-0.7.4.tar.bz2 deleted file mode 100644 index c5fa49f..0000000 --- a/libvirt-0.7.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6316a53b4cfaf184e795c7be69a371c5dc90a8a6dd6cd05c4208a1314aac10d4 -size 5692288 diff --git a/libvirt.changes b/libvirt.changes index 3eb631f..7186c90 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,38 +1,3 @@ -------------------------------------------------------------------- -Mon Dec 7 14:51:36 MST 2009 - jfehlig@novell.com - -- Plumb domain description in xend backend - xend-description-tag.patch - -------------------------------------------------------------------- -Tue Nov 24 17:46:08 MST 2009 - jfehlig@novell.com - -- Fix listing of defined but inactive Xen domains - xen-list-defined.patch - -------------------------------------------------------------------- -Tue Nov 24 10:29:03 MST 2009 - jfehlig@novell.com - -- Updated to version 0.7.4 - - Implement a node device backend using libudev - - New APIs for checking some object properties - - Fully asynchronous monitor I/O processing - - add MAC address based port filtering to qemu - - support for IPv6 / multiple addresses per interfaces - - lots of improvements and bug fixes - -------------------------------------------------------------------- -Thu Nov 19 16:48:36 MST 2009 - jfehlig@novell.com - -- Fix compilation against xen-unstable - xen-max-vcpus.patch -- Modify detach-disk.patch as per upstream suggestions - -------------------------------------------------------------------- -Wed Nov 4 20:53:11 MDT 2009 - jfehlig@novell.com - -- spec file: Fix polkit vs PolicyKit Requires - ------------------------------------------------------------------- Mon Oct 19 14:13:47 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index f9f8dd9..761f9b5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.4) +# spec file for package libvirt (Version 0.7.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -64,8 +64,8 @@ Url: http://libvirt.org/ License: LGPL v2.1 or later Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.4 -Release: 3 +Version: 0.7.2 +Release: 1 Summary: A C toolkit to interract with the virtualization capabilities of Linux Requires: readline Requires: ncurses @@ -83,7 +83,7 @@ Requires: socat Requires: open-iscsi Requires: nfs-client Requires: hal -%if 0%{?suse_version} > 1110 +%if 0%{?suse_version} > 1100 Requires: polkit >= 0.9 %else Requires: PolicyKit >= 0.6 @@ -91,14 +91,16 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: xen-list-defined.patch -Patch1: detach-disk.patch -Patch2: xend-description-tag.patch +Patch0: devmap-no-pkgconfig.patch +Patch1: fs-ocfs2.patch +Patch2: selinux-ldflags.patch +Patch3: virsh-warning.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch Patch102: migrate-params.patch Patch103: xen-pv-cdrom.patch +Patch104: detach-disk.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: suse-network.patch @@ -197,10 +199,12 @@ Authors: %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch100 -p1 %patch101 %patch102 -p1 %patch103 -p1 +%patch104 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 @@ -341,6 +345,5 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* %{py_sitedir}/libvirtmod* -#%attr(0755, root, root) %{_libdir}/%{name}/virt-aa-helper %changelog diff --git a/migrate-params.patch b/migrate-params.patch index 2720c04..fbcf3d9 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4517,6 +4517,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -4491,6 +4491,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/selinux-ldflags.patch b/selinux-ldflags.patch new file mode 100644 index 0000000..7b92fce --- /dev/null +++ b/selinux-ldflags.patch @@ -0,0 +1,13 @@ +Index: libvirt-0.7.2/src/Makefile.am +=================================================================== +--- libvirt-0.7.2.orig/src/Makefile.am ++++ libvirt-0.7.2/src/Makefile.am +@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \ + libvirt_driver_security_la_LDFLAGS = + if WITH_SECDRIVER_SELINUX + libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) ++libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) ++libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) + endif + if WITH_SECDRIVER_APPARMOR + libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) diff --git a/snapshots.patch b/snapshots.patch index 72fd6de..a00c62e 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/include/libvirt/libvirt.h.in +Index: libvirt-0.7.2/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.4.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.4/include/libvirt/libvirt.h.in -@@ -565,6 +565,21 @@ int virDomainRestore +--- libvirt-0.7.2.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.2/include/libvirt/libvirt.h.in +@@ -561,6 +561,21 @@ int virDomainRestore const char *from); /* @@ -24,11 +24,11 @@ Index: libvirt-0.7.4/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.4/src/libvirt.c +Index: libvirt-0.7.2/src/libvirt.c =================================================================== ---- libvirt-0.7.4.orig/src/libvirt.c -+++ libvirt-0.7.4/src/libvirt.c -@@ -2281,6 +2281,166 @@ error: +--- libvirt-0.7.2.orig/src/libvirt.c ++++ libvirt-0.7.2/src/libvirt.c +@@ -2234,6 +2234,166 @@ error: } /** @@ -195,11 +195,11 @@ Index: libvirt-0.7.4/src/libvirt.c * virDomainCoreDump: * @domain: a domain object * @to: path for the core file -Index: libvirt-0.7.4/src/driver.h +Index: libvirt-0.7.2/src/driver.h =================================================================== ---- libvirt-0.7.4.orig/src/driver.h -+++ libvirt-0.7.4/src/driver.h -@@ -136,6 +136,21 @@ typedef int +--- libvirt-0.7.2.orig/src/driver.h ++++ libvirt-0.7.2/src/driver.h +@@ -133,6 +133,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); typedef int @@ -221,10 +221,10 @@ Index: libvirt-0.7.4/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -435,6 +450,11 @@ struct _virDriver { - virDrvConnectIsSecure isSecure; - virDrvDomainIsActive domainIsActive; - virDrvDomainIsPersistent domainIsPersistent; +@@ -418,6 +433,11 @@ struct _virDriver { + virDrvNodeDeviceReAttach nodeDeviceReAttach; + virDrvNodeDeviceReset nodeDeviceReset; + virDrvDomainMigratePrepareTunnel domainMigratePrepareTunnel; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,11 +233,11 @@ Index: libvirt-0.7.4/src/driver.h }; typedef int -Index: libvirt-0.7.4/src/xen/xen_driver.c +Index: libvirt-0.7.2/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_driver.c -+++ libvirt-0.7.4/src/xen/xen_driver.c -@@ -1052,6 +1052,81 @@ xenUnifiedDomainRestore (virConnectPtr c +--- libvirt-0.7.2.orig/src/xen/xen_driver.c ++++ libvirt-0.7.2/src/xen/xen_driver.c +@@ -955,6 +955,81 @@ xenUnifiedDomainRestore (virConnectPtr c } static int @@ -319,10 +319,10 @@ Index: libvirt-0.7.4/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1860,6 +1935,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedIsSecure, - xenUnifiedDomainIsActive, - xenUnifiedDomainisPersistent, +@@ -1726,6 +1801,11 @@ static virDriver xenUnifiedDriver = { + xenUnifiedNodeDeviceReAttach, /* nodeDeviceReAttach */ + xenUnifiedNodeDeviceReset, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + xenUnifiedDomainSnapshotCreate, + xenUnifiedDomainSnapshotApply, + xenUnifiedDomainSnapshotDelete, @@ -331,11 +331,11 @@ Index: libvirt-0.7.4/src/xen/xen_driver.c }; /** -Index: libvirt-0.7.4/src/xen/xen_driver.h +Index: libvirt-0.7.2/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_driver.h -+++ libvirt-0.7.4/src/xen/xen_driver.h -@@ -100,6 +100,11 @@ struct xenUnifiedDriver { +--- libvirt-0.7.2.orig/src/xen/xen_driver.h ++++ libvirt-0.7.2/src/xen/xen_driver.h +@@ -98,6 +98,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; virDrvDomainSetSchedulerParameters domainSetSchedulerParameters; @@ -347,10 +347,10 @@ Index: libvirt-0.7.4/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +364,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3271,6 +3277,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3257,6 +3263,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +452,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5123,6 +5210,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5082,6 +5169,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,11 +464,11 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.4/src/xen/proxy_internal.c +Index: libvirt-0.7.2/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.4/src/xen/proxy_internal.c -@@ -83,6 +83,11 @@ struct xenUnifiedDriver xenProxyDriver = +--- libvirt-0.7.2.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.2/src/xen/proxy_internal.c +@@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ NULL, /* domainSetSchedulerParameters */ @@ -480,11 +480,11 @@ Index: libvirt-0.7.4/src/xen/proxy_internal.c }; -Index: libvirt-0.7.4/src/xen/xen_hypervisor.c +Index: libvirt-0.7.2/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.4/src/xen/xen_hypervisor.c -@@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.2/src/xen/xen_hypervisor.c +@@ -742,6 +742,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -496,10 +496,10 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.4/src/xen/xm_internal.c +Index: libvirt-0.7.2/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xm_internal.c -+++ libvirt-0.7.4/src/xen/xm_internal.c +--- libvirt-0.7.2.orig/src/xen/xm_internal.c ++++ libvirt-0.7.2/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +512,10 @@ Index: libvirt-0.7.4/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.4/src/xen/xs_internal.c +Index: libvirt-0.7.2/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xs_internal.c -+++ libvirt-0.7.4/src/xen/xs_internal.c +--- libvirt-0.7.2.orig/src/xen/xs_internal.c ++++ libvirt-0.7.2/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,11 +528,11 @@ Index: libvirt-0.7.4/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.4/tools/virsh.c +Index: libvirt-0.7.2/tools/virsh.c =================================================================== ---- libvirt-0.7.4.orig/tools/virsh.c -+++ libvirt-0.7.4/tools/virsh.c -@@ -1179,6 +1179,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.2.orig/tools/virsh.c ++++ libvirt-0.7.2/tools/virsh.c +@@ -1168,6 +1168,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } /* @@ -721,7 +721,7 @@ Index: libvirt-0.7.4/tools/virsh.c * "schedinfo" command */ static const vshCmdInfo info_schedinfo[] = { -@@ -7298,6 +7480,12 @@ static const vshCmdDef commands[] = { +@@ -7273,6 +7455,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +734,14 @@ Index: libvirt-0.7.4/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.4/src/lxc/lxc_driver.c +Index: libvirt-0.7.2/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.4/src/lxc/lxc_driver.c -@@ -2404,6 +2404,11 @@ static virDriver lxcDriver = { - lxcIsSecure, - lxcDomainIsActive, - lxcDomainIsPersistent, +--- libvirt-0.7.2.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.2/src/lxc/lxc_driver.c +@@ -2324,6 +2324,11 @@ static virDriver lxcDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +750,14 @@ Index: libvirt-0.7.4/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.4/src/openvz/openvz_driver.c +Index: libvirt-0.7.2/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.4/src/openvz/openvz_driver.c -@@ -1534,6 +1534,11 @@ static virDriver openvzDriver = { - openvzIsSecure, - openvzDomainIsActive, - openvzDomainIsPersistent, +--- libvirt-0.7.2.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.2/src/openvz/openvz_driver.c +@@ -1433,6 +1433,11 @@ static virDriver openvzDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +766,14 @@ Index: libvirt-0.7.4/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.4/src/qemu/qemu_driver.c +Index: libvirt-0.7.2/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.4/src/qemu/qemu_driver.c -@@ -7559,6 +7559,11 @@ static virDriver qemuDriver = { - qemuIsSecure, - qemuDomainIsActive, - qemuDomainIsPersistent, +--- libvirt-0.7.2.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.2/src/qemu/qemu_driver.c +@@ -7136,6 +7136,11 @@ static virDriver qemuDriver = { + qemudNodeDeviceReAttach, /* nodeDeviceReAttach */ + qemudNodeDeviceReset, /* nodeDeviceReset */ + qemudDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,14 +782,14 @@ Index: libvirt-0.7.4/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.4/src/esx/esx_driver.c +Index: libvirt-0.7.2/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/esx/esx_driver.c -+++ libvirt-0.7.4/src/esx/esx_driver.c -@@ -3425,6 +3425,11 @@ static virDriver esxDriver = { - esxIsSecure, /* isSecure */ - esxDomainIsActive, /* domainIsActive */ - esxDomainIsPersistent, /* domainIsPersistent */ +--- libvirt-0.7.2.orig/src/esx/esx_driver.c ++++ libvirt-0.7.2/src/esx/esx_driver.c +@@ -3275,6 +3275,11 @@ static virDriver esxDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -798,14 +798,14 @@ Index: libvirt-0.7.4/src/esx/esx_driver.c }; -Index: libvirt-0.7.4/src/test/test_driver.c +Index: libvirt-0.7.2/src/test/test_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/test/test_driver.c -+++ libvirt-0.7.4/src/test/test_driver.c -@@ -5233,6 +5233,11 @@ static virDriver testDriver = { - testIsSecure, /* isEncrypted */ - testDomainIsActive, /* domainIsActive */ - testDomainIsPersistent, /* domainIsPersistent */ +--- libvirt-0.7.2.orig/src/test/test_driver.c ++++ libvirt-0.7.2/src/test/test_driver.c +@@ -4558,6 +4558,11 @@ static virDriver testDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,14 +814,14 @@ Index: libvirt-0.7.4/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.4/src/uml/uml_driver.c +Index: libvirt-0.7.2/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/uml/uml_driver.c -+++ libvirt-0.7.4/src/uml/uml_driver.c -@@ -1888,6 +1888,11 @@ static virDriver umlDriver = { - umlIsSecure, - umlDomainIsActive, - umlDomainIsPersistent, +--- libvirt-0.7.2.orig/src/uml/uml_driver.c ++++ libvirt-0.7.2/src/uml/uml_driver.c +@@ -1862,6 +1862,11 @@ static virDriver umlDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -830,14 +830,14 @@ Index: libvirt-0.7.4/src/uml/uml_driver.c }; -Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c +Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c =================================================================== ---- libvirt-0.7.4.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.4/src/vbox/vbox_tmpl.c -@@ -6571,6 +6571,11 @@ virDriver NAME(Driver) = { - vboxIsSecure, - vboxDomainIsActive, - vboxDomainIsPersistent, +--- libvirt-0.7.2.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.2/src/vbox/vbox_tmpl.c +@@ -6468,6 +6468,11 @@ virDriver NAME(Driver) = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -846,14 +846,14 @@ Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c }; virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.4/src/opennebula/one_driver.c +Index: libvirt-0.7.2/src/opennebula/one_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.4/src/opennebula/one_driver.c -@@ -781,6 +781,11 @@ static virDriver oneDriver = { - oneIsSecure, - NULL, /* domainIsActive */ - NULL, /* domainIsPersistent */ +--- libvirt-0.7.2.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.2/src/opennebula/one_driver.c +@@ -788,6 +788,11 @@ static virDriver oneDriver = { + NULL, /* nodeDeviceReAttach; */ + NULL, /* nodeDeviceReset; */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -862,14 +862,14 @@ Index: libvirt-0.7.4/src/opennebula/one_driver.c }; static virStateDriver oneStateDriver = { -Index: libvirt-0.7.4/src/phyp/phyp_driver.c +Index: libvirt-0.7.2/src/phyp/phyp_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.4/src/phyp/phyp_driver.c -@@ -1650,6 +1650,11 @@ virDriver phypDriver = { - phypIsSecure, - NULL, /* domainIsActive */ - NULL, /* domainIsPersistent */ +--- libvirt-0.7.2.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.2/src/phyp/phyp_driver.c +@@ -1378,6 +1378,11 @@ virDriver phypDriver = { + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ + NULL, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -878,14 +878,14 @@ Index: libvirt-0.7.4/src/phyp/phyp_driver.c }; int -Index: libvirt-0.7.4/src/remote/remote_driver.c +Index: libvirt-0.7.2/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/remote/remote_driver.c -+++ libvirt-0.7.4/src/remote/remote_driver.c -@@ -8847,6 +8847,11 @@ static virDriver remote_driver = { - remoteIsSecure, /* isSecure */ - remoteDomainIsActive, /* domainIsActive */ - remoteDomainIsPersistent, /* domainIsPersistent */ +--- libvirt-0.7.2.orig/src/remote/remote_driver.c ++++ libvirt-0.7.2/src/remote/remote_driver.c +@@ -8466,6 +8466,11 @@ static virDriver remote_driver = { + remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ + remoteNodeDeviceReset, /* nodeDeviceReset */ + remoteDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -894,11 +894,11 @@ Index: libvirt-0.7.4/src/remote/remote_driver.c }; static virNetworkDriver network_driver = { -Index: libvirt-0.7.4/docs/libvirt-api.xml +Index: libvirt-0.7.2/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.4.orig/docs/libvirt-api.xml -+++ libvirt-0.7.4/docs/libvirt-api.xml -@@ -271,6 +271,11 @@ +--- libvirt-0.7.2.orig/docs/libvirt-api.xml ++++ libvirt-0.7.2/docs/libvirt-api.xml +@@ -262,6 +262,11 @@ @@ -910,7 +910,7 @@ Index: libvirt-0.7.4/docs/libvirt-api.xml -@@ -1878,6 +1883,36 @@ This function may requires privileged ac +@@ -1817,6 +1822,36 @@ This function may requires privileged ac @@ -947,10 +947,10 @@ Index: libvirt-0.7.4/docs/libvirt-api.xml -Index: libvirt-0.7.4/src/libvirt_public.syms +Index: libvirt-0.7.2/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.4.orig/src/libvirt_public.syms -+++ libvirt-0.7.4/src/libvirt_public.syms +--- libvirt-0.7.2.orig/src/libvirt_public.syms ++++ libvirt-0.7.2/src/libvirt_public.syms @@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { LIBVIRT_0.4.5 { global: @@ -963,11 +963,11 @@ Index: libvirt-0.7.4/src/libvirt_public.syms } LIBVIRT_0.4.2; LIBVIRT_0.5.0 { -Index: libvirt-0.7.4/python/generator.py +Index: libvirt-0.7.2/python/generator.py =================================================================== ---- libvirt-0.7.4.orig/python/generator.py -+++ libvirt-0.7.4/python/generator.py -@@ -287,6 +287,7 @@ skip_impl = ( +--- libvirt-0.7.2.orig/python/generator.py ++++ libvirt-0.7.2/python/generator.py +@@ -286,6 +286,7 @@ skip_impl = ( 'virDomainSetSchedulerParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', @@ -975,11 +975,11 @@ Index: libvirt-0.7.4/python/generator.py 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', -Index: libvirt-0.7.4/python/libvirt-override.c +Index: libvirt-0.7.2/python/libvirt-override.c =================================================================== ---- libvirt-0.7.4.orig/python/libvirt-override.c -+++ libvirt-0.7.4/python/libvirt-override.c -@@ -1400,6 +1400,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.2.orig/python/libvirt-override.c ++++ libvirt-0.7.2/python/libvirt-override.c +@@ -1375,6 +1375,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1014,7 +1014,7 @@ Index: libvirt-0.7.4/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2557,6 +2585,7 @@ static PyMethodDef libvirtMethods[] = { +@@ -2425,6 +2453,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, @@ -1022,11 +1022,11 @@ Index: libvirt-0.7.4/python/libvirt-override.c {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.4/python/libvirt-override-api.xml +Index: libvirt-0.7.2/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.4.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.4/python/libvirt-override-api.xml -@@ -140,6 +140,11 @@ +--- libvirt-0.7.2.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.2/python/libvirt-override-api.xml +@@ -135,6 +135,11 @@ @@ -1038,11 +1038,11 @@ Index: libvirt-0.7.4/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.4/src/xen/xen_inotify.c +Index: libvirt-0.7.2/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.4/src/xen/xen_inotify.c -@@ -86,6 +86,11 @@ struct xenUnifiedDriver xenInotifyDriver +--- libvirt-0.7.2.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.2/src/xen/xen_inotify.c +@@ -88,6 +88,11 @@ struct xenUnifiedDriver xenInotifyDriver NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ NULL, /* domainSetSchedulerParameters */ diff --git a/socat.patch b/socat.patch index f1d9c14..de709b7 100644 --- a/socat.patch +++ b/socat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/remote/remote_driver.c +Index: libvirt-0.7.2/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/remote/remote_driver.c -+++ libvirt-0.7.4/src/remote/remote_driver.c -@@ -763,12 +763,29 @@ doRemoteOpen (virConnectPtr conn, +--- libvirt-0.7.2.orig/src/remote/remote_driver.c ++++ libvirt-0.7.2/src/remote/remote_driver.c +@@ -760,12 +760,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } cmd_argv[j++] = strdup (priv->hostname); diff --git a/suse-network.patch b/suse-network.patch index 5a1146c..9e9767f 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/conf/network_conf.c +Index: libvirt-0.7.2/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.4.orig/src/conf/network_conf.c -+++ libvirt-0.7.4/src/conf/network_conf.c -@@ -865,6 +865,137 @@ error: +--- libvirt-0.7.2.orig/src/conf/network_conf.c ++++ libvirt-0.7.2/src/conf/network_conf.c +@@ -824,6 +824,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.4/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -904,6 +1035,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -863,6 +994,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,11 +148,11 @@ Index: libvirt-0.7.4/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.4/src/conf/network_conf.h +Index: libvirt-0.7.2/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.4.orig/src/conf/network_conf.h -+++ libvirt-0.7.4/src/conf/network_conf.h -@@ -94,6 +94,7 @@ struct _virNetworkObj { +--- libvirt-0.7.2.orig/src/conf/network_conf.h ++++ libvirt-0.7.2/src/conf/network_conf.h +@@ -92,6 +92,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; unsigned int persistent : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.4/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.4/src/network/bridge_driver.c +Index: libvirt-0.7.2/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/network/bridge_driver.c -+++ libvirt-0.7.4/src/network/bridge_driver.c -@@ -994,6 +994,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.2.orig/src/network/bridge_driver.c ++++ libvirt-0.7.2/src/network/bridge_driver.c +@@ -977,6 +977,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.4/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1494,6 +1499,12 @@ static int networkSetAutostart(virNetwor +@@ -1433,6 +1438,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/virsh-warning.patch b/virsh-warning.patch new file mode 100644 index 0000000..69da082 --- /dev/null +++ b/virsh-warning.patch @@ -0,0 +1,19 @@ +commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 +Author: Jim Fehlig +Date: Mon Oct 19 13:53:40 2009 -0600 + + Remove extra arg in call to vshError() + +Index: libvirt-0.7.2/tools/virsh.c +=================================================================== +--- libvirt-0.7.2.orig/tools/virsh.c ++++ libvirt-0.7.2/tools/virsh.c +@@ -2510,7 +2510,7 @@ cmdMigrate (vshControl *ctl, const vshCm + * a libvirt URI, or a hypervisor specific URI. */ + + if (migrateuri != NULL) { +- vshError(ctl, FALSE, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); ++ vshError(ctl, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); + goto done; + } + diff --git a/xen-list-defined.patch b/xen-list-defined.patch deleted file mode 100644 index 8b5cc01..0000000 --- a/xen-list-defined.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 7cfbb17978c467625afab866b7a22119789abee0 -Author: Matthias Bolte -Date: Thu Nov 26 00:09:40 2009 +0100 - - xen: Fix unconditional freeing in xenDaemonListDefinedDomains() - - Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of - the names array to be freed even on success, resulting in no listing of - defined but inactive Xen domains. - - Spotted by Jim Fehlig - -diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c -index e370eb8..4d9dcd1 100644 ---- a/src/xen/xend_internal.c -+++ b/src/xen/xend_internal.c -@@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames - break; - } - -+cleanup: -+ sexpr_free(root); -+ return(ret); -+ - error: - for (i = 0; i < ret; ++i) - VIR_FREE(names[i]); - -- sexpr_free(root); -- return(ret); -+ ret = -1; -+ -+ goto cleanup; - } - - /** diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 87e6ca6..3188ac7 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.2/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -5365,7 +5365,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.2.orig/src/xen/xend_internal.c ++++ libvirt-0.7.2/src/xen/xend_internal.c +@@ -5324,7 +5324,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xend-description-tag.patch b/xend-description-tag.patch deleted file mode 100644 index cd0ef24..0000000 --- a/xend-description-tag.patch +++ /dev/null @@ -1,36 +0,0 @@ -From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001 -From: Jim Fehlig -Date: Mon, 7 Dec 2009 14:24:21 -0700 -Subject: [PATCH] Plumb domain description tag in xend backend - -xen-unstable changesets 20321 and 20521 added support for -description in xend domain config. This patch extends that -support in xend backend. ---- - src/xen/xend_internal.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -Index: libvirt-0.7.4/src/xen/xend_internal.c -=================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn, - } - virUUIDParse(tmp, def->uuid); - -+ if (sexpr_node_copy(root, "domain/description", &def->description) < 0) -+ goto no_memory; -+ - hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0; - if (!hvm) { - if (sexpr_node_copy(root, "domain/bootloader", -@@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn, - virUUIDFormat(def->uuid, uuidstr); - virBufferVSprintf(&buf, "(uuid '%s')", uuidstr); - -+ if (def->description) -+ virBufferVSprintf(&buf, "(description '%s')", def->description); -+ - if (def->os.bootloader) { - if (def->os.bootloader[0]) - virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader); From e89319a2854786f9ad85693cee4b58083eb10161195027e2b9a8fd74b3ba03c8 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Fri, 11 Dec 2009 15:19:30 +0000 Subject: [PATCH 12/12] Updating link to change in openSUSE:Factory/libvirt revision 46.0 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=aa90c5c57e358c84ad3f8e2966c4e2df --- clone.patch | 8 +- detach-disk.patch | 108 ++++++++------ devmap-no-pkgconfig.patch | 32 ---- fs-ocfs2.patch | 25 ---- libvirt-0.7.2.tar.bz2 | 3 - libvirt-0.7.4.tar.bz2 | 3 + libvirt.changes | 35 +++++ libvirt.spec | 25 ++-- migrate-params.patch | 8 +- selinux-ldflags.patch | 13 -- snapshots.patch | 294 ++++++++++++++++++------------------- socat.patch | 8 +- suse-network.patch | 28 ++-- virsh-warning.patch | 19 --- xen-list-defined.patch | 36 +++++ xen-pv-cdrom.patch | 8 +- xend-description-tag.patch | 36 +++++ 17 files changed, 359 insertions(+), 330 deletions(-) delete mode 100644 devmap-no-pkgconfig.patch delete mode 100644 fs-ocfs2.patch delete mode 100644 libvirt-0.7.2.tar.bz2 create mode 100644 libvirt-0.7.4.tar.bz2 delete mode 100644 selinux-ldflags.patch delete mode 100644 virsh-warning.patch create mode 100644 xen-list-defined.patch create mode 100644 xend-description-tag.patch diff --git a/clone.patch b/clone.patch index 7c92647..f2d33cf 100644 --- a/clone.patch +++ b/clone.patch @@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c =================================================================== --- src/lxc/lxc_container.c.orig +++ src/lxc/lxc_container.c -@@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de +@@ -813,6 +813,9 @@ int lxcContainerStart(virDomainDefPtr de lxc_child_argv_t args = { def, nveths, veths, control, ttyPath }; /* allocate a stack for the container */ @@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c if (VIR_ALLOC_N(stack, stacksize) < 0) { virReportOOMError(NULL); return -1; -@@ -810,7 +813,11 @@ int lxcContainerStart(virDomainDefPtr de +@@ -827,7 +830,11 @@ int lxcContainerStart(virDomainDefPtr de if (def->nets != NULL) flags |= CLONE_NEWNET; @@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c VIR_FREE(stack); DEBUG("clone() returned, %d", pid); -@@ -836,6 +843,7 @@ int lxcContainerAvailable(int features) +@@ -853,6 +860,7 @@ int lxcContainerAvailable(int features) char *childStack; char *stack; int childStatus; @@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c if (features & LXC_CONTAINER_FEATURE_USER) flags |= CLONE_NEWUSER; -@@ -843,14 +851,21 @@ int lxcContainerAvailable(int features) +@@ -860,14 +868,21 @@ int lxcContainerAvailable(int features) if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; diff --git a/detach-disk.patch b/detach-disk.patch index 834deec..c70c688 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,50 +1,64 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain, - return -1; - xenUnifiedLock(priv); - xref = xenStoreDomainGetDiskID(domain->conn, domain->id, -- dev->data.disk->dst); -+ dev->data.disk->dst, class); - xenUnifiedUnlock(priv); - if (xref == NULL) - return -1; -Index: libvirt-0.7.2/src/xen/xs_internal.c -=================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.c -+++ libvirt-0.7.2/src/xen/xs_internal.c -@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr - * freed by the caller. - */ - char * --xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) { -+xenStoreDomainGetDiskID(virConnectPtr conn, int id, -+ const char *dev, const char *class) { - char dir[80], path[128], **list = NULL, *val = NULL; - unsigned int devlen, len, i, num; - char *ret = NULL; -@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co - if (devlen <= 0) - return (NULL); +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4109,13 +4109,12 @@ xenDaemonAttachDevice(virDomainPtr domai -- snprintf(dir, sizeof(dir), "/local/domain/0/backend/vbd/%d", id); -+ snprintf(dir, sizeof(dir), "/local/domain/0/backend/%s/%d", class, id); - list = xs_directory(priv->xshandle, 0, dir, &num); - if (list != NULL) { - for (i = 0; i < num; i++) { -Index: libvirt-0.7.2/src/xen/xs_internal.h + priv = (xenUnifiedPrivatePtr) domain->conn->privateData; + +- /* +- * on older Xen without the inactive guests management +- * avoid doing this on inactive guests +- */ +- if ((domain->id < 0) && (priv->xendConfigVersion < 3)) ++ if (domain->id < 0) { ++ virXendError(domain->conn, VIR_ERR_OPERATION_INVALID, ++ "%s", _("cannot attach device on inactive domain")); + return -1; +- ++ } ++ + if (!(def = xenDaemonDomainFetch(domain->conn, + domain->id, + domain->name, +@@ -4213,12 +4212,11 @@ xenDaemonDetachDevice(virDomainPtr domai + + priv = (xenUnifiedPrivatePtr) domain->conn->privateData; + +- /* +- * on older Xen without the inactive guests management +- * avoid doing this on inactive guests +- */ +- if ((domain->id < 0) && (priv->xendConfigVersion < 3)) ++ if (domain->id < 0) { ++ virXendError(domain->conn, VIR_ERR_OPERATION_INVALID, ++ "%s", _("cannot detach device on inactive domain")); + return -1; ++ } + + if (!(def = xenDaemonDomainFetch(domain->conn, + domain->id, +Index: libvirt-0.7.4/src/libvirt.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.h -+++ libvirt-0.7.2/src/xen/xs_internal.h -@@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo - const char *mac); - char * xenStoreDomainGetDiskID(virConnectPtr conn, - int id, -- const char *dev); -+ const char *dev, -+ const char *class); - char * xenStoreDomainGetName(virConnectPtr conn, - int id); - int xenStoreDomainGetUUID(virConnectPtr conn, +--- libvirt-0.7.4.orig/src/libvirt.c ++++ libvirt-0.7.4/src/libvirt.c +@@ -4919,7 +4919,8 @@ error: + * @domain: pointer to domain object + * @xml: pointer to XML description of one device + * +- * Create a virtual device attachment to backend. ++ * Create a virtual device attachment to backend. This function, having ++ * hotplug semantics, is only allowed on an active domain. + * + * Returns 0 in case of success, -1 in case of failure. + */ +@@ -4962,7 +4963,8 @@ error: + * @domain: pointer to domain object + * @xml: pointer to XML description of one device + * +- * Destroy a virtual device attachment to backend. ++ * Destroy a virtual device attachment to backend. This function, having ++ * hot-unplug semantics, is only allowed on an active domain. + * + * Returns 0 in case of success, -1 in case of failure. + */ diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch deleted file mode 100644 index 78d9b22..0000000 --- a/devmap-no-pkgconfig.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: libvirt-0.7.2/configure.in -=================================================================== ---- libvirt-0.7.2.orig/configure.in -+++ libvirt-0.7.2/configure.in -@@ -1304,11 +1304,22 @@ if test "$with_storage_mpath" = "yes"; t - DEVMAPPER_REQUIRED=0.0 - DEVMAPPER_CFLAGS= - DEVMAPPER_LIBS= -- PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED, -- [], [ -- AC_MSG_ERROR( -- [You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt]) -- ]) -+ PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no]) -+ if test "$DEVMAPPER_FOUND" = "no"; then -+ # devmapper is missing pkg-config files in ubuntu, suse, etc -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ DEVMAPPER_FOUND=yes -+ AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no]) -+ AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no]) -+ DEVMAPPER_LIBS="-ldevmapper" -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ fi -+ if test "$DEVMAPPER_FOUND" = "no" ; then -+ AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt]) -+ fi -+ - fi - AC_SUBST([DEVMAPPER_CFLAGS]) - AC_SUBST([DEVMAPPER_LIBS]) diff --git a/fs-ocfs2.patch b/fs-ocfs2.patch deleted file mode 100644 index 95e84c7..0000000 --- a/fs-ocfs2.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: libvirt-0.7.2/src/conf/storage_conf.c -=================================================================== ---- libvirt-0.7.2.orig/src/conf/storage_conf.c -+++ libvirt-0.7.2/src/conf/storage_conf.c -@@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSy - VIR_STORAGE_POOL_FS_LAST, - "auto", "ext2", "ext3", - "ext4", "ufs", "iso9660", "udf", -- "gfs", "gfs2", "vfat", "hfs+", "xfs") -+ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2") - - VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, - VIR_STORAGE_POOL_NETFS_LAST, -Index: libvirt-0.7.2/src/conf/storage_conf.h -=================================================================== ---- libvirt-0.7.2.orig/src/conf/storage_conf.h -+++ libvirt-0.7.2/src/conf/storage_conf.h -@@ -395,6 +395,7 @@ enum virStoragePoolFormatFileSystem { - VIR_STORAGE_POOL_FS_VFAT, - VIR_STORAGE_POOL_FS_HFSPLUS, - VIR_STORAGE_POOL_FS_XFS, -+ VIR_STORAGE_POOL_FS_OCFS2, - VIR_STORAGE_POOL_FS_LAST, - }; - VIR_ENUM_DECL(virStoragePoolFormatFileSystem) diff --git a/libvirt-0.7.2.tar.bz2 b/libvirt-0.7.2.tar.bz2 deleted file mode 100644 index 9e7e304..0000000 --- a/libvirt-0.7.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:311817f34ace89ee44b09a4d4854bbc3a5c0567bf9a8e8a6772c494432f94b33 -size 5563880 diff --git a/libvirt-0.7.4.tar.bz2 b/libvirt-0.7.4.tar.bz2 new file mode 100644 index 0000000..c5fa49f --- /dev/null +++ b/libvirt-0.7.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6316a53b4cfaf184e795c7be69a371c5dc90a8a6dd6cd05c4208a1314aac10d4 +size 5692288 diff --git a/libvirt.changes b/libvirt.changes index 7186c90..3eb631f 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,38 @@ +------------------------------------------------------------------- +Mon Dec 7 14:51:36 MST 2009 - jfehlig@novell.com + +- Plumb domain description in xend backend + xend-description-tag.patch + +------------------------------------------------------------------- +Tue Nov 24 17:46:08 MST 2009 - jfehlig@novell.com + +- Fix listing of defined but inactive Xen domains + xen-list-defined.patch + +------------------------------------------------------------------- +Tue Nov 24 10:29:03 MST 2009 - jfehlig@novell.com + +- Updated to version 0.7.4 + - Implement a node device backend using libudev + - New APIs for checking some object properties + - Fully asynchronous monitor I/O processing + - add MAC address based port filtering to qemu + - support for IPv6 / multiple addresses per interfaces + - lots of improvements and bug fixes + +------------------------------------------------------------------- +Thu Nov 19 16:48:36 MST 2009 - jfehlig@novell.com + +- Fix compilation against xen-unstable + xen-max-vcpus.patch +- Modify detach-disk.patch as per upstream suggestions + +------------------------------------------------------------------- +Wed Nov 4 20:53:11 MDT 2009 - jfehlig@novell.com + +- spec file: Fix polkit vs PolicyKit Requires + ------------------------------------------------------------------- Mon Oct 19 14:13:47 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 761f9b5..bf9c90e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.2) +# spec file for package libvirt (Version 0.7.4) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -61,10 +61,10 @@ BuildRequires: libssh2-devel # Only for directory ownership: BuildRequires: gtk-doc Url: http://libvirt.org/ -License: LGPL v2.1 or later +License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.2 +Version: 0.7.4 Release: 1 Summary: A C toolkit to interract with the virtualization capabilities of Linux Requires: readline @@ -83,7 +83,7 @@ Requires: socat Requires: open-iscsi Requires: nfs-client Requires: hal -%if 0%{?suse_version} > 1100 +%if 0%{?suse_version} > 1110 Requires: polkit >= 0.9 %else Requires: PolicyKit >= 0.6 @@ -91,16 +91,14 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: devmap-no-pkgconfig.patch -Patch1: fs-ocfs2.patch -Patch2: selinux-ldflags.patch -Patch3: virsh-warning.patch +Patch0: xen-list-defined.patch +Patch1: detach-disk.patch +Patch2: xend-description-tag.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch Patch102: migrate-params.patch Patch103: xen-pv-cdrom.patch -Patch104: detach-disk.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: suse-network.patch @@ -124,7 +122,7 @@ Authors: Karel Zak %package devel -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: A C toolkit to interract with the virtualization capabilities of Linux Group: Development/Libraries/C and C++ Requires: %{name} = %{version} libxml2-devel @@ -150,7 +148,7 @@ Authors: Karel Zak %package doc -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: A C toolkit to interract with the virtualization capabilities of Linux Group: Development/Libraries/C and C++ Requires: %{name} = %{version} @@ -172,7 +170,7 @@ Authors: Karel Zak %package python -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: A C toolkit to interract with the virtualization capabilities of Linux Group: Development/Libraries/C and C++ Requires: %{name} = %{version} @@ -199,12 +197,10 @@ Authors: %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch100 -p1 %patch101 %patch102 -p1 %patch103 -p1 -%patch104 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 @@ -345,5 +341,6 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* %{py_sitedir}/libvirtmod* +#%attr(0755, root, root) %{_libdir}/%{name}/virt-aa-helper %changelog diff --git a/migrate-params.patch b/migrate-params.patch index fbcf3d9..2720c04 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -4491,6 +4491,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4517,6 +4517,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/selinux-ldflags.patch b/selinux-ldflags.patch deleted file mode 100644 index 7b92fce..0000000 --- a/selinux-ldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libvirt-0.7.2/src/Makefile.am -=================================================================== ---- libvirt-0.7.2.orig/src/Makefile.am -+++ libvirt-0.7.2/src/Makefile.am -@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \ - libvirt_driver_security_la_LDFLAGS = - if WITH_SECDRIVER_SELINUX - libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) -+libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) -+libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) - endif - if WITH_SECDRIVER_APPARMOR - libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) diff --git a/snapshots.patch b/snapshots.patch index a00c62e..72fd6de 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/include/libvirt/libvirt.h.in +Index: libvirt-0.7.4/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.2.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.2/include/libvirt/libvirt.h.in -@@ -561,6 +561,21 @@ int virDomainRestore +--- libvirt-0.7.4.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.4/include/libvirt/libvirt.h.in +@@ -565,6 +565,21 @@ int virDomainRestore const char *from); /* @@ -24,11 +24,11 @@ Index: libvirt-0.7.2/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.2/src/libvirt.c +Index: libvirt-0.7.4/src/libvirt.c =================================================================== ---- libvirt-0.7.2.orig/src/libvirt.c -+++ libvirt-0.7.2/src/libvirt.c -@@ -2234,6 +2234,166 @@ error: +--- libvirt-0.7.4.orig/src/libvirt.c ++++ libvirt-0.7.4/src/libvirt.c +@@ -2281,6 +2281,166 @@ error: } /** @@ -195,11 +195,11 @@ Index: libvirt-0.7.2/src/libvirt.c * virDomainCoreDump: * @domain: a domain object * @to: path for the core file -Index: libvirt-0.7.2/src/driver.h +Index: libvirt-0.7.4/src/driver.h =================================================================== ---- libvirt-0.7.2.orig/src/driver.h -+++ libvirt-0.7.2/src/driver.h -@@ -133,6 +133,21 @@ typedef int +--- libvirt-0.7.4.orig/src/driver.h ++++ libvirt-0.7.4/src/driver.h +@@ -136,6 +136,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); typedef int @@ -221,10 +221,10 @@ Index: libvirt-0.7.2/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -418,6 +433,11 @@ struct _virDriver { - virDrvNodeDeviceReAttach nodeDeviceReAttach; - virDrvNodeDeviceReset nodeDeviceReset; - virDrvDomainMigratePrepareTunnel domainMigratePrepareTunnel; +@@ -435,6 +450,11 @@ struct _virDriver { + virDrvConnectIsSecure isSecure; + virDrvDomainIsActive domainIsActive; + virDrvDomainIsPersistent domainIsPersistent; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,11 +233,11 @@ Index: libvirt-0.7.2/src/driver.h }; typedef int -Index: libvirt-0.7.2/src/xen/xen_driver.c +Index: libvirt-0.7.4/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_driver.c -+++ libvirt-0.7.2/src/xen/xen_driver.c -@@ -955,6 +955,81 @@ xenUnifiedDomainRestore (virConnectPtr c +--- libvirt-0.7.4.orig/src/xen/xen_driver.c ++++ libvirt-0.7.4/src/xen/xen_driver.c +@@ -1052,6 +1052,81 @@ xenUnifiedDomainRestore (virConnectPtr c } static int @@ -319,10 +319,10 @@ Index: libvirt-0.7.2/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1726,6 +1801,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedNodeDeviceReAttach, /* nodeDeviceReAttach */ - xenUnifiedNodeDeviceReset, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +@@ -1860,6 +1935,11 @@ static virDriver xenUnifiedDriver = { + xenUnifiedIsSecure, + xenUnifiedDomainIsActive, + xenUnifiedDomainisPersistent, + xenUnifiedDomainSnapshotCreate, + xenUnifiedDomainSnapshotApply, + xenUnifiedDomainSnapshotDelete, @@ -331,11 +331,11 @@ Index: libvirt-0.7.2/src/xen/xen_driver.c }; /** -Index: libvirt-0.7.2/src/xen/xen_driver.h +Index: libvirt-0.7.4/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_driver.h -+++ libvirt-0.7.2/src/xen/xen_driver.h -@@ -98,6 +98,11 @@ struct xenUnifiedDriver { +--- libvirt-0.7.4.orig/src/xen/xen_driver.h ++++ libvirt-0.7.4/src/xen/xen_driver.h +@@ -100,6 +100,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; virDrvDomainSetSchedulerParameters domainSetSchedulerParameters; @@ -347,10 +347,10 @@ Index: libvirt-0.7.2/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +364,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3257,6 +3263,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3271,6 +3277,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +452,7 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5082,6 +5169,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5123,6 +5210,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,11 +464,11 @@ Index: libvirt-0.7.2/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.2/src/xen/proxy_internal.c +Index: libvirt-0.7.4/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.2/src/xen/proxy_internal.c -@@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver = +--- libvirt-0.7.4.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.4/src/xen/proxy_internal.c +@@ -83,6 +83,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ NULL, /* domainSetSchedulerParameters */ @@ -480,11 +480,11 @@ Index: libvirt-0.7.2/src/xen/proxy_internal.c }; -Index: libvirt-0.7.2/src/xen/xen_hypervisor.c +Index: libvirt-0.7.4/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.2/src/xen/xen_hypervisor.c -@@ -742,6 +742,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.4/src/xen/xen_hypervisor.c +@@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -496,10 +496,10 @@ Index: libvirt-0.7.2/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.2/src/xen/xm_internal.c +Index: libvirt-0.7.4/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xm_internal.c -+++ libvirt-0.7.2/src/xen/xm_internal.c +--- libvirt-0.7.4.orig/src/xen/xm_internal.c ++++ libvirt-0.7.4/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +512,10 @@ Index: libvirt-0.7.2/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.2/src/xen/xs_internal.c +Index: libvirt-0.7.4/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xs_internal.c -+++ libvirt-0.7.2/src/xen/xs_internal.c +--- libvirt-0.7.4.orig/src/xen/xs_internal.c ++++ libvirt-0.7.4/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,11 +528,11 @@ Index: libvirt-0.7.2/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.2/tools/virsh.c +Index: libvirt-0.7.4/tools/virsh.c =================================================================== ---- libvirt-0.7.2.orig/tools/virsh.c -+++ libvirt-0.7.2/tools/virsh.c -@@ -1168,6 +1168,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.4.orig/tools/virsh.c ++++ libvirt-0.7.4/tools/virsh.c +@@ -1179,6 +1179,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } /* @@ -721,7 +721,7 @@ Index: libvirt-0.7.2/tools/virsh.c * "schedinfo" command */ static const vshCmdInfo info_schedinfo[] = { -@@ -7273,6 +7455,12 @@ static const vshCmdDef commands[] = { +@@ -7298,6 +7480,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +734,14 @@ Index: libvirt-0.7.2/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.2/src/lxc/lxc_driver.c +Index: libvirt-0.7.4/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.2/src/lxc/lxc_driver.c -@@ -2324,6 +2324,11 @@ static virDriver lxcDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.4/src/lxc/lxc_driver.c +@@ -2404,6 +2404,11 @@ static virDriver lxcDriver = { + lxcIsSecure, + lxcDomainIsActive, + lxcDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +750,14 @@ Index: libvirt-0.7.2/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.2/src/openvz/openvz_driver.c +Index: libvirt-0.7.4/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.2/src/openvz/openvz_driver.c -@@ -1433,6 +1433,11 @@ static virDriver openvzDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.4/src/openvz/openvz_driver.c +@@ -1534,6 +1534,11 @@ static virDriver openvzDriver = { + openvzIsSecure, + openvzDomainIsActive, + openvzDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +766,14 @@ Index: libvirt-0.7.2/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.2/src/qemu/qemu_driver.c +Index: libvirt-0.7.4/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.2/src/qemu/qemu_driver.c -@@ -7136,6 +7136,11 @@ static virDriver qemuDriver = { - qemudNodeDeviceReAttach, /* nodeDeviceReAttach */ - qemudNodeDeviceReset, /* nodeDeviceReset */ - qemudDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.4/src/qemu/qemu_driver.c +@@ -7559,6 +7559,11 @@ static virDriver qemuDriver = { + qemuIsSecure, + qemuDomainIsActive, + qemuDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,14 +782,14 @@ Index: libvirt-0.7.2/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.2/src/esx/esx_driver.c +Index: libvirt-0.7.4/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/esx/esx_driver.c -+++ libvirt-0.7.2/src/esx/esx_driver.c -@@ -3275,6 +3275,11 @@ static virDriver esxDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/esx/esx_driver.c ++++ libvirt-0.7.4/src/esx/esx_driver.c +@@ -3425,6 +3425,11 @@ static virDriver esxDriver = { + esxIsSecure, /* isSecure */ + esxDomainIsActive, /* domainIsActive */ + esxDomainIsPersistent, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -798,14 +798,14 @@ Index: libvirt-0.7.2/src/esx/esx_driver.c }; -Index: libvirt-0.7.2/src/test/test_driver.c +Index: libvirt-0.7.4/src/test/test_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/test/test_driver.c -+++ libvirt-0.7.2/src/test/test_driver.c -@@ -4558,6 +4558,11 @@ static virDriver testDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/test/test_driver.c ++++ libvirt-0.7.4/src/test/test_driver.c +@@ -5233,6 +5233,11 @@ static virDriver testDriver = { + testIsSecure, /* isEncrypted */ + testDomainIsActive, /* domainIsActive */ + testDomainIsPersistent, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,14 +814,14 @@ Index: libvirt-0.7.2/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.2/src/uml/uml_driver.c +Index: libvirt-0.7.4/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/uml/uml_driver.c -+++ libvirt-0.7.2/src/uml/uml_driver.c -@@ -1862,6 +1862,11 @@ static virDriver umlDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/uml/uml_driver.c ++++ libvirt-0.7.4/src/uml/uml_driver.c +@@ -1888,6 +1888,11 @@ static virDriver umlDriver = { + umlIsSecure, + umlDomainIsActive, + umlDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -830,14 +830,14 @@ Index: libvirt-0.7.2/src/uml/uml_driver.c }; -Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c +Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c =================================================================== ---- libvirt-0.7.2.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.2/src/vbox/vbox_tmpl.c -@@ -6468,6 +6468,11 @@ virDriver NAME(Driver) = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.4/src/vbox/vbox_tmpl.c +@@ -6571,6 +6571,11 @@ virDriver NAME(Driver) = { + vboxIsSecure, + vboxDomainIsActive, + vboxDomainIsPersistent, + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -846,14 +846,14 @@ Index: libvirt-0.7.2/src/vbox/vbox_tmpl.c }; virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.2/src/opennebula/one_driver.c +Index: libvirt-0.7.4/src/opennebula/one_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.2/src/opennebula/one_driver.c -@@ -788,6 +788,11 @@ static virDriver oneDriver = { - NULL, /* nodeDeviceReAttach; */ - NULL, /* nodeDeviceReset; */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.4/src/opennebula/one_driver.c +@@ -781,6 +781,11 @@ static virDriver oneDriver = { + oneIsSecure, + NULL, /* domainIsActive */ + NULL, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -862,14 +862,14 @@ Index: libvirt-0.7.2/src/opennebula/one_driver.c }; static virStateDriver oneStateDriver = { -Index: libvirt-0.7.2/src/phyp/phyp_driver.c +Index: libvirt-0.7.4/src/phyp/phyp_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.2/src/phyp/phyp_driver.c -@@ -1378,6 +1378,11 @@ virDriver phypDriver = { - NULL, /* nodeDeviceReAttach */ - NULL, /* nodeDeviceReset */ - NULL, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.4/src/phyp/phyp_driver.c +@@ -1650,6 +1650,11 @@ virDriver phypDriver = { + phypIsSecure, + NULL, /* domainIsActive */ + NULL, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -878,14 +878,14 @@ Index: libvirt-0.7.2/src/phyp/phyp_driver.c }; int -Index: libvirt-0.7.2/src/remote/remote_driver.c +Index: libvirt-0.7.4/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/remote/remote_driver.c -+++ libvirt-0.7.2/src/remote/remote_driver.c -@@ -8466,6 +8466,11 @@ static virDriver remote_driver = { - remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ - remoteNodeDeviceReset, /* nodeDeviceReset */ - remoteDomainMigratePrepareTunnel, /* domainMigratePrepareTunnel */ +--- libvirt-0.7.4.orig/src/remote/remote_driver.c ++++ libvirt-0.7.4/src/remote/remote_driver.c +@@ -8847,6 +8847,11 @@ static virDriver remote_driver = { + remoteIsSecure, /* isSecure */ + remoteDomainIsActive, /* domainIsActive */ + remoteDomainIsPersistent, /* domainIsPersistent */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -894,11 +894,11 @@ Index: libvirt-0.7.2/src/remote/remote_driver.c }; static virNetworkDriver network_driver = { -Index: libvirt-0.7.2/docs/libvirt-api.xml +Index: libvirt-0.7.4/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.2.orig/docs/libvirt-api.xml -+++ libvirt-0.7.2/docs/libvirt-api.xml -@@ -262,6 +262,11 @@ +--- libvirt-0.7.4.orig/docs/libvirt-api.xml ++++ libvirt-0.7.4/docs/libvirt-api.xml +@@ -271,6 +271,11 @@ @@ -910,7 +910,7 @@ Index: libvirt-0.7.2/docs/libvirt-api.xml -@@ -1817,6 +1822,36 @@ This function may requires privileged ac +@@ -1878,6 +1883,36 @@ This function may requires privileged ac @@ -947,10 +947,10 @@ Index: libvirt-0.7.2/docs/libvirt-api.xml -Index: libvirt-0.7.2/src/libvirt_public.syms +Index: libvirt-0.7.4/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.2.orig/src/libvirt_public.syms -+++ libvirt-0.7.2/src/libvirt_public.syms +--- libvirt-0.7.4.orig/src/libvirt_public.syms ++++ libvirt-0.7.4/src/libvirt_public.syms @@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { LIBVIRT_0.4.5 { global: @@ -963,11 +963,11 @@ Index: libvirt-0.7.2/src/libvirt_public.syms } LIBVIRT_0.4.2; LIBVIRT_0.5.0 { -Index: libvirt-0.7.2/python/generator.py +Index: libvirt-0.7.4/python/generator.py =================================================================== ---- libvirt-0.7.2.orig/python/generator.py -+++ libvirt-0.7.2/python/generator.py -@@ -286,6 +286,7 @@ skip_impl = ( +--- libvirt-0.7.4.orig/python/generator.py ++++ libvirt-0.7.4/python/generator.py +@@ -287,6 +287,7 @@ skip_impl = ( 'virDomainSetSchedulerParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', @@ -975,11 +975,11 @@ Index: libvirt-0.7.2/python/generator.py 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', -Index: libvirt-0.7.2/python/libvirt-override.c +Index: libvirt-0.7.4/python/libvirt-override.c =================================================================== ---- libvirt-0.7.2.orig/python/libvirt-override.c -+++ libvirt-0.7.2/python/libvirt-override.c -@@ -1375,6 +1375,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.4.orig/python/libvirt-override.c ++++ libvirt-0.7.4/python/libvirt-override.c +@@ -1400,6 +1400,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1014,7 +1014,7 @@ Index: libvirt-0.7.2/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2425,6 +2453,7 @@ static PyMethodDef libvirtMethods[] = { +@@ -2557,6 +2585,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, @@ -1022,11 +1022,11 @@ Index: libvirt-0.7.2/python/libvirt-override.c {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.2/python/libvirt-override-api.xml +Index: libvirt-0.7.4/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.2.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.2/python/libvirt-override-api.xml -@@ -135,6 +135,11 @@ +--- libvirt-0.7.4.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.4/python/libvirt-override-api.xml +@@ -140,6 +140,11 @@ @@ -1038,11 +1038,11 @@ Index: libvirt-0.7.2/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.2/src/xen/xen_inotify.c +Index: libvirt-0.7.4/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.2/src/xen/xen_inotify.c -@@ -88,6 +88,11 @@ struct xenUnifiedDriver xenInotifyDriver +--- libvirt-0.7.4.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.4/src/xen/xen_inotify.c +@@ -86,6 +86,11 @@ struct xenUnifiedDriver xenInotifyDriver NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ NULL, /* domainSetSchedulerParameters */ diff --git a/socat.patch b/socat.patch index de709b7..f1d9c14 100644 --- a/socat.patch +++ b/socat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/remote/remote_driver.c +Index: libvirt-0.7.4/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/remote/remote_driver.c -+++ libvirt-0.7.2/src/remote/remote_driver.c -@@ -760,12 +760,29 @@ doRemoteOpen (virConnectPtr conn, +--- libvirt-0.7.4.orig/src/remote/remote_driver.c ++++ libvirt-0.7.4/src/remote/remote_driver.c +@@ -763,12 +763,29 @@ doRemoteOpen (virConnectPtr conn, cmd_argv[j++] = strdup ("none"); } cmd_argv[j++] = strdup (priv->hostname); diff --git a/suse-network.patch b/suse-network.patch index 9e9767f..5a1146c 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/conf/network_conf.c +Index: libvirt-0.7.4/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.2.orig/src/conf/network_conf.c -+++ libvirt-0.7.2/src/conf/network_conf.c -@@ -824,6 +824,137 @@ error: +--- libvirt-0.7.4.orig/src/conf/network_conf.c ++++ libvirt-0.7.4/src/conf/network_conf.c +@@ -865,6 +865,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.2/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -863,6 +994,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -904,6 +1035,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,11 +148,11 @@ Index: libvirt-0.7.2/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.2/src/conf/network_conf.h +Index: libvirt-0.7.4/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.2.orig/src/conf/network_conf.h -+++ libvirt-0.7.2/src/conf/network_conf.h -@@ -92,6 +92,7 @@ struct _virNetworkObj { +--- libvirt-0.7.4.orig/src/conf/network_conf.h ++++ libvirt-0.7.4/src/conf/network_conf.h +@@ -94,6 +94,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; unsigned int persistent : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.2/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.2/src/network/bridge_driver.c +Index: libvirt-0.7.4/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.2.orig/src/network/bridge_driver.c -+++ libvirt-0.7.2/src/network/bridge_driver.c -@@ -977,6 +977,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.4.orig/src/network/bridge_driver.c ++++ libvirt-0.7.4/src/network/bridge_driver.c +@@ -994,6 +994,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.2/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1433,6 +1438,12 @@ static int networkSetAutostart(virNetwor +@@ -1494,6 +1499,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/virsh-warning.patch b/virsh-warning.patch deleted file mode 100644 index 69da082..0000000 --- a/virsh-warning.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 -Author: Jim Fehlig -Date: Mon Oct 19 13:53:40 2009 -0600 - - Remove extra arg in call to vshError() - -Index: libvirt-0.7.2/tools/virsh.c -=================================================================== ---- libvirt-0.7.2.orig/tools/virsh.c -+++ libvirt-0.7.2/tools/virsh.c -@@ -2510,7 +2510,7 @@ cmdMigrate (vshControl *ctl, const vshCm - * a libvirt URI, or a hypervisor specific URI. */ - - if (migrateuri != NULL) { -- vshError(ctl, FALSE, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); -+ vshError(ctl, "%s", _("migrate: Unexpected migrateuri for peer2peer/direct migration")); - goto done; - } - diff --git a/xen-list-defined.patch b/xen-list-defined.patch new file mode 100644 index 0000000..8b5cc01 --- /dev/null +++ b/xen-list-defined.patch @@ -0,0 +1,36 @@ +commit 7cfbb17978c467625afab866b7a22119789abee0 +Author: Matthias Bolte +Date: Thu Nov 26 00:09:40 2009 +0100 + + xen: Fix unconditional freeing in xenDaemonListDefinedDomains() + + Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of + the names array to be freed even on success, resulting in no listing of + defined but inactive Xen domains. + + Spotted by Jim Fehlig + +diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c +index e370eb8..4d9dcd1 100644 +--- a/src/xen/xend_internal.c ++++ b/src/xen/xend_internal.c +@@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames + break; + } + ++cleanup: ++ sexpr_free(root); ++ return(ret); ++ + error: + for (i = 0; i < ret; ++i) + VIR_FREE(names[i]); + +- sexpr_free(root); +- return(ret); ++ ret = -1; ++ ++ goto cleanup; + } + + /** diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 3188ac7..87e6ca6 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.2/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.2.orig/src/xen/xend_internal.c -+++ libvirt-0.7.2/src/xen/xend_internal.c -@@ -5324,7 +5324,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -5365,7 +5365,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xend-description-tag.patch b/xend-description-tag.patch new file mode 100644 index 0000000..cd0ef24 --- /dev/null +++ b/xend-description-tag.patch @@ -0,0 +1,36 @@ +From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001 +From: Jim Fehlig +Date: Mon, 7 Dec 2009 14:24:21 -0700 +Subject: [PATCH] Plumb domain description tag in xend backend + +xen-unstable changesets 20321 and 20521 added support for +description in xend domain config. This patch extends that +support in xend backend. +--- + src/xen/xend_internal.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +Index: libvirt-0.7.4/src/xen/xend_internal.c +=================================================================== +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn, + } + virUUIDParse(tmp, def->uuid); + ++ if (sexpr_node_copy(root, "domain/description", &def->description) < 0) ++ goto no_memory; ++ + hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0; + if (!hvm) { + if (sexpr_node_copy(root, "domain/bootloader", +@@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn, + virUUIDFormat(def->uuid, uuidstr); + virBufferVSprintf(&buf, "(uuid '%s')", uuidstr); + ++ if (def->description) ++ virBufferVSprintf(&buf, "(description '%s')", def->description); ++ + if (def->os.bootloader) { + if (def->os.bootloader[0]) + virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader);