[U-Boot] [PATCH v2] UBIFS: Missing offset relocation for compressor 'none'

Michael Lawnick ml.lawnick at gmx.de
Thu Mar 19 10:06:41 CET 2009


On systems where U-Boot is linked to another address than it really lays
(e.g. backup image), calls via function pointers must be fixed with a
'+= gd->reloc_off'.
This was not done for none_compr in ubifs_compressors_init() what leads
to system crash on ubifsmount command.

Signed-off-by: Michael Lawnick <ml.lawnick at gmx.de>
---
 fs/ubifs.c |    5 +-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff -Naur a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
--- a/fs/ubifs/ubifs.c 2009-02-20 16:02:44.434443000 +0100
+++ b/fs/ubifs/ubifs.c 2009-03-18 16:06:09.000000000 +0100

@@ -147,7 +147,10 @@ int __init ubifs_compressors_init(void)
        if (err)
                return err;

-       ubifs_compressors[UBIFS_COMPR_NONE] = &none_compr;
+       err = compr_init(&none_compr);
+       if (err)
+               return err;
+
        return 0;
 }
 --
Kind regards,
Michael
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list