Skip to contentSkip to conversation

qdev: c99 initilaizers for bus_type_names

PATCH Applied Gerd Hoffmann 2 participants 2 messages Jun 8, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qdev: c99 initilaizers for bus_type_names

---
 hw/qdev.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
hw/qdev.c +5 -5
index 5175fe1..689cf4c 100644
@@ -340,11 +340,11 @@ BusState *qbus_create(BusType type, size_t size,
 }
 
 static const char *bus_type_names[] = {
-    "System",
-    "PCI",
-    "SCSI",
-    "I2C",
-    "SSI"
+    [ BUS_TYPE_SYSTEM ] = "System",
+    [ BUS_TYPE_PCI ]    = "PCI",
+    [ BUS_TYPE_SCSI ]   = "SCSI",
+    [ BUS_TYPE_I2C ]    = "I2C",
+    [ BUS_TYPE_SSI ]    = "SSI",
 };
 
 #define qdev_printf(fmt, ...) monitor_printf(mon, "%*s" fmt, indent, "", ## __VA_ARGS__)
Signature · 1 line
1.6.2.2