# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1307036795 -3600
# Node ID 0791661a32d8eba917c87feacf2c955b85521ad1
# Parent f4f8359e6545ce4cfa96321646385e9e5cf52bb8
libxl: disks: rename disk param "unpluggable" to "removable"
This property corresponds to what is called "removable" in xenstore,
and is the conventional meaning of "removable": ie, the _media_ can be
removed even as the _device_ remains present.
"unpluggable" is a misleading name for this.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
diff -r f4f8359e6545 -r 0791661a32d8 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Thu Jun 02 18:46:34 2011 +0100
+++ b/tools/libxl/libxl.c Thu Jun 02 18:46:35 2011 +0100
@@ -707,7 +707,7 @@
disk->format = LIBXL_DISK_FORMAT_EMPTY;
/* this value is returned to the user: do not free right away */
disk->vdev = xs_read(ctx->xsh, XBT_NULL, libxl__sprintf(&gc, "%s/dev",
backend), NULL);
- disk->unpluggable = 1;
+ disk->removable = 1;
disk->readwrite = 0;
disk->is_cdrom = 1;
@@ -1047,7 +1047,7 @@
flexarray_append(back, "online");
flexarray_append(back, "1");
flexarray_append(back, "removable");
- flexarray_append(back, libxl__sprintf(&gc, "%d", (disk->unpluggable) ? 1 :
0));
+ flexarray_append(back, libxl__sprintf(&gc, "%d", (disk->removable) ? 1 :
0));
flexarray_append(back, "bootable");
flexarray_append(back, libxl__sprintf(&gc, "%d", 1));
flexarray_append(back, "state");
@@ -1590,7 +1590,7 @@
libxl__sprintf(gc, "%s/%s/type", be_path, *dir)),
&(pdisk->backend));
pdisk->vdev = xs_read(ctx->xsh, XBT_NULL, libxl__sprintf(gc,
"%s/%s/dev", be_path, *dir), &len);
- pdisk->unpluggable = atoi(libxl__xs_read(gc, XBT_NULL,
libxl__sprintf(gc, "%s/%s/removable", be_path, *dir)));
+ pdisk->removable = atoi(libxl__xs_read(gc, XBT_NULL,
libxl__sprintf(gc, "%s/%s/removable", be_path, *dir)));
if (!strcmp(libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,
"%s/%s/mode", be_path, *dir)), "w"))
pdisk->readwrite = 1;
else
diff -r f4f8359e6545 -r 0791661a32d8 tools/libxl/libxl.idl
--- a/tools/libxl/libxl.idl Thu Jun 02 18:46:34 2011 +0100
+++ b/tools/libxl/libxl.idl Thu Jun 02 18:46:35 2011 +0100
@@ -280,7 +280,7 @@
("backend", libxl_disk_backend),
("format", libxl_disk_format),
("script", string),
- ("unpluggable", integer),
+ ("removable", integer),
("readwrite", integer),
("is_cdrom", integer),
])
diff -r f4f8359e6545 -r 0791661a32d8 tools/libxl/libxl_utils.c
--- a/tools/libxl/libxl_utils.c Thu Jun 02 18:46:34 2011 +0100
+++ b/tools/libxl/libxl_utils.c Thu Jun 02 18:46:35 2011 +0100
@@ -556,7 +556,7 @@
libxl_string_to_backend(ctx, val, &(disk->backend));
disk->vdev = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/dev",
be_path));
val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/removable",
be_path));
- disk->unpluggable = !strcmp(val, "1");
+ disk->removable = !strcmp(val, "1");
val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/mode",
be_path));
disk->readwrite = !!strcmp(val, "w");
val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/device-type",
diskpath));
diff -r f4f8359e6545 -r 0791661a32d8 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Thu Jun 02 18:46:34 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c Thu Jun 02 18:46:35 2011 +0100
@@ -393,7 +393,7 @@
printf("\t\t\t(physpath %s)\n", d_config->disks[i].pdev_path);
printf("\t\t\t(phystype %d)\n", d_config->disks[i].backend);
printf("\t\t\t(virtpath %s)\n", d_config->disks[i].vdev);
- printf("\t\t\t(unpluggable %d)\n", d_config->disks[i].unpluggable);
+ printf("\t\t\t(unpluggable %d)\n", d_config->disks[i].removable);
printf("\t\t\t(readwrite %d)\n", d_config->disks[i].readwrite);
printf("\t\t\t(is_cdrom %d)\n", d_config->disks[i].is_cdrom);
printf("\t\t)\n");
@@ -591,7 +591,7 @@
*p = '\0';
if ( !strcmp(tok, "cdrom") ) {
disk->is_cdrom = 1;
- disk->unpluggable = 1;
+ disk->removable = 1;
}else{
fprintf(stderr, "Unknown virtual disk type: %s\n", tok);
return 0;
@@ -4181,7 +4181,7 @@
return 1;
}
disk.vdev = argv[optind+2];
- disk.unpluggable = 1;
+ disk.removable = 1;
disk.readwrite = ((argc-optind <= 3) || (argv[optind+3][0] == 'w'));
if (domain_qualifier_to_domid(argv[optind], &fe_domid, 0) < 0) {
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|