[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: Use enum values for qemu version not raw numbers
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1332406949 0 # Node ID d05e264ad2a75b2b7481594bd6e6a0f83bd2d8d1 # Parent 9c79ece1988b51a6a2066b53e8861f15d2df3b55 libxl: Use enum values for qemu version not raw numbers Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson.citrix.com> --- diff -r 9c79ece1988b -r d05e264ad2a7 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Fri Mar 23 09:45:56 2012 -0400 +++ b/tools/libxl/libxl_create.c Thu Mar 22 09:02:29 2012 +0000 @@ -78,18 +78,20 @@ int libxl__domain_build_info_setdefault( if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) { if (!b_info->u.hvm.bios) switch (b_info->device_model_version) { - case 1: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_ROMBIOS; break; - case 2: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_SEABIOS; break; + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: + b_info->u.hvm.bios = LIBXL_BIOS_TYPE_ROMBIOS; break; + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: + b_info->u.hvm.bios = LIBXL_BIOS_TYPE_SEABIOS; break; default:return ERROR_INVAL; } /* Enforce BIOS<->Device Model version relationship */ switch (b_info->device_model_version) { - case 1: + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: if (b_info->u.hvm.bios != LIBXL_BIOS_TYPE_ROMBIOS) return ERROR_INVAL; break; - case 2: + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: if (b_info->u.hvm.bios == LIBXL_BIOS_TYPE_ROMBIOS) return ERROR_INVAL; break; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |