提交 21108d37 编写于 作者: C Cole Robinson

conf: Fix parsing python style triple quotes

An incorrect check broke matching the closing set of quotes. Update
tests to cover this case for XM config files.
上级 f57c0b23
...@@ -400,8 +400,9 @@ virConfParseString(virConfParserCtxtPtr ctxt) ...@@ -400,8 +400,9 @@ virConfParseString(virConfParserCtxtPtr ctxt)
ctxt->cur += 3; ctxt->cur += 3;
base = ctxt->cur; base = ctxt->cur;
/* Find the ending triple quotes */
while ((ctxt->cur + 2 < ctxt->end) && while ((ctxt->cur + 2 < ctxt->end) &&
(STRPREFIX(ctxt->cur, "\"\"\""))) { !(STRPREFIX(ctxt->cur, "\"\"\""))) {
if (CUR == '\n') if (CUR == '\n')
ctxt->line++; ctxt->line++;
NEXT; NEXT;
......
...@@ -19,7 +19,7 @@ vnc = 1 ...@@ -19,7 +19,7 @@ vnc = 1
vncunused = 1 vncunused = 1
vnclisten = "127.0.0.1" vnclisten = "127.0.0.1"
vncpasswd = "123poi" vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso&test,hdc:cdrom,r" ] disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso&test,hdc:cdrom,r", """phy:/dev/HostVG/XenGuest'",hdb,w""" ]
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ]
parallel = "none" parallel = "none"
serial = "none" serial = "none"
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
<target dev='hdc' bus='ide'/> <target dev='hdc' bus='ide'/>
<readonly/> <readonly/>
</disk> </disk>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest&apos;&quot;'/>
<target dev='hdb' bus='ide'/>
</disk>
<interface type='bridge'> <interface type='bridge'>
<mac address='00:16:3e:66:92:9c'/> <mac address='00:16:3e:66:92:9c'/>
<source bridge='xenbr1'/> <source bridge='xenbr1'/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册