From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPZ4M-0004vC-7J for qemu-devel@nongnu.org; Wed, 02 May 2012 08:54:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPZ4K-00022s-D1 for qemu-devel@nongnu.org; Wed, 02 May 2012 08:54:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49325 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPZ4K-00021C-6Y for qemu-devel@nongnu.org; Wed, 02 May 2012 08:54:08 -0400 Message-ID: <4FA12E6E.9040004@suse.de> Date: Wed, 02 May 2012 14:54:06 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1ec34b9b-f63c-4d11-ab0b-4a8a48920561@zmail13.collab.prod.int.phx2.redhat.com> In-Reply-To: <1ec34b9b-f63c-4d11-ab0b-4a8a48920561@zmail13.collab.prod.int.phx2.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Heinz Graalfs , qemu-devel , Christian Borntraeger , Jens Freimann , Cornelia Huck , Einar Lueck On 05/02/2012 01:38 PM, Paolo Bonzini wrote: >> On 05/02/2012 01:26 PM, Paolo Bonzini wrote: >>>> and everyone should be happy :). I would really like to have as >>>> little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is >>>> even worse, >>>> as it means we won't be able to execise that code path on other >>>> architectures. >>> True, but how do you exercise that code path with DASD geometry >>> on !__s390__? >> If we make things a flag for the guessing code, it should work just >> as well with image files, right? > Only when they're not blank. :) I was only thinking of #ifdef __s390__ > for the call to HDIO_GETGEO. Well, if guessing is a function guess_size(disk_size, block_size) then we would be able to do the same on an image file. Christian, would that work? Alex