From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StD1B-0001PQ-TR for qemu-devel@nongnu.org; Mon, 23 Jul 2012 03:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StD1A-00053i-TB for qemu-devel@nongnu.org; Mon, 23 Jul 2012 03:25:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StD1A-00053a-L9 for qemu-devel@nongnu.org; Mon, 23 Jul 2012 03:25:24 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6N7PMAK013572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Jul 2012 03:25:23 -0400 From: Markus Armbruster References: <1342111951-27930-1-git-send-email-armbru@redhat.com> Date: Mon, 23 Jul 2012 09:25:20 +0200 In-Reply-To: <1342111951-27930-1-git-send-email-armbru@redhat.com> (Markus Armbruster's message of "Thu, 12 Jul 2012 18:52:31 +0200") Message-ID: <87629fos67.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] ide scsi: Mess with geometry only for hard disk devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com Ping? Markus Armbruster writes: > Legacy -drive cyls=... are now ignored completely when the drive > doesn't back a hard disk device. Before, they were first checked > against a hard disk's limits, then ignored. > > Signed-off-by: Markus Armbruster > --- > hw/ide/qdev.c | 3 ++- > hw/scsi-disk.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c > index 22e58df..5ea9b8f 100644 > --- a/hw/ide/qdev.c > +++ b/hw/ide/qdev.c > @@ -149,7 +149,8 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind) > } > > blkconf_serial(&dev->conf, &dev->serial); > - if (blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255) < 0) { > + if (kind != IDE_CD > + && blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255) < 0) { > return -1; > } > > diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c > index 525816c..318318c 100644 > --- a/hw/scsi-disk.c > +++ b/hw/scsi-disk.c > @@ -1750,7 +1750,8 @@ static int scsi_initfn(SCSIDevice *dev) > } > > blkconf_serial(&s->qdev.conf, &s->serial); > - if (blkconf_geometry(&dev->conf, NULL, 65535, 255, 255) < 0) { > + if (dev->type == TYPE_DISK > + && blkconf_geometry(&dev->conf, NULL, 65535, 255, 255) < 0) { > return -1; > }