On 04/20/2010 06:42 AM, Jiri Denemark wrote: > The problem is RelaxNG schema for domain XML only allows for absolute > path be used within <emulator/>. To workaround it, an extra '/' must be > add at the beginning of the path. That is, instead of "./qemu.sh" or > "../emulator/qemu.sh" one would use "/./qemu.sh" or > "/../emulator/qemu.sh". The extra slash is removed before further > processing. I don't like this workaround, it's very ugly but it's the > best option I was able to come up with. Relaxing domain XML schema is > not an option IMO. Yeah, it's a hack, but I think you have documented enough justification for it. > + if (vmdef->emulator && STRPREFIX(vmdef->emulator, "/.")) { > + if (!(emulator = strdup(vmdef->emulator + 1))) > + goto fail; > + free(vmdef->emulator); > + vmdef->emulator = NULL; > + if (virAsprintf(&vmdef->emulator, "%s/qemuxml2argvdata/%s", > + abs_srcdir, emulator) < 0) > + goto fail; > + } Do we want to reject the case if vmdef->emulator exists, but does not start with "/."? This is the first patch where I'm not sure if it should be applied if we decide that patch 7 should be TCK-only. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list