提交 5ecccf9d 编写于 作者: S Sukrit Bhatnagar 提交者: John Ferlan

qemu: Escape commas for qemuBuildDomainLoaderCommandLine

Add comma escaping for loader->path and loader->nvram.
Signed-off-by: NSukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 785f9340
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册