qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 08/10] add -drive if=none


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 08/10] add -drive if=none
Date: Fri, 31 Jul 2009 12:25:39 +0200

This adds a host drive, but doesn't implicitly add a guest drive for it.
First step in splitting host and guest configuration, check the
following patches to see how this can be used ...

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 sysemu.h |    1 +
 vl.c     |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sysemu.h b/sysemu.h
index 21e132c..ac18890 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -151,6 +151,7 @@ extern unsigned int nb_prom_envs;
 #endif
 
 typedef enum {
+    IF_NONE,
     IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
     IF_COUNT
 } BlockInterfaceType;
diff --git a/vl.c b/vl.c
index 12423b2..2024822 100644
--- a/vl.c
+++ b/vl.c
@@ -1982,6 +1982,9 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
        } else if (!strcmp(buf, "xen")) {
            type = IF_XEN;
             max_devs = 0;
+       } else if (!strcmp(buf, "none")) {
+           type = IF_NONE;
+            max_devs = 0;
        } else {
             fprintf(stderr, "qemu: unsupported bus type '%s'\n", buf);
             return NULL;
@@ -2195,6 +2198,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
     case IF_PFLASH:
     case IF_MTD:
     case IF_VIRTIO:
+    case IF_NONE:
         break;
     case IF_COUNT:
         abort();
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]