libxl: allow 'phy' backend to use empty files
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 19 Feb 2016 18:01:55 +0000 (19:01 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 1 Apr 2016 14:09:05 +0000 (15:09 +0100)
commit612f150fa79ad51d6d8e260c6c6a085dfdadd0b6
treed83de908160617e4cc613168e817495bf3974022
parented04ca95981f539fec7b9d242d0ca0176e92cc23
libxl: allow 'phy' backend to use empty files

This was introduced by 97ee1f (~5 years ago), but was probably never
surfaced because most people used regular files as CDROM images, so the PHY
backend was actually never selected. A year ago this was changed, and now
regular RAW files are also handled by the PHY backend, which has made this
bug suface.

Fix it by allowing empty disks to use the PHY backend, skipping the stat
tests.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reported-by: Alex Braunegg <alex.braunegg@gmail.com>
tools/libxl/libxl_device.c