[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 10 of 20] libxl: drop dm_info.dom_name
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1327336698 0 # Node ID e5bc9888a14f19b625489b6b2cd7206c9f3be262 # Parent ceec8103098f611789c4fe6405b7f681d8b21f0e libxl: drop dm_info.dom_name This is always the same as the c_info name which we now have available. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> diff -r ceec8103098f -r e5bc9888a14f tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Mon Jan 23 16:38:18 2012 +0000 +++ b/tools/libxl/libxl_create.c Mon Jan 23 16:38:18 2012 +0000 @@ -115,7 +115,6 @@ int libxl_init_dm_info(libxl_ctx *ctx, libxl_uuid_generate(&dm_info->uuid); - dm_info->dom_name = strdup(c_info->name); dm_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; dm_info->device_model_stubdomain = false; dm_info->device_model = NULL; diff -r ceec8103098f -r e5bc9888a14f tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Mon Jan 23 16:38:18 2012 +0000 +++ b/tools/libxl/libxl_dm.c Mon Jan 23 16:38:18 2012 +0000 @@ -78,6 +78,7 @@ static char ** libxl__build_device_model const libxl_domain_config *guest_config, const libxl_device_model_info *info) { + const libxl_domain_create_info *c_info = &guest_config->c_info; const libxl_domain_build_info *b_info = &guest_config->b_info; const libxl_device_nic *vifs = guest_config->vifs; const int num_vifs = guest_config->num_vifs; @@ -91,8 +92,8 @@ static char ** libxl__build_device_model flexarray_vappend(dm_args, dm, "-d", libxl__sprintf(gc, "%d", info->domid), NULL); - if (info->dom_name) - flexarray_vappend(dm_args, "-domain-name", info->dom_name, NULL); + if (c_info->name) + flexarray_vappend(dm_args, "-domain-name", c_info->name, NULL); if (info->vnc.enable) { char *vncarg; @@ -239,6 +240,7 @@ static char ** libxl__build_device_model const libxl_device_model_info *info) { libxl_ctx *ctx = libxl__gc_owner(gc); + const libxl_domain_create_info *c_info = &guest_config->c_info; const libxl_domain_build_info *b_info = &guest_config->b_info; const libxl_device_disk *disks = guest_config->disks; const libxl_device_nic *vifs = guest_config->vifs; @@ -268,8 +270,8 @@ static char ** libxl__build_device_model flexarray_append(dm_args, "-xen-attach"); } - if (info->dom_name) { - flexarray_vappend(dm_args, "-name", info->dom_name, NULL); + if (c_info->name) { + flexarray_vappend(dm_args, "-name", c_info->name, NULL); } if (info->vnc.enable) { int display = 0; @@ -793,6 +795,7 @@ int libxl__create_device_model(libxl__gc libxl_device_model_info *info, libxl__spawner_starting **starting_r) { + const libxl_domain_create_info *c_info = &guest_config->c_info; libxl_ctx *ctx = libxl__gc_owner(gc); char *path, *logfile; int logfile_w, null; @@ -835,7 +838,9 @@ int libxl__create_device_model(libxl__gc xs_mkdir(ctx->xsh, XBT_NULL, path); libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/disable_pf", path), "%d", !info->xen_platform_pci); - libxl_create_logfile(ctx, libxl__sprintf(gc, "qemu-dm-%s", info->dom_name), &logfile); + libxl_create_logfile(ctx, + libxl__sprintf(gc, "qemu-dm-%s", c_info->name), + &logfile); logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644); free(logfile); null = open("/dev/null", O_RDONLY); @@ -981,8 +986,6 @@ static int libxl__build_xenpv_qemu_args( libxl_device_vfb *vfb, libxl_device_model_info *info) { - libxl_ctx *ctx = libxl__gc_owner(gc); - if (vfb != NULL) { info->vnc.enable = vfb->vnc.enable; if (vfb->vnc.listen) @@ -997,7 +1000,6 @@ static int libxl__build_xenpv_qemu_args( } else info->nographic = 1; info->domid = domid; - info->dom_name = libxl_domid_to_name(ctx, domid); return 0; } diff -r ceec8103098f -r e5bc9888a14f tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Mon Jan 23 16:38:18 2012 +0000 +++ b/tools/libxl/libxl_types.idl Mon Jan 23 16:38:18 2012 +0000 @@ -241,7 +241,6 @@ libxl_device_model_info = Struct("device # uuid is used only with stubdom, and must be different from the # domain uuid ("uuid", libxl_uuid), - ("dom_name", string), ("device_model_version", libxl_device_model_version), ("device_model_stubdomain", bool), # you set device_model you must set device_model_version too _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |