]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
util: Change virMacAddrFormat to lowercase hex characters
authorPeter Krempa <pkrempa@redhat.com>
Tue, 26 Mar 2013 10:45:29 +0000 (11:45 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2013 13:53:43 +0000 (15:53 +0200)
The domain XML generator creates the mac addres strings with lowercase
strings with a separate piece of code. This patch changes the formating
helper to do the same stuff to allow using it to normalize a string
provided by the user. After this change some of the tests that are
outputing the mac address will need to be changed.

19 files changed:
src/util/virmacaddr.c
tests/networkxml2xmlout/bandwidth-network.xml
tests/networkxml2xmlout/dhcp6host-routed-network.xml
tests/networkxml2xmlout/empty-allow-ipv6.xml
tests/networkxml2xmlout/isolated-network.xml
tests/networkxml2xmlout/routed-network.xml
tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.vmx
tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.vmx
tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.vmx
tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.vmx
tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.vmx
tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.vmx
tests/xml2vmxdata/xml2vmx-ethernet-generated.vmx
tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.vmx
tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.vmx
tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.vmx
tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.vmx
tests/xml2vmxdata/xml2vmx-ws-in-the-wild-1.vmx
tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.vmx

index 9d6ab7c004d68f43ed4663e01fa0d0552ac4eaf1..c4ca0a84878013daad385effafc5322e296ccba0 100644 (file)
@@ -191,7 +191,7 @@ virMacAddrFormat(const virMacAddrPtr addr,
                  char *str)
 {
     snprintf(str, VIR_MAC_STRING_BUFLEN,
-             "%02X:%02X:%02X:%02X:%02X:%02X",
+             "%02x:%02x:%02x:%02x:%02x:%02x",
              addr->addr[0], addr->addr[1], addr->addr[2],
              addr->addr[3], addr->addr[4], addr->addr[5]);
     str[VIR_MAC_STRING_BUFLEN-1] = '\0';
index 555ee18662273a344f0f21dcf98f17744e76e4a5..c0c8ac388210bd7f5fda4d9a3d5918c4d409b6fe 100644 (file)
@@ -3,7 +3,7 @@
   <uuid>986fed9e-a488-186d-ef2d-17ebfd1993f8</uuid>
   <forward mode='nat'/>
   <bridge name='virbr1' stp='on' delay='0' />
-  <mac address='52:54:00:E6:A2:C9'/>
+  <mac address='52:54:00:e6:a2:c9'/>
   <bandwidth>
     <inbound average='1000' peak='2000' burst='1024'/>
     <outbound average='2000'/>
index 7305043f374ba28f46e76080ee7d8296bbb49bdf..1d3035ba37fd9547a74a640810e697d8d3525e69 100644 (file)
@@ -5,7 +5,7 @@
     <interface dev='eth1'/>
   </forward>
   <bridge name='virbr1' stp='on' delay='0' />
-  <mac address='12:34:56:78:9A:BC'/>
+  <mac address='12:34:56:78:9a:bc'/>
   <ip address='192.168.122.1' netmask='255.255.255.0'>
     <dhcp>
       <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10' />
index 6ee55ad7654657ce48fd3ae9cb1f1246c10ed47f..53e4fa7f8a92439e9eb90a997ef009741d90442d 100644 (file)
@@ -2,5 +2,5 @@
   <name>empty</name>
   <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
   <bridge name='virbr7' stp='on' delay='0' />
-  <mac address='52:54:00:17:3F:47'/>
+  <mac address='52:54:00:17:3f:47'/>
 </network>
index cc320a9d22b9f6c08dcc1ea10ecbe66b6405eb81..9ff1f55d665c7668856b991fadb22474629567ec 100644 (file)
@@ -2,7 +2,7 @@
   <name>private</name>
   <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
   <bridge name='virbr2' stp='on' delay='0' />
-  <mac address='52:54:00:17:3F:37'/>
+  <mac address='52:54:00:17:3f:37'/>
   <ip address='192.168.152.1' netmask='255.255.255.0'>
     <dhcp>
       <range start='192.168.152.2' end='192.168.152.254' />
index 9235e15406bfc4136837814cc5218d184160a397..cb81bae8a5e7dd67cb352a3fb3c0c425f5cdf155 100644 (file)
@@ -5,7 +5,7 @@
     <interface dev='eth1'/>
   </forward>
   <bridge name='virbr1' stp='on' delay='0' />
-  <mac address='12:34:56:78:9A:BC'/>
+  <mac address='12:34:56:78:9a:bc'/>
   <ip address='192.168.122.1' netmask='255.255.255.0'>
   </ip>
 </network>
index 9059197fb29c632ff95e5b1858c6edbb6381a96b..b2b5668ce1c2a325304a31a2560d2bfc2c333748 100644 (file)
@@ -18,4 +18,4 @@ ethernet0.present = "true"
 ethernet0.networkName = "VM Network"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "vpx"
-ethernet0.generatedAddress = "00:50:56:91:48:C7"
+ethernet0.generatedAddress = "00:50:56:91:48:c7"
index 68f069b4aea2135ef7febda96d5cd0bea22855f5..a0199cc95ae1d68b1e125ee6d7ff24bc921b176d 100644 (file)
@@ -37,5 +37,5 @@ ethernet0.virtualDev = "vlance"
 ethernet0.networkName = "VM Network"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:3C:98:3E"
+ethernet0.generatedAddress = "00:0c:29:3c:98:3e"
 ethernet0.generatedAddressOffset = "0"
index e09c694d272d9c759e08b7543d0e2363e1a79575..4ab2574e697cd2ce9d3742e0180506e0e96fda1a 100644 (file)
@@ -23,5 +23,5 @@ ethernet0.present = "true"
 ethernet0.networkName = "VM Network"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:F5:C3:0C"
+ethernet0.generatedAddress = "00:0c:29:f5:c3:0c"
 ethernet0.generatedAddressOffset = "0"
index 504997f0f956eb2e4bc658b1f6ed685a2ceee2fd..a2d679f7fbc39c329cd2ed0838c18b6e9f88fde2 100644 (file)
@@ -18,12 +18,12 @@ ethernet0.present = "true"
 ethernet0.networkName = "VM Network"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "vpx"
-ethernet0.generatedAddress = "00:50:56:91:66:D4"
+ethernet0.generatedAddress = "00:50:56:91:66:d4"
 ethernet1.present = "true"
 ethernet1.networkName = "VM Switch 2"
 ethernet1.connectionType = "bridged"
 ethernet1.addressType = "vpx"
-ethernet1.generatedAddress = "00:50:56:91:0C:51"
+ethernet1.generatedAddress = "00:50:56:91:0c:51"
 serial0.present = "true"
 serial0.fileType = "file"
 serial0.fileName = "/vmfs/volumes/498076b2-02796c1a-ef5b-000ae484a6a3/virtMonServ1/serial1.file"
index 2e3b85691d904493f3d623395a60149f69e26353..192867ee8d16247e143fa58dd20e71d56c67071f 100644 (file)
@@ -24,4 +24,4 @@ ethernet0.virtualDev = "e1000"
 ethernet0.networkName = "VM-LAN"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "vpx"
-ethernet0.generatedAddress = "00:50:56:BE:00:15"
+ethernet0.generatedAddress = "00:50:56:be:00:15"
index 1f29ae549060fb35e1d22c24d2c9d7b801fe7d1c..bc6a8356a4aeb3953038559ea764a8669543668c 100644 (file)
@@ -21,6 +21,6 @@ ethernet0.virtualDev = "vmxnet3"
 ethernet0.networkName = "VM Network"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:2C:3A:FC"
+ethernet0.generatedAddress = "00:0c:29:2c:3a:fc"
 ethernet0.generatedAddressOffset = "0"
 svga.vramSize = "8388608"
index 4f5c47ba5f38f8a8b00cb4bffef95d3f84cab732..18a6b67e9384f78ff27b2bbf60db8af4d66cca0c 100644 (file)
@@ -12,5 +12,5 @@ ethernet0.present = "true"
 ethernet0.networkName = "VM Network"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:11:22:33"
+ethernet0.generatedAddress = "00:0c:29:11:22:33"
 ethernet0.generatedAddressOffset = "0"
index 48476d6d83d6abe515fd5d49345bb48913ef2434..98935950e9a70f3641bc8a6a086abd43c3048e08 100644 (file)
@@ -16,5 +16,5 @@ ethernet0.networkName = "net1"
 ethernet0.connectionType = "custom"
 ethernet0.vnet = "/dev/vmnet1"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:D6:2B:D3"
+ethernet0.generatedAddress = "00:0c:29:d6:2b:d3"
 ethernet0.generatedAddressOffset = "0"
index 757083ac3e413ee6e4cb46eeb05165167974572e..c597807cebde5df528af6519b118febf245d563d 100644 (file)
@@ -16,5 +16,5 @@ ethernet0.networkName = "net1"
 ethernet0.connectionType = "custom"
 ethernet0.vnet = "/dev/vmnet1"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:D6:CB:A4"
+ethernet0.generatedAddress = "00:0c:29:d6:cb:a4"
 ethernet0.generatedAddressOffset = "0"
index 74cd47d08f655cf158c8f249e6deaea2b85f2633..a07ecfe9ad94260ce0802ac7f1b9b1391ca0e803 100644 (file)
@@ -16,12 +16,12 @@ ethernet0.networkName = "net1"
 ethernet0.connectionType = "custom"
 ethernet0.vnet = "/dev/vmnet1"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:C4:BE:5A"
+ethernet0.generatedAddress = "00:0c:29:c4:be:5a"
 ethernet0.generatedAddressOffset = "0"
 ethernet1.present = "true"
 ethernet1.networkName = "net2"
 ethernet1.connectionType = "custom"
 ethernet1.vnet = "/dev/vmnet2"
 ethernet1.addressType = "generated"
-ethernet1.generatedAddress = "00:0C:29:C4:BE:64"
+ethernet1.generatedAddress = "00:0c:29:c4:be:64"
 ethernet1.generatedAddressOffset = "0"
index c9da2297b4c30420dcec5aff105fbca532595cfd..13619548e16547ec3ee26993e043db7d21f8e846 100644 (file)
@@ -16,5 +16,5 @@ ethernet0.networkName = "net2"
 ethernet0.connectionType = "custom"
 ethernet0.vnet = "/dev/vmnet2"
 ethernet0.addressType = "generated"
-ethernet0.generatedAddress = "00:0C:29:C5:E3:5D"
+ethernet0.generatedAddress = "00:0c:29:c5:e3:5d"
 ethernet0.generatedAddressOffset = "0"
index 539a371237b992fd3ccd8bed8cdb2276f0b1dd63..4211a67e6208ec426a8bf299864e604bd4eb30b0 100644 (file)
@@ -17,6 +17,6 @@ ethernet0.present = "true"
 ethernet0.virtualDev = "e1000"
 ethernet0.connectionType = "nat"
 ethernet0.addressType = "static"
-ethernet0.address = "00:90:B9:DC:EA:81"
+ethernet0.address = "00:90:b9:dc:ea:81"
 ethernet0.checkMACAddress = "false"
 svga.vramSize = "4194304"
index 7035ac31602d428ba0c723dabb8373df56b2885c..ad68df960b82781ae9a4bf33d80977230b03cd39 100644 (file)
@@ -17,6 +17,6 @@ ethernet0.present = "true"
 ethernet0.virtualDev = "e1000"
 ethernet0.connectionType = "bridged"
 ethernet0.addressType = "static"
-ethernet0.address = "00:90:B9:DC:EA:81"
+ethernet0.address = "00:90:b9:dc:ea:81"
 ethernet0.checkMACAddress = "false"
 svga.vramSize = "4194304"