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

Re: [Xen-devel] [PATCH 4/8] libxl: Move check for local access to a funciton



On 17/03/16 18:11, Ian Jackson wrote:
> George Dunlap writes ("[PATCH 4/8] libxl: Move check for local access to a 
> funciton"):
>> +static char * libxl__device_disk_find_local_path(libxl__gc *gc, 
>> +                                                 const libxl_device_disk 
>> *disk) {
> ...
>> +    if (disk->format == LIBXL_DISK_FORMAT_RAW
>> +        && disk->script == NULL
>> +        && disk->pdev_path) {
> 
> libxl__device_disk_local_initiate_attach asserts pdev_path.  Do you
> foresee it maybe being NULL and if so how ?

I think I must have been copying the existing code, which checks for
pdev_path of disk (rather than in_disk, which is what's being passed to
this function).

In the next patch this will also be called from the devicemodel code,
but that code dereferences disk[i].pdev_path (implicitly assuming that
it will never be null), so I think we can drop this check.

Ack on the other two comments.

 -George


_______________________________________________
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®.