[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] [PATCH]Change MAC address to case insensitive



Hi,

xenXMDomainAttachDevice and xenXMDomainDetachDevice 
treats "case sensitve" for MAC address of stopping domain.
This patch changes from case sensitive to case insensitive.

Thanks,
Shigeki Sakamoto.


Index: src/xm_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xm_internal.c,v
retrieving revision 1.64
diff -u -p -r1.64 xm_internal.c
--- src/xm_internal.c	20 Feb 2008 15:29:13 -0000	1.64
+++ src/xm_internal.c	26 Feb 2008 06:40:57 -0000
@@ -2812,7 +2812,7 @@ xenXMAttachInterface(virDomainPtr domain
                 key = nextkey;
             }
 
-            if (!(strcmp(dommac, (const char *) mac))) {
+            if (!(strcasecmp(dommac, (const char *) mac))) {
                 if (autoassign) {
                     free(mac);
                     mac = NULL;
@@ -3087,7 +3087,7 @@ xenXMDomainDetachDevice(virDomainPtr dom
                     mac = nextmac;
                 }
 
-                if (!(strcmp(dommac, (const char *) key)))
+                if (!(strcasecmp(dommac, (const char *) key)))
                     break;
             }
         skip:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]