[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: Remove libxl_device_model_info.type.
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1328023312 0 # Node ID a0a55668f3f593ff6d7d79c4270b33ee1ceb4797 # Parent 2708eb2a3fc76915d6e7407caf3215b38a2dc819 libxl: Remove libxl_device_model_info.type. This is the type of the target guest which is part of the guest config. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- diff -r 2708eb2a3fc7 -r a0a55668f3f5 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Tue Jan 31 15:21:52 2012 +0000 +++ b/tools/libxl/libxl_create.c Tue Jan 31 15:21:52 2012 +0000 @@ -605,7 +605,6 @@ memset((void*)&xenpv_dm_info, 0, sizeof(libxl_device_model_info)); xenpv_dm_info.device_model_version = d_config->dm_info.device_model_version; - xenpv_dm_info.type = d_config->dm_info.type; xenpv_dm_info.device_model = d_config->dm_info.device_model; xenpv_dm_info.extra = d_config->dm_info.extra; xenpv_dm_info.extra_pv = d_config->dm_info.extra_pv; diff -r 2708eb2a3fc7 -r a0a55668f3f5 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Tue Jan 31 15:21:52 2012 +0000 +++ b/tools/libxl/libxl_dm.c Tue Jan 31 15:21:52 2012 +0000 @@ -77,7 +77,7 @@ const libxl_device_model_info *info) { const libxl_vnc_info *vnc = NULL; - if (info->type == LIBXL_DOMAIN_TYPE_HVM) { + if (guest_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM) { vnc = &guest_config->b_info.u.hvm.vnc; } else if (guest_config->num_vfbs > 0) { vnc = &guest_config->vfbs[0].vnc; @@ -89,7 +89,7 @@ const libxl_device_model_info *info) { const libxl_sdl_info *sdl = NULL; - if (info->type == LIBXL_DOMAIN_TYPE_HVM) { + if (guest_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM) { sdl = &guest_config->b_info.u.hvm.sdl; } else if (guest_config->num_vfbs > 0) { sdl = &guest_config->vfbs[0].sdl; @@ -100,7 +100,7 @@ static const char *dm_keymap(const libxl_domain_config *guest_config, const libxl_device_model_info *info) { - if (info->type == LIBXL_DOMAIN_TYPE_HVM) { + if (guest_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM) { return guest_config->b_info.u.hvm.keymap; } else if (guest_config->num_vfbs > 0) { return guest_config->vfbs[0].keymap; @@ -171,7 +171,7 @@ if (keymap) { flexarray_vappend(dm_args, "-k", keymap, NULL); } - if (info->type == LIBXL_DOMAIN_TYPE_HVM) { + if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) { int ioemu_vifs = 0; if (b_info->u.hvm.serial) { @@ -254,7 +254,7 @@ for (i = 0; info->extra && info->extra[i] != NULL; i++) flexarray_append(dm_args, info->extra[i]); flexarray_append(dm_args, "-M"); - switch (info->type) { + switch (b_info->type) { case LIBXL_DOMAIN_TYPE_PV: flexarray_append(dm_args, "xenpv"); for (i = 0; info->extra_pv && info->extra_pv[i] != NULL; i++) @@ -353,7 +353,7 @@ flexarray_append(dm_args, "-mon"); flexarray_append(dm_args, "chardev=libxl-cmd,mode=control"); - if (info->type == LIBXL_DOMAIN_TYPE_PV) { + if (b_info->type == LIBXL_DOMAIN_TYPE_PV) { flexarray_append(dm_args, "-xen-attach"); } @@ -400,7 +400,7 @@ flexarray_vappend(dm_args, "-k", keymap, NULL); } - if (info->type == LIBXL_DOMAIN_TYPE_HVM) { + if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) { int ioemu_vifs = 0; if (b_info->u.hvm.serial) { @@ -498,7 +498,7 @@ for (i = 0; info->extra && info->extra[i] != NULL; i++) flexarray_append(dm_args, info->extra[i]); flexarray_append(dm_args, "-M"); - switch (info->type) { + switch (b_info->type) { case LIBXL_DOMAIN_TYPE_PV: flexarray_append(dm_args, "xenpv"); for (i = 0; info->extra_pv && info->extra_pv[i] != NULL; i++) @@ -517,7 +517,7 @@ libxl__sprintf(gc, "%d", libxl__sizekb_to_mb(b_info->target_memkb))); - if (info->type == LIBXL_DOMAIN_TYPE_HVM) { + if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) { for (i = 0; i < num_disks; i++) { int disk, part; int dev_number = @@ -700,6 +700,7 @@ libxl_uuid_copy(&dm_config.c_info.uuid, &info->uuid); memset(&dm_config.b_info, 0x00, sizeof(libxl_domain_build_info)); + dm_config.b_info.type = dm_config.c_info.type; dm_config.b_info.max_vcpus = 1; dm_config.b_info.max_memkb = 32 * 1024; dm_config.b_info.target_memkb = dm_config.b_info.max_memkb; @@ -828,7 +829,6 @@ memset((void*)&xenpv_dm_info, 0, sizeof(libxl_device_model_info)); xenpv_dm_info.device_model_version = info->device_model_version; - xenpv_dm_info.type = LIBXL_DOMAIN_TYPE_PV; xenpv_dm_info.device_model = info->device_model; xenpv_dm_info.extra = info->extra; xenpv_dm_info.extra_pv = info->extra_pv; diff -r 2708eb2a3fc7 -r a0a55668f3f5 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Tue Jan 31 15:21:52 2012 +0000 +++ b/tools/libxl/libxl_types.idl Tue Jan 31 15:21:52 2012 +0000 @@ -261,7 +261,6 @@ # you set device_model you must set device_model_version too ("device_model", string), ("saved_state", string), - ("type", libxl_domain_type), # extra parameters pass directly to qemu, NULL terminated ("extra", libxl_string_list), # extra parameters pass directly to qemu for PV guest, NULL terminated diff -r 2708eb2a3fc7 -r a0a55668f3f5 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Tue Jan 31 15:21:52 2012 +0000 +++ b/tools/libxl/xl_cmdimpl.c Tue Jan 31 15:21:52 2012 +0000 @@ -1300,8 +1300,6 @@ b_info->u.hvm.xen_platform_pci = l; } - dm_info->type = c_info->type; - xlu_cfg_destroy(config); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |