[Libvirt-cim] [PATCH 1 of 3] Device: rename device_type_from_classname to res_type_from_device_classname

Heidi Eckhart heidieck at linux.vnet.ibm.com
Fri Mar 7 12:29:55 UTC 2008


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1204892346 -3600
# Node ID 8254cdd50092090275d925319e125651f6a133a8
# Parent  d24e8fe2d358588a2d3a6484111806e1986d90fa
Device: rename device_type_from_classname to res_type_from_device_classname

for consistency with the other providers.

Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>

diff -r d24e8fe2d358 -r 8254cdd50092 src/Virt_Device.c
--- a/src/Virt_Device.c	Fri Mar 07 13:19:05 2008 +0100
+++ b/src/Virt_Device.c	Fri Mar 07 13:19:06 2008 +0100
@@ -268,7 +268,7 @@ static CMPIInstance *device_instance(con
         return instance;
 }
 
-uint16_t device_type_from_classname(const char *classname)
+uint16_t res_type_from_device_classname(const char *classname)
 {
         if (strstr(classname, "NetworkPort"))
                 return CIM_RES_TYPE_NET;
@@ -408,7 +408,7 @@ static CMPIStatus return_enum_devices(co
         inst_list_init(&list);
 
         s = enum_devices(_BROKER, reference, NULL, 
-                         device_type_from_classname(CLASSNAME(reference)),
+                         res_type_from_device_classname(CLASSNAME(reference)),
                          &list);
         if (s.rc != CMPI_RC_OK)
                 goto out;
@@ -552,7 +552,7 @@ CMPIStatus get_device_by_ref(const CMPIB
         s = get_device_by_name(broker, 
                                reference, 
                                name, 
-                               device_type_from_classname(CLASSNAME(reference)), 
+                               res_type_from_device_classname(CLASSNAME(reference)), 
                                &inst);
         if (s.rc != CMPI_RC_OK)
                 goto out;
diff -r d24e8fe2d358 -r 8254cdd50092 src/Virt_Device.h
--- a/src/Virt_Device.h	Fri Mar 07 13:19:05 2008 +0100
+++ b/src/Virt_Device.h	Fri Mar 07 13:19:06 2008 +0100
@@ -69,7 +69,7 @@ CMPIStatus get_device_by_name(const CMPI
                               const uint16_t type,
                               CMPIInstance **_inst);
 
-uint16_t device_type_from_classname(const char *classname);
+uint16_t res_type_from_device_classname(const char *classname);
 
 #endif
 




More information about the Libvirt-cim mailing list