[Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Service

Richard Maciel richardm at br.ibm.com
Thu Oct 16 22:50:25 UTC 2008


# HG changeset patch
# User Richard Maciel <richardm at br.ibm.com>
# Date 1224196932 25200
# Node ID 7fbd020ca47795c3528a698b3ddccc718cae9f2c
# Parent  ef98854352d7c0e7abbe2d77ba9d885ef61629e6
* Added association Console Redirections Service <-> Console Redirection Service
 Capabilities into the ElementCapabilities.c file

* Added ConsoleRedirectionServiceCapabilities.h to export the
get_console_rs_caps function
* get_console_rs_caps is not static anymore

Signed-off-by: Richard Maciel <richardm at br.ibm.com>

diff -r ef98854352d7 -r 7fbd020ca477 src/Makefile.am
--- a/src/Makefile.am	Thu Oct 16 13:28:42 2008 -0700
+++ b/src/Makefile.am	Thu Oct 16 15:42:12 2008 -0700
@@ -132,7 +132,7 @@
                                         -lVirt_VSMigrationService \
                                         -lVirt_DevicePool \
 					-lVirt_ConsoleRedirectionService \
-                                        -lVirt_ConsoleRedirectionServiceCapabilities
+					-lVirt_ConsoleRedirectionServiceCapabilities
 
 libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la
 libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c
diff -r ef98854352d7 -r 7fbd020ca477 src/Virt_ConsoleRedirectionServiceCapabilities.c
--- a/src/Virt_ConsoleRedirectionServiceCapabilities.c	Thu Oct 16 13:28:42 2008 -0700
+++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c	Thu Oct 16 15:42:12 2008 -0700
@@ -70,12 +70,10 @@
         return s;
 }
 
-/* Removed the static keyword from the function declaration to 
- * make it available for other modules */
 CMPIStatus get_console_rs_caps(const CMPIBroker *broker,
-                                      const CMPIObjectPath *ref,
-                                      CMPIInstance **_inst,
-                                      bool is_get_inst)
+                               const CMPIObjectPath *ref,
+                               CMPIInstance **_inst,
+                               bool is_get_inst)
 {
         CMPIStatus s = {CMPI_RC_OK, NULL};
         CMPIInstance *inst = NULL;
diff -r ef98854352d7 -r 7fbd020ca477 src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c	Thu Oct 16 13:28:42 2008 -0700
+++ b/src/Virt_ElementCapabilities.c	Thu Oct 16 15:42:12 2008 -0700
@@ -78,14 +78,13 @@
 
                 s = get_migration_service(ref, &_inst, _BROKER, context, false);
         } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) {
-		s = get_console_rs_caps(_BROKER, ref, &_inst, true);
+                s = get_console_rs_caps(_BROKER, ref, &_inst, true);
                 
-		if((s.rc != CMPI_RC_OK) || (_inst == NULL))
+                if((s.rc != CMPI_RC_OK) || (_inst == NULL))
                         goto out;
 
-
-		s = get_console_rs(ref, &_inst, _BROKER, context, false);
-	} else 
+                s = get_console_rs(ref, &_inst, _BROKER, context, false);
+        } else 
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_NOT_FOUND,
                            "Not found");
@@ -110,7 +109,6 @@
         char* classname;
 
         classname = class_base_name(CLASSNAME(ref));
-	CU_DEBUG("After class_base_name\n: %s", classname);
         if (STREQC(classname, "VirtualSystemManagementService")) {
                 s = get_vsms(ref, &_inst, _BROKER, context, true);
                 if ((s.rc != CMPI_RC_OK) || (_inst == NULL))
@@ -123,18 +121,15 @@
                         goto out;
 
                 s = get_migration_caps(ref, &_inst, _BROKER, false);
-        } else if(STREQC(classname, "ConsoleRedirectionService")) {
-		CU_DEBUG("before console_rs\n");
-		s = get_console_rs(ref, &_inst, _BROKER, context, true);
-		if((s.rc != CMPI_RC_OK) || (_inst == NULL))
-			goto out;
+        } else if (STREQC(classname, "ConsoleRedirectionService")) {
+                s = get_console_rs(ref, &_inst, _BROKER, context, true);
+                if((s.rc != CMPI_RC_OK) || (_inst == NULL))
+                        goto out;
 		
-		CU_DEBUG("before console_rs_caps\n");
-		s = get_console_rs_caps(_BROKER, ref, &_inst, false);	
-		if((s.rc != CMPI_RC_OK) || (_inst == NULL))
-			goto out;
-		CU_DEBUG("after console_rs_Caps\n");
-	} else
+                s = get_console_rs_caps(_BROKER, ref, &_inst, false);	
+                if((s.rc != CMPI_RC_OK) || (_inst == NULL))
+                        goto out;
+        } else
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_NOT_FOUND,
                            "");
@@ -211,8 +206,6 @@
 {
         CMPIInstance *inst = NULL;
         CMPIStatus s = {CMPI_RC_OK, NULL};
-
-	CU_DEBUG("service_to_cap\n");
 
         if (!match_hypervisor_prefix(ref, info))
                 goto out;




More information about the Libvirt-cim mailing list