From 03512e563946ee2a7830bad310a2de88d25bc328 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 30 Aug 2013 21:22:13 +0800 Subject: load rap file from ra file To a single rap file, obj->oofset is 0 and rlen is actually right. But to rap file in ra file, rlen should be added obj->oofset to correctly load the contents of rap file. Signed-off-by: Peng Fan --- rtl-rap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtl-rap.c b/rtl-rap.c index cf90fc7..2bfaead 100644 --- a/rtl-rap.c +++ b/rtl-rap.c @@ -797,7 +797,8 @@ rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd) /* * Set up the decompressor. */ - rtems_rtl_obj_comp (&rap.decomp, rap.file, fd, rap.compression, rlen); + rtems_rtl_obj_comp (&rap.decomp, rap.file, fd, rap.compression, + rlen + obj->ooffset); /* * uint32_t: machinetype -- cgit v1.2.3