WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [xen-devel][PATCH 2/5] Xl interface change plus changes to code it i

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [xen-devel][PATCH 2/5] Xl interface change plus changes to code it impacts
From: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxx>
Date: Thu, 10 Feb 2011 09:44:27 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 Feb 2011 06:45:18 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=UZoywcXTxS+5AaEUnu4NY9V1W1eKH6WzV63DhhAqihw=; b=AiClf7OuXamN34JB8zi2n+uwfE64mh7Agc6dbGtIvraASAalofCDPjCL4vFZvwlXgu UbaFnr9Brx/6JIDXoKji4g0QYduewNVbB7zcWf7lsCv+PE+PNiSFbay0DS7rTh3jxgUE kREORfrqnUr4Z5hinL5GcWXiabfbqA728iti0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Z6kjmO4WbLhPP58uPiKPEmnCz9xgtNqowhKRRm2GTFSp0AIMthCzqw7OFQOT+lcPFT DDTKrz4ckAr3UI0v3hR4cNF00dNEedfggwL9NQedkrpbLA4mYvvBYbaWy/qoCj7SrOIV aWm551wIMZMprN2iF/vSP/TrDHlFO5jhOKF6c=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1297329798.19526.20.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D5060EB.3060109@xxxxxxxxx> <4D52DB1E.6080101@xxxxxxxxx> <1297329798.19526.20.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20101027)
Ian Campbell wrote:
>> -static int validate_virtual_disk(libxl_ctx *ctx, char *file_name,
>> libxl_disk_phystype disk_type)
>> +static int validate_virtual_disk(libxl_ctx *ctx, char *file_name, 
>> +    libxl_disk_backend backend_type, libxl_disk_format format)
>>  {
>>      struct stat stat_buf;
>>  
>> -    if ( (file_name[0] == '\0') && (disk_type == PHYSTYPE_EMPTY) )
>> +    if ((file_name[0] == '\0') && (format == DISK_FORMAT_EMPTY))
>>          return 0;
> 
> If format == DISK_FORMAT_EMPTY then does the content of file_name
> matter?
>
Good catch!  Just checking for format should do.  I will make that change.

> Alternatively, if format == DISK_FORMAT_EMPTY then is file_name != ""
> actually an error?
> 
Ideally we should never end up that way as our code checks the string before
setting format to DISK_FORMAT_EMPTY.

Kamala

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