From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel De Graaf Subject: Re: [PATCH] libxlu: correctly parse disk "backendtype" field Date: Fri, 07 Oct 2011 18:28:35 -0400 Message-ID: <4E8F7D13.1040409@tycho.nsa.gov> References: <50cd0fd187b39a263680.1317313232@localhost.localdomain> <4E8F660C.4010405@tycho.nsa.gov> <1318023688.13747.28.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1318023688.13747.28.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org On 10/07/2011 05:41 PM, Ian Campbell wrote: > On Fri, 2011-10-07 at 21:50 +0100, Daniel De Graaf wrote: >> The expression for backendtype was missing a comma. > > This appears correct even though things seem to work without, at least: > xl -N block-attach 0 backendtype=phy,vdev=xvdb,access=w,target=/dev/vg/guest-volume > works as expected. Do you have a test case which fails or did you just > find by code inspection? > > Acked-by: Ian Campbell > > (we need a signed-off-by I suspect) > Signed-off-by: Daniel De Graaf Found when xl was parsing a configuration file with the disk line: disk = [ 'backendtype=phy,backend=3,vdev=xvda,access=w,target=/dev/clam/vm1' ] This is after adding another patch allowing backend domain ID for disk/vif to be changed in the config, so it may or may not show up on its own; I didn't test the new syntax until I needed it. >> >> --- a/tools/libxl/libxlu_disk_l.l >> +++ b/tools/libxl/libxlu_disk_l.l >> @@ -139,7 +139,7 @@ devtype=disk,? { DPC->disk->is_cdrom = 0; } >> devtype=[^,]*,? { xlu__disk_err(DPC,yytext,"unknown value for type"); } >> >> access=[^,]*,? { STRIP(','); setaccess(DPC, FROMEQUALS); } >> -backendtype=[^,]*? { STRIP(','); setbackendtype(DPC,FROMEQUALS); } >> +backendtype=[^,]*,? { STRIP(','); setbackendtype(DPC,FROMEQUALS); } >> >> vdev=[^,]*,? { STRIP(','); SAVESTRING("vdev", vdev, FROMEQUALS); } >> script=[^,]*,? { STRIP(','); SAVESTRING("script", script, FROMEQUALS); } >