[libvirt] [PATCH 4/4] PowerPC : Do not allow floppy disks in domain XML.

Ján Tomko jtomko at redhat.com
Tue Feb 17 12:56:37 UTC 2015


On Sun, Feb 15, 2015 at 10:02:25AM +0530, Prerna Saxena wrote:
> 
> Subject: [PATCH 4/4] PowerPC : Do not allow floppy disks in domain XML.
> 
> PowerKVM does not support floppy disks. Ensure that libvirt honours this.
> Fixes : https://bugzilla.redhat.com/show_bug.cgi?id=1180486
> 
> Signed-off-by: Prerna Saxena <prerna at linux.vnet.ibm.com>
> ---
>  src/conf/domain_conf.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 6a57d80..df3a768 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -13892,6 +13892,14 @@ virDomainDefParseXML(xmlDocPtr xml,
>          if (!disk)
>              goto error;
>  
> +        if (ARCH_IS_PPC64(def->os.arch) &&
> +            STREQLEN(def->os.machine, "pseries", 7) &&

Using STRPREFIX eliminates the magic constant.

> +            disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) {
> +                virReportError(VIR_ERR_INTERNAL_ERROR,

VIR_ERR_CONFIG_UNSUPPORTED would be a better code.

> +                          _("Pseries machine does not support floppy device"));

This fails 'make syntax-check':
src/conf/domain_conf.c:14067: virReportError(VIR_ERR_INTERNAL_ERROR,
src/conf/domain_conf.c-14068-                 _("Pseries machine does not support floppy device"));
maint.mk: found diagnostic without %
cfg.mk:657: recipe for target 'sc_prohibit_diagnostic_without_format'failed

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150217/d2053caf/attachment-0001.sig>


More information about the libvir-list mailing list