[SLOF] [PATCH v2] fat-files: Fix access to FAT32 dir/files when cluster > 16-bits

Alexey Kardashevskiy aik at ozlabs.ru
Mon Jun 27 13:36:14 AEST 2016


On 09/06/16 13:45, Benjamin Herrenschmidt wrote:
> From 3800b503e65e19d0769a5a92c6d9fdcc4aa95f28 Mon Sep 17 00:00:00 2001
> From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> Date: Thu, 9 Jun 2016 13:01:24 +1000
> Subject: 
> 
> On FAT32, the directory entry contains a new field providing the
> top 16-bits of the cluster number. We didn't use it, thus reading
> the wrong sectors when trying to access files or directories
> beyond block 0x10000.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
> 
> v2. Remove unrelated change
> 
>  slof/fs/packages/fat-files.fs | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/slof/fs/packages/fat-files.fs b/slof/fs/packages/fat-files.fs
> index d919452..5d578f1 100644
> --- a/slof/fs/packages/fat-files.fs
> +++ b/slof/fs/packages/fat-files.fs
> @@ -73,6 +73,14 @@ INSTANCE VARIABLE next-cluster
>      THEN
>  ;
>  
> +\ Read cluster# from directory entry (handle FAT32 extension)
> +: get-cluster ( direntry -- cluster# )
> +  fat-type @ 20 = IF


Please use git send-mail as this patch has lots of 0xa0 symbols instead of
0x20 (in this example between '+' and 'fat-type') and "git am" does not
like it. Thanks.


I applied this one without unrelated empty new lines, thanks.


-- 
Alexey


More information about the SLOF mailing list