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

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


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

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