Patchwork [2/2] block: clarify comment about IF_IDE = 0

login
register
mail settings
Submitter Christian Borntraeger
Date Nov. 22, 2012, 8:02 p.m.
Message ID <1353614576-21015-3-git-send-email-borntraeger@de.ibm.com>
Download mbox | patch
Permalink /patch/201182/
State New
Headers show

Comments

Christian Borntraeger - Nov. 22, 2012, 8:02 p.m.
Lets make the comment regarding IF_IDE more precise
why it must be 0.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 blockdev.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/blockdev.h b/blockdev.h
index 1c9ca6a..d73d552 100644
--- a/blockdev.h
+++ b/blockdev.h
@@ -19,7 +19,11 @@  void blockdev_auto_del(BlockDriverState *bs);
 
 typedef enum {
     IF_DEFAULT = -1,            /* for use with drive_add() only */
-    IF_IDE,                     /* machines without block_default_type get 0 */
+    /*
+     * IF_IDE must be zero, because we want QEMUMachine member
+     * block_default_type to default-initialize to IF_IDE
+     */
+    IF_IDE = 0,
     IF_NONE,
     IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
     IF_COUNT