[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 11 of 32 RFC] libxl: drop dm_info.dom_name
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1326304712 0 # Node ID 3db40f3e8b2af814b9f79b514de82c3751c213f8 # Parent a27ac2ae9cefc42e3eee504cb2805824fd80d3f8 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> diff -r a27ac2ae9cef -r 3db40f3e8b2a tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Wed Jan 11 17:50:21 2012 +0000 +++ b/tools/libxl/libxl_create.c Wed Jan 11 17:58:32 2012 +0000 @@ -121,7 +121,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 a27ac2ae9cef -r 3db40f3e8b2a tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Wed Jan 11 17:50:21 2012 +0000 +++ b/tools/libxl/libxl_dm.c Wed Jan 11 17:58:32 2012 +0000 @@ -86,6 +86,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; @@ -99,8 +100,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; @@ -247,6 +248,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; @@ -276,8 +278,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; @@ -803,6 +805,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; @@ -845,7 +848,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); @@ -991,8 +996,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) @@ -1007,7 +1010,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 a27ac2ae9cef -r 3db40f3e8b2a tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Wed Jan 11 17:50:21 2012 +0000 +++ b/tools/libxl/libxl_types.idl Wed Jan 11 17:58:32 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 |