mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Escape commas for qemuBuildDomainLoaderCommandLine
Add comma escaping for loader->path and loader->nvram. Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
785f9340f6
commit
5ecccf9d27
@ -9312,9 +9312,9 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
|
||||
NULL);
|
||||
}
|
||||
|
||||
virBufferAsprintf(&buf,
|
||||
"file=%s,if=pflash,format=raw,unit=%d",
|
||||
loader->path, unit);
|
||||
virBufferAddLit(&buf, "file=");
|
||||
virQEMUBuildBufferEscapeComma(&buf, loader->path);
|
||||
virBufferAsprintf(&buf, ",if=pflash,format=raw,unit=%d", unit);
|
||||
unit++;
|
||||
|
||||
if (loader->readonly) {
|
||||
@ -9327,9 +9327,9 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
|
||||
|
||||
if (loader->nvram) {
|
||||
virBufferFreeAndReset(&buf);
|
||||
virBufferAsprintf(&buf,
|
||||
"file=%s,if=pflash,format=raw,unit=%d",
|
||||
loader->nvram, unit);
|
||||
virBufferAddLit(&buf, "file=");
|
||||
virQEMUBuildBufferEscapeComma(&buf, loader->nvram);
|
||||
virBufferAsprintf(&buf, ",if=pflash,format=raw,unit=%d", unit);
|
||||
|
||||
virCommandAddArg(cmd, "-drive");
|
||||
virCommandAddArgBuffer(cmd, &buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user