[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 4/4] libxl: fix cd-eject
Roger Pau Monné writes ("Re: [PATCH v4 4/4] libxl: fix cd-eject"): > Should we allow the PHY backend to handle empty files? > (pdev_path == NULL || pdev_path == ""). Yes. That is how it is supposed to work. I think this was broken in in 97ee1f5d "libxl: add support for image files for NetBSD" in 2011 (!) where this happened: - if (a->disk->format != LIBXL_DISK_FORMAT_EMPTY && - !S_ISBLK(a->stab.st_mode)) { - LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend phy" - " unsuitable as phys path not a block device", - a->disk->vdev); - return 0; - } - return backend; + if (libxl__try_phy_backend(a->stab.st_mode)) + return backend; ... [libxl_linux.c:] ... +int libxl__try_phy_backend(mode_t st_mode) +{ + if (!S_ISBLK(st_mode)) { + return 0; + } + + return 1; +} Note that the "a->disk->format != LIBXL_DISK_FORMAT_EMPTY" clause has been lost. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |