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

# HG changeset patch # User Richard Maciel <richardm@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@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;

Richard Maciel wrote:
# HG changeset patch # User Richard Maciel <richardm@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@br.ibm.com>
Hi Richard, Thanks for the changes. When you get review comments on a patch, you'll want to update the original patch with the changes. This looks like it's a patch on top of the first patch you sent. You can modify an existing patch using "hg qref". Also, as a convention, we number the updated patches. So you'll want to use "hg qref -e" to update the commit log so that the subject of the patch has a (#2) in front. You'll also want to update the commit log so that is lists what changes were made. I usually add something like the following at the bottom of the commit log: Changes from patch 1 to 2: -Fixed whitespace issues .... Also, you're still missing the new ConsoleRedirectionServiceCapabilities.h header file you created. You can add it to the patch using "hg add ConsoleRedirectionServiceCapabilities.h" and then "hg qref". Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

KR> You can modify an existing patch using "hg qref". Also, as a KR> convention, we number the updated patches. So you'll want to use KR> "hg qref -e" to update the commit log so that the subject of the KR> patch has a (#2) in front. You'll also want to update the commit KR> log so that is lists what changes were made. You might want to take a look at the doc/SubmittingPatches file in the tree, which documents a lot of these practices (this one is part f). Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com
participants (3)
-
Dan Smith
-
Kaitlin Rupert
-
Richard Maciel