From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoWbu-0000jl-M3 for qemu-devel@nongnu.org; Tue, 10 Jul 2012 05:20:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoWbk-0004Jf-8k for qemu-devel@nongnu.org; Tue, 10 Jul 2012 05:19:58 -0400 Received: from oxygen.pond.sub.org ([78.46.104.156]:58054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoWbk-0004JE-2B for qemu-devel@nongnu.org; Tue, 10 Jul 2012 05:19:48 -0400 From: Markus Armbruster Date: Tue, 10 Jul 2012 11:12:54 +0200 Message-Id: <1341911575-7306-29-git-send-email-armbru@redhat.com> In-Reply-To: <1341911575-7306-1-git-send-email-armbru@redhat.com> References: <1341911575-7306-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v3 28/29] blockdev: Drop redundant CHS validation for if=ide List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, blauwirbel@gmail.com, stefanha@linux.vnet.ibm.com, pbonzini@redhat.com Leave it to ide_init_drive(). Signed-off-by: Markus Armbruster --- blockdev.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 06c997e..5f8677e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -330,15 +330,15 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) max_devs = if_max_devs[type]; if (cyls || heads || secs) { - if (cyls < 1 || (type == IF_IDE && cyls > 16383)) { + if (cyls < 1) { error_report("invalid physical cyls number"); return NULL; } - if (heads < 1 || (type == IF_IDE && heads > 16)) { + if (heads < 1) { error_report("invalid physical heads number"); return NULL; } - if (secs < 1 || (type == IF_IDE && secs > 63)) { + if (secs < 1) { error_report("invalid physical secs number"); return NULL; } -- 1.7.6.5