WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]: Fix rombios to correctly report size of disks >

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: Fix rombios to correctly report size of disks >16GB
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Fri, 23 Jul 2010 09:07:40 +0100
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 23 Jul 2010 01:09:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C86E4761.1B58E%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C86E4761.1B58E%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2010-07-22 at 19:07 +0100, Keir Fraser wrote:
> On 22/07/2010 18:42, "Gianni Tedesco" <gianni.tedesco@xxxxxxxxxx> wrote:
> 
> > Cosmetic patch for rombios to display the correct sizes of disks larger
> > than 16GB - a problem caused by needlessly casting sizeinmb variable
> > down to 16bits.
> 
> For say a 17GB drive sizeinmb=17000 which can be represented with fewer than
> 16 bits. I don't see how the code as it is will ever print the wrong thing,
> except for drives bigger than 64TB!

Actually you are right then wrong, the patch is mis-titled, it's 64GB.
(in fact 65,535 MB).

> Also I'm not sure but I think the
> integer size here may be 16 bits, and the %u format specifier would only
> print 16-bit values in that case anyway.

I tested it and it works as advertised (modulo 16 -> 64)....

Gianni


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel