[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
Mon Mar 10 12:09:37 UTC 2008


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1205150870 -3600
# Node ID 8a864207add28f66b1b749aa0a01722aae8f88a4
# Parent  33213e77e6f58b3614ccc1ddb58db19e0112d034
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 33213e77e6f5 -r 8a864207add2 src/Virt_Device.c
--- a/src/Virt_Device.c	Mon Mar 10 13:02:27 2008 +0100
+++ b/src/Virt_Device.c	Mon Mar 10 13:07:50 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;
@@ -410,7 +410,7 @@ static CMPIStatus return_enum_devices(co
         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;
@@ -551,7 +551,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 33213e77e6f5 -r 8a864207add2 src/Virt_Device.h
--- a/src/Virt_Device.h	Mon Mar 10 13:02:27 2008 +0100
+++ b/src/Virt_Device.h	Mon Mar 10 13:07:50 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