[PATCH] Remove the default implied VirtualDevice on DiskRASD

# HG changeset patch # User Dan Smith <danms@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@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);

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@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.
I think there was some discussion about supplying defaults for all devices - so that there was some kind of fall back. But for disk, I can see why that would be a bad idea. =) +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Dan Smith
-
Kaitlin Rupert