summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2013-08-30 21:22:13 +0800
committerPeng Fan <van.freenix@gmail.com>2013-09-05 13:47:39 +0800
commit03512e563946ee2a7830bad310a2de88d25bc328 (patch)
treea5f43a089b1b0a8fc95bded8d50f97137a096669
parentd323666c8482c4c2edda6696afad4ef5d25c13ed (diff)
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 <van.freenix@gmail.com>
-rw-r--r--rtl-rap.c3
1 files changed, 2 insertions, 1 deletions
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