[PATCH] Make migration return proper value for "Job Started"

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1205353332 25200 # Node ID 4aa425bba4e2f0834001bef08766e06a83c50da2 # Parent 42b808d88849cbc642af67b2769b120624f66a42 Make migration return proper value for "Job Started" Changes: - Use a constant for return value. This seems to be a convention at least in the SVPC profiles, although it's relatively informally defined. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 42b808d88849 -r 4aa425bba4e2 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Mar 12 09:47:04 2008 -0700 +++ b/src/Virt_VSMigrationService.c Wed Mar 12 13:22:12 2008 -0700 @@ -40,6 +40,7 @@ #include "Virt_HostSystem.h" #include "Virt_ComputerSystem.h" #include "Virt_VSMigrationSettingData.h" +#include "svpc_types.h" #define CIM_JOBSTATE_STARTING 3 #define CIM_JOBSTATE_RUNNING 4 @@ -307,7 +308,7 @@ static CMPIStatus vs_migratable(const CM if (s.rc != CMPI_RC_OK) goto out; - retcode = 0; + retcode = CIM_SVPC_RETURN_COMPLETED; cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); @@ -933,7 +934,7 @@ static CMPIStatus migrate_do(const CMPIO thread = _BROKER->xft->newThread((void*)migration_thread, job, 0); - retcode = 0; + retcode = CIM_SVPC_RETURN_JOB_STARTED; out: CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); diff -r 42b808d88849 -r 4aa425bba4e2 src/svpc_types.h --- a/src/svpc_types.h Wed Mar 12 09:47:04 2008 -0700 +++ b/src/svpc_types.h Wed Mar 12 13:22:12 2008 -0700 @@ -44,6 +44,9 @@ const static int cim_res_types[CIM_RES_T /* Vendor-specific extension; should be documented somewhere */ #define CIM_VSSD_RECOVERY_PRESERVE 123 +#define CIM_SVPC_RETURN_JOB_STARTED 4096 +#define CIM_SVPC_RETURN_COMPLETED 0 + #include <libcmpiutil/libcmpiutil.h> #include <string.h>

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1205353332 25200 # Node ID 4aa425bba4e2f0834001bef08766e06a83c50da2 # Parent 42b808d88849cbc642af67b2769b120624f66a42 Make migration return proper value for "Job Started"
Changes: - Use a constant for return value. This seems to be a convention at least in the SVPC profiles, although it's relatively informally defined.
Ah, I see - this makes sense now, thanks! +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1205353332 25200 # Node ID 4aa425bba4e2f0834001bef08766e06a83c50da2 # Parent 42b808d88849cbc642af67b2769b120624f66a42 Make migration return proper value for "Job Started"
Changes: - Use a constant for return value. This seems to be a convention at least in the SVPC profiles, although it's relatively informally defined.
Signed-off-by: Dan Smith <danms@us.ibm.com>
OHMYGOD no don't modify VSMigrationService oh great now it's gonna crash but only on my machine and it's gonna take a week to figure out I'll just start gdb now and wait for it! ... +1 -- -Jay
participants (3)
-
Dan Smith
-
Jay Gagnon
-
Kaitlin Rupert