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

Dan Smith danms at us.ibm.com
Mon Oct 20 14:27:59 UTC 2008


RM> -                                        -lVirt_DevicePool
RM> +                                        -lVirt_DevicePool \
RM> +					-lVirt_ConsoleRedirectionService \
RM> +					-lVirt_ConsoleRedirectionServiceCapabilities

You're using spaces (correct) for the first added line and tabs
(incorrect) for the last two.

RM> +        } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) {
RM> +                s = get_console_rs_caps(_BROKER, ref, &_inst, true);
RM> +                
RM> +                if((s.rc != CMPI_RC_OK) || (_inst == NULL))
RM> +                        goto out;

You need a space between your 'if' and your '('.  While you're at it,
you might as well remove the blank line between the
get_console_rs_caps() and the if statement, to be consistent with the
rest of the function :)

RM> @@ -100,7 +109,6 @@
RM>          char* classname;

RM>          classname = class_base_name(CLASSNAME(ref));
RM> -
RM>          if (STREQC(classname, "VirtualSystemManagementService")) {
RM>                  s = get_vsms(ref, &_inst, _BROKER, context, true);
RM>                  if ((s.rc != CMPI_RC_OK) || (_inst == NULL))

Please don't make arbitrary whitespace changes in the middle of a
patch.

RM> @@ -113,6 +121,14 @@
RM>                          goto out;

RM>                  s = get_migration_caps(ref, &_inst, _BROKER, false);
RM> +        } else if (STREQC(classname, "ConsoleRedirectionService")) {
RM> +                s = get_console_rs(ref, &_inst, _BROKER, context, true);
RM> +                if((s.rc != CMPI_RC_OK) || (_inst == NULL))

Same problem with your 'if' here.

RM> +                        goto out;
RM> +		
RM> +                s = get_console_rs_caps(_BROKER, ref, &_inst, false);	
RM> +                if((s.rc != CMPI_RC_OK) || (_inst == NULL))
RM> +                        goto out;

You don't need this check, as the status is returned as part of the
function.  Please remove it to be consistent with the rest of the
function.

RM> @@ -382,22 +398,28 @@
RM>          "Xen_HostSystem",
RM>          "Xen_VirtualSystemManagementService",
RM>          "Xen_VirtualSystemMigrationService",
RM> +	"Xen_ConsoleRedirectionService",
RM>          "KVM_HostSystem",
RM>          "KVM_VirtualSystemManagementService",
RM>          "KVM_VirtualSystemMigrationService",
RM> +	"KVM_ConsoleRedirectionService",
RM>          "LXC_HostSystem",
RM>          "LXC_VirtualSystemManagementService",
RM>          "LXC_VirtualSystemMigrationService",
RM> +	"LXC_ConsoleRedirectionService",
RM>          NULL
RM>  };

RM>  static char *host_caps[] = {
RM>          "Xen_VirtualSystemManagementCapabilities",
RM>          "Xen_VirtualSystemMigrationCapabilities",
RM> +	"Xen_ConsoleRedirectionServiceCapabilities",
RM>          "KVM_VirtualSystemManagementCapabilities",
RM>          "KVM_VirtualSystemMigrationCapabilities",
RM> +	"KVM_ConsoleRedirectionServiceCapabilities",
RM>          "LXC_VirtualSystemManagementCapabilities",
RM>          "LXC_VirtualSystemMigrationCapabilities",
RM> +	"LXC_ConsoleRedirectionServiceCapabilities",
RM>          NULL,
RM>  };

RM> @@ -434,6 +456,9 @@
RM>          "Xen_VirtualSystemMigrationService",
RM>          "KVM_VirtualSystemMigrationService",
RM>          "LXC_VirtualSystemMigrationService",
RM> +	"Xen_ConsoleRedirectionService",
RM> +	"KVM_ConsoleRedirectionService",
RM> +	"LXC_ConsoleRedirectionService",
RM>          NULL
RM>  };

These are still using tabs instead of spaces.

Thanks!

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com




More information about the Libvirt-cim mailing list