[Libvirt-cim] [PATCH 3/3] CSI: Fix log messages

Chip Vincent cvincent at linux.vnet.ibm.com
Wed Feb 22 15:34:23 UTC 2012


+1

On 02/20/2012 02:36 PM, Eduardo Lima (Etrunko) wrote:
> From: "Eduardo Lima (Etrunko)"<eblima at br.ibm.com>
>
> To produce correct outputs, it is necessary to call CMGetCharPtr(s.msg) instead
> of using s.msg directly.
>
> Signed-off-by: Eduardo Lima (Etrunko)<eblima at br.ibm.com>
> ---
>   src/Virt_ComputerSystemIndication.c |    9 +++++----
>   1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c
> index b60138a..2d0a94e 100644
> --- a/src/Virt_ComputerSystemIndication.c
> +++ b/src/Virt_ComputerSystemIndication.c
> @@ -254,7 +254,7 @@ static bool _do_indication(const CMPIBroker *broker,
>
>           ind_op = CMGetObjectPath(ind,&s);
>           if (s.rc != CMPI_RC_OK) {
> -                CU_DEBUG("Failed to get ind_op.  Error: '%s'", s.msg);
> +                CU_DEBUG("Failed to get ind_op.  Error: '%s'", CMGetCharPtr(s.msg));
>                   ret = false;
>                   goto out;
>           }
> @@ -263,7 +263,7 @@ static bool _do_indication(const CMPIBroker *broker,
>           affected_op = CMGetObjectPath(affected_inst,&s);
>           if (s.rc != CMPI_RC_OK) {
>                   ret = false;
> -                CU_DEBUG("problem getting affected_op: '%s'", s.msg);
> +                CU_DEBUG("problem getting affected_op: '%s'", CMGetCharPtr(s.msg));
>                   goto out;
>           }
>
> @@ -368,7 +368,8 @@ static bool create_deleted_guest_inst(const char *xml,
>                                     dominfo,
>                                     inst);
>           if (s.rc != CMPI_RC_OK) {
> -                CU_DEBUG("instance from domain info error: %s", s.msg);
> +                CU_DEBUG("instance from domain info error: %s",
> +                         CMGetCharPtr(s.msg));
>                   goto out;
>           }
>
> @@ -476,7 +477,7 @@ static int update_domain_list(virConnectPtr conn, csi_thread_data_t *thread)
>           for (i = 0; i<  count; i++) {
>                   dom = csi_dom_xml_new(dom_ptr_list[i],&s);
>                   if (dom == NULL) {
> -                        CU_DEBUG("Failed to get domain info %s", s.msg);
> +                        CU_DEBUG("Failed to get domain info %s", CMGetCharPtr(s.msg));
>                           break;
>                   }
>


-- 
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list