grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/7] Initial support for U-Boot platforms


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms
Date: Mon, 08 Apr 2013 12:49:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 03.04.2013 18:17, Leif Lindholm wrote:

>>> +  disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
>> > 
>> > Is there any way to get size from uboot?
> Not that I've found. As in, not that can be relied on.
>  

di_stor.block_count works perfectly on my raspberry pi.
Any reason not to use it?

=== modified file 'grub-core/disk/uboot/ubootdisk.c'
--- grub-core/disk/uboot/ubootdisk.c    2013-04-07 00:41:07 +0000
+++ grub-core/disk/uboot/ubootdisk.c    2013-04-08 08:34:08 +0000
@@ -246,7 +246,7 @@
   grub_dprintf ("ubootdisk", "(%s) blocksize=%d, log_sector_size=%d\n",
                disk->name, d->block_size, disk->log_sector_size);
 
-  disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
+  disk->total_sectors = devinfo->di_stor.block_count;
   disk->data = d;
 
   return GRUB_ERR_NONE;



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]