[Libvirt-cim] [PATCH] Remove the default implied VirtualDevice on DiskRASD

Dan Smith danms at us.ibm.com
Wed Sep 10 16:21:37 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1221063481 25200
# Node ID 3cb0397e2fe6d621f276a1b6453300f0e266dd58
# Parent  e4e78fce79575db03c1629d625a53ec13f33992b
Remove the default implied VirtualDevice on DiskRASD

I'm not sure what I was thinking when I allowed the client to not specify
a VirtualDevice for a given disk, but this patch removes that and turns
it into an error.

The Address field needs to have similar semantics, but will be a little
more complicated for CDROM and thus will be handled in the upcoming set.

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r e4e78fce7957 -r 3cb0397e2fe6 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c	Fri Sep 05 11:55:57 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c	Wed Sep 10 09:18:01 2008 -0700
@@ -440,7 +440,7 @@
         const char *val = NULL;
 
         if (cu_get_str_prop(inst, "VirtualDevice", &val) != CMPI_RC_OK)
-                val = "hda";
+                return "Missing `VirtualDevice' property";
 
         free(dev->dev.disk.virtual_dev);
         dev->dev.disk.virtual_dev = strdup(val);




More information about the Libvirt-cim mailing list