[Libvirt-cim] [PATCH] Pool names with space do not get parsed properly

Sharad Mishra snmishra at us.ibm.com
Wed Oct 5 19:11:51 UTC 2011


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1317836416 25200
# Node ID 8f5d112e4aea945d09c6120c6cea2817592d08aa
# Parent  1f93220799a57477a6b1e04a90e8ffe797d85581
Pool names with space do not get parsed properly.

This  patch fixes the issue where a disk pool with space in its
name does  not get parsed correctly.

Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>

diff -r 1f93220799a5 -r 8f5d112e4aea src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c	Fri Sep 16 14:24:35 2011 +0800
+++ b/src/Virt_DevicePool.c	Wed Oct 05 10:40:16 2011 -0700
@@ -1281,7 +1281,7 @@
                 goto out;
         }
 
-        ret = sscanf(id, "%*[^/]/%as", &poolid);
+        ret = sscanf(id, "%*[^/]/%a[^\n]", &poolid);
         if (ret != 1) {
                 cu_statusf(broker, &s,
                            CMPI_RC_ERR_NOT_FOUND,




More information about the Libvirt-cim mailing list