Basic qdev infrastructure.

Signed-off-by: Paul Brook <[email protected]>
diff --git a/sysemu.h b/sysemu.h
index 25a7c32..2ff6194 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -132,7 +132,8 @@
 #endif
 
 typedef enum {
-    IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN
+    IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
+    IF_COUNT
 } BlockInterfaceType;
 
 typedef enum {
@@ -165,6 +166,8 @@
 extern const char *drive_get_serial(BlockDriverState *bdrv);
 extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv);
 
+BlockDriverState *qdev_init_bdrv(DeviceState *dev, BlockInterfaceType type);
+
 struct drive_opt {
     const char *file;
     char opt[1024];
@@ -259,4 +262,6 @@
                     const char *tag, const char *str);
 int check_params(const char * const *params, const char *str);
 
+void register_devices(void);
+
 #endif