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

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

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: Fix rombios to correctly report size of disks >16GB
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Thu, 22 Jul 2010 18:42:24 +0100
Delivery-date: Thu, 22 Jul 2010 10:45:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>

diff -r 01917c0da12a tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Thu Jul 22 13:49:40 2010 +0100
+++ b/tools/firmware/rombios/rombios.c  Thu Jul 22 18:40:26 2010 +0100
@@ -2856,9 +2856,9 @@ void ata_detect( )
           printf("ata%d %s: ",channel,slave?" slave":"master");
           i=0; while(c=read_byte(get_SS(),model+i++)) printf("%c",c);
          if (sizeinmb < (1UL<<16))
-            printf(" ATA-%d Hard-Disk (%4u MBytes)\n", version, 
(Bit16u)sizeinmb);
+            printf(" ATA-%d Hard-Disk (%4u MBytes)\n", version, sizeinmb);
          else
-            printf(" ATA-%d Hard-Disk (%4u GBytes)\n", version, 
(Bit16u)(sizeinmb>>10));
+            printf(" ATA-%d Hard-Disk (%4u GBytes)\n", version, 
(sizeinmb>>10));
           break;
         case ATA_TYPE_ATAPI:
           printf("ata%d %s: ",channel,slave?" slave":"master");



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