]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: support disk filenames with comma
authorEric Blake <eblake@redhat.com>
Fri, 9 Mar 2012 19:13:30 +0000 (16:13 -0300)
committerEric Blake <eblake@redhat.com>
Mon, 12 Mar 2012 14:09:37 +0000 (08:09 -0600)
commit6e0ff1d4024ca44fab307a89da1968f7b03cd482
tree758488648691a30803e5e954df1f9bbc9913c9ae
parentdd39f13af0ee953ea4c30c99eb8e5a39eaccbb8e
qemu: support disk filenames with comma

If there is a disk file with a comma in the name, QEmu expects a double
comma instead of a single one (e.g., the file "virtual,disk.img" needs
to be specified as "virtual,,disk.img" in QEmu's command line). This
patch fixes libvirt to work with that feature. Fix RHBZ #801036.

Based on an initial patch by Crístian Viana.

* src/util/buf.h (virBufferEscape): Alter signature.
* src/util/buf.c (virBufferEscape): Add parameter.
(virBufferEscapeSexpr): Fix caller.
* src/qemu/qemu_command.c (qemuBuildRBDString): Likewise.  Also
escape commas in file names.
(qemuBuildDriveStr): Escape commas in file names.
* docs/schemas/basictypes.rng (absFilePath): Relax RNG to allow
commas in input file names.
* tests/qemuxml2argvdata/*-disk-drive-network-sheepdog.*: Update
test.

Signed-off-by: Eric Blake <eblake@redhat.com>
docs/schemas/basictypes.rng
src/qemu/qemu_command.c
src/util/buf.c
src/util/buf.h
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml