xl: support xend empty cdrom device syntax
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 26 Jul 2012 09:35:36 +0000 (10:35 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 26 Jul 2012 09:35:36 +0000 (10:35 +0100)
commita413f5a5f4463bc805c297bc2d328f1da17f3b1b
tree08eb3b82767b221c3568794c4a9c9894e37199d8
parentc902f397d67d3fa959d46a0373230da3f8c8af92
xl: support xend empty cdrom device syntax

xend accepts `,hdc:cdrom,r' as an empty CDROM drive.  However this is
not consistent with the existing xl syntax in
docs/misc/xl-disk-configuration.txt which requires `,,hdc:cdrom,r'
(the additional positional paramter is the format).

We fix this by spotting the case specially: when the target is empty
and the format contains a colon, reinterpret the format as
<vdev>:<devtype>.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
docs/misc/xl-disk-configuration.txt
tools/libxl/check-xl-disk-parse
tools/libxl/libxlu_disk_l.c
tools/libxl/libxlu_disk_l.h
tools/libxl/libxlu_disk_l.l