[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fix cd-insert problem not detecting type.



On Mon, 2013-03-11 at 16:17 +0000, Ian Jackson wrote:
> Frediano Ziglio writes ("[PATCH] Fix cd-insert problem not detecting type."):
> > String format used to parse file used target which does not handle
> > types. Append directly argument passes to command line so parser
> > handle type correctly.
> 
> Thanks for pointing out this problem.
> 
> The problem here seems to be that "xl cd-insert" takes a <target>.
> This is documented.  Your change would break some existing setups
> (where the <target> passed contained certain metacharacters).
> 
> But I think the current definition of "xl cd-insert" is wrongheaded.
> It should surely take a whole block device specification, with a
> special option passed to the parser to force "cdrom", and another
> special option passed to the parser to stop it failing if vdev isn't
> specified.
> 
> The caller should check that the vdev is either unspecified or
> specifies the same device.
> 
> In any case, I think the approach in the existing code of trying to
> unparse the user-supplied target into a string for the benefit of
> parse_disk_config is wrong.
> 
> What do other people think about this ?
> 
> Ian.

Just an addition,
  Fabio Fantoni (first reporter of this issue) say that on his side
patch is not working (it worked for me and I was able to change the cd
with an iso image). For some reason his setup try to use a file as a
physical device.

I think that changing XLU code (libxlu_disk_l.l) could just make some
other code break or move the parser back. I think we should keep the
command line syntax compatibility while updating internal code so
perhaps the better option is to detect is user tried to give a specific
type and add the correct "format" option to pass to parse_disk_config.
If you agree with this I can write a patch. Is not clear however which
"types" are supported for xl cd-insert command. It seems a mix of
backend (like "phy") and formats (like "raw"). Is this expected?

Frediano

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.