From patchwork Thu Nov 22 20:02:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 201182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 34BD72C0089 for ; Fri, 23 Nov 2012 07:03:22 +1100 (EST) Received: from localhost ([::1]:59011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbczY-0006yu-BE for incoming@patchwork.ozlabs.org; Thu, 22 Nov 2012 15:03:20 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbczL-0006rO-Kr for qemu-devel@nongnu.org; Thu, 22 Nov 2012 15:03:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbczK-0005Uh-K2 for qemu-devel@nongnu.org; Thu, 22 Nov 2012 15:03:07 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:53930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbczK-0005TT-9g for qemu-devel@nongnu.org; Thu, 22 Nov 2012 15:03:06 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Nov 2012 20:03:04 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 22 Nov 2012 20:03:02 -0000 Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAMK2swp65208552 for ; Thu, 22 Nov 2012 20:02:54 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAMK31Aa028543 for ; Thu, 22 Nov 2012 13:03:01 -0700 Received: from BR96EGXR.ibm.com (sig-9-79-38-37.de.ibm.com [9.79.38.37]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qAMK2wef028390; Thu, 22 Nov 2012 13:03:00 -0700 From: Christian Borntraeger To: Markus Armbruster Date: Thu, 22 Nov 2012 21:02:56 +0100 Message-Id: <1353614576-21015-3-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1353614576-21015-1-git-send-email-borntraeger@de.ibm.com> References: <877gpdybqr.fsf@blackfin.pond.sub.org> <1353614576-21015-1-git-send-email-borntraeger@de.ibm.com> x-cbid: 12112220-0342-0000-0000-0000037A7292 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.111 Cc: Kevin Wolf , Peter Maydell , Anthony Liguori , Igor Mitsyanko , qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Stefan Hajnoczi , Cornelia Huck , Andreas Faerber , Einar Lueck Subject: [Qemu-devel] [PATCH 2/2] block: clarify comment about IF_IDE = 0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Lets make the comment regarding IF_IDE more precise why it must be 0. Signed-off-by: Christian Borntraeger --- blockdev.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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