
On 10/29/2010 04:37 AM, Daniel P. Berrange wrote:
On Thu, Oct 28, 2010 at 07:28:34PM +0900, KAMEZAWA Hiroyuki wrote:
From bc55de1e6a8506adcde52aa95e2be9d4bb5bfb2e Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Date: Thu, 28 Oct 2010 17:51:18 +0900 Subject: [PATCH 2/2] check compression program availabilityy of virsh save and dump.
I fixed that typo (s/yy/y/)...
--- src/qemu/qemu_driver.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 51ad50b..61dc6e8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5740,6 +5740,22 @@ cleanup: return ret; }
+/* returns 1 if a compression program is available in PATH */ +static int qemudCompressProgramAvailable(int compress)
changed this to use enum qemud_save_formats and return bool in the signature...
ACK
and pushed. Here's the incremental diff: diff --git i/src/qemu/qemu_driver.c w/src/qemu/qemu_driver.c index 9a5f5b9..a7cce6a 100644 --- i/src/qemu/qemu_driver.c +++ w/src/qemu/qemu_driver.c @@ -5742,20 +5742,20 @@ cleanup: return ret; } -/* returns 1 if a compression program is available in PATH */ -static int qemudCompressProgramAvailable(int compress) +/* Returns true if a compression program is available in PATH */ +static bool qemudCompressProgramAvailable(enum qemud_save_formats compress) { const char *prog; char *c; if (compress == QEMUD_SAVE_FORMAT_RAW) - return 1; + return true; prog = qemudSaveCompressionTypeToString(compress); c = virFindFileInPath(prog); if (!c) - return 0; + return false; VIR_FREE(c); - return 1; + return true; } static int qemudDomainSave(virDomainPtr dom, const char *path) -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org