[Libvirt-cim] [PATCH] Fix to support domain name with space

Sharad Mishra snmishra at us.ibm.com
Tue Dec 14 22:01:20 UTC 2010


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1292363991 28800
# Node ID 35396e5b805193c024b6d4f065136d7b57a0b03d
# Parent  8c322e30cabbf9e62cbae06e5566fc1662ad539c
Fix to support domain name with space.

Libvirt-cim was failing to correctly parse domain names that had whitespace in between.
For example, domain "test domain", would get parsed as just "test".

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

diff -r 8c322e30cabb -r 35396e5b8051 libxkutil/misc_util.c
--- a/libxkutil/misc_util.c	Wed Dec 08 12:20:26 2010 -0800
+++ b/libxkutil/misc_util.c	Tue Dec 14 13:59:51 2010 -0800
@@ -448,7 +448,7 @@
         char *tmp_pfx = NULL;
         char *tmp_name = NULL;
 
-        ret = sscanf(id, "%a[^:]:%as", &tmp_pfx, &tmp_name);
+        ret = sscanf(id, "%a[^:]:%a[^\n]", &tmp_pfx, &tmp_name);
         if (ret != 2) {
                 ret = 0;
                 goto out;




More information about the Libvirt-cim mailing list