]> xenbits.xensource.com Git - libvirt.git/commit
qemu: work around dash 0.5.5 bug in managed save
authorEric Blake <eblake@redhat.com>
Fri, 22 Oct 2010 23:26:08 +0000 (17:26 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 26 Oct 2010 15:31:42 +0000 (09:31 -0600)
commitf22e670b4a594371681f9bef7035713fdd907a46
treec28a620a6bcb02be880e801c9047fcf853d2857d
parentff9bbffcd9923677b78ad61623ce44c3b4f206a3
qemu: work around dash 0.5.5 bug in managed save

Older dash mistakenly truncates regular files when using <> redirection;
this kills our use of double dd to reduce storage overhead when
saving qemu images.  But qemu insists on running a command through
/bin/sh, so we work around it by having qemu run $sh -c 'real command'
when we have a replacement $sh in mind.

* configure.ac (VIR_WRAPPER_SHELL): Define to a replacement shell,
if /bin/sh is broken on <> redirection.
* src/qemu/qemu_monitor.h (VIR_WRAPPER_SHELL_PREFIX)
(VIR_WRAPPER_SHELL_SUFFIX): New macros.
* src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrateToFile): Use
them.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONMigrateToFile):
Likewise.
configure.ac
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c