|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] libxl_cdrom_insert
Do we know the rationale behind setting disk->physpath to "" in the
below code in libxl? Hopefully there is more to it than to avoid a
potential null pointer crash at a later point :)
int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid,
libxl_device_disk *disk) {
int num, i;
uint32_t stubdomid;
libxl_device_disk *disks;
int ret = ERROR_FAIL;
if (!disk->physpath) {
disk->physpath = "";
disk->phystype = PHYSTYPE_PHY;
}
Here is why I ask - I moved the disk file path validation code to
libxl and was looking at the code in that area and stumbled on this.
With the above logic the validate code I wrote will fail for cdrom
insert as I am validating the block device path also. So, if I am
going to special case this I would like to first understand why I
would want to do that.
Kamala
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] libxl_cdrom_insert,
Kamala Narasimhan <=
|
|
|
|
|