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

Re: [Xen-devel] [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk"



On Thu, 2011-05-12 at 15:36 +0100, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> [...]
> diff --git a/tools/libxl/libxlu_disk_l.l b/tools/libxl/libxlu_disk_l.l
> index 8e511ea..2738377 100644
> --- a/tools/libxl/libxlu_disk_l.l
> +++ b/tools/libxl/libxlu_disk_l.l
> @@ -100,6 +100,14 @@ static void setformat(DiskParseContext *dpc, const char 
> *str) {
>      else xlu__disk_err(dpc,str,"unknown value for format");
>  }
> 
> +/* Sets ->backend based on the string value.  This ought to be an enum. */

Is this an old comment? Backend is a libxl_disk_backend, which _is_ an
enum.

> +static void setbackendtype(DiskParseContext *dpc, const char *str) {
> +    if (     !strcmp(str,"phy"))   DSET(dpc,backend,BACKEND,str,PHY);
> +    else if (!strcmp(str,"tap"))   DSET(dpc,backend,BACKEND,str,TAP);
> +    else if (!strcmp(str,"qdisk")) DSET(dpc,backend,BACKEND,str,QDISK);
> +    else xlu__disk_err(dpc,str,"unknown value for backendtype");
> +}
> +
>  #define DEPRECATE(usewhatinstead) /* not currently reported */
> 
>  %}

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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