From: "Sebastian Herbszt" <herbszt@gmx.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] add interface type IF_SATA
Date: Mon, 10 May 2010 23:55:50 +0200 [thread overview]
Message-ID: <080FFDF282C84044B8A8C8BA23EAE5AE@FSCPC> (raw)
Add interface type IF_SATA.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
diff --git a/sysemu.h b/sysemu.h
index fa921df..b88bae9 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -151,7 +151,7 @@ extern unsigned int nb_prom_envs;
typedef enum {
IF_NONE,
IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
- IF_COUNT
+ IF_SATA, IF_COUNT
} BlockInterfaceType;
typedef enum {
@@ -177,6 +177,7 @@ typedef struct DriveInfo {
#define MAX_IDE_DEVS 2
#define MAX_SCSI_DEVS 7
+#define MAX_SATA_DEVS 1
#define MAX_DRIVES 32
extern QTAILQ_HEAD(drivelist, DriveInfo) drives;
diff --git a/vl.c b/vl.c
index 85bcc84..cd3a343 100644
--- a/vl.c
+++ b/vl.c
@@ -849,6 +849,9 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
} else if (!strcmp(buf, "xen")) {
type = IF_XEN;
max_devs = 0;
+ } else if (!strcmp(buf, "sata")) {
+ type = IF_SATA;
+ max_devs = MAX_SATA_DEVS;
} else if (!strcmp(buf, "none")) {
type = IF_NONE;
max_devs = 0;
@@ -1039,7 +1042,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
} else {
/* no id supplied -> create one */
dinfo->id = qemu_mallocz(32);
- if (type == IF_IDE || type == IF_SCSI)
+ if (type == IF_IDE || type == IF_SCSI || type == IF_SATA)
mediastr = (media == MEDIA_CDROM) ? "-cd" : "-hd";
if (max_devs)
snprintf(dinfo->id, 32, "%s%i%s%i",
@@ -1064,6 +1067,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
case IF_IDE:
case IF_SCSI:
case IF_XEN:
+ case IF_SATA:
case IF_NONE:
switch(media) {
case MEDIA_DISK:
reply other threads:[~2010-05-10 21:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=080FFDF282C84044B8A8C8BA23EAE5AE@FSCPC \
--to=herbszt@gmx.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).