diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-04 14:37:13 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-04 14:37:13 +0000 |
commit | 5ef85fa0104c2df5abaaedadfda4aad272b63a11 (patch) | |
tree | 1667516a86deb8d88b33eb52cb2fbb74fa983b7b /openwrt | |
parent | 85fc1939a91db8e868cc5d10fc04216210ac62b8 (diff) |
add oleg's jffs2root fix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@800 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt')
-rw-r--r-- | openwrt/package/openwrt/jffs2root.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openwrt/package/openwrt/jffs2root.c b/openwrt/package/openwrt/jffs2root.c index d79532ea6..140c8a6e0 100644 --- a/openwrt/package/openwrt/jffs2root.c +++ b/openwrt/package/openwrt/jffs2root.c @@ -98,7 +98,7 @@ int main(int argc, char **argv) //bzero((void *)((int)ptr + ptr->len), (size_t)(len - ptr->len)); ptr->len = offset; ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version)); - msync(ptr,len,MS_SYNC|MS_INVALIDATE); + msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE); printf("Partition moved; please reboot\n"); } } else { @@ -113,6 +113,7 @@ int main(int argc, char **argv) } - munmap((void *) ptr, sizeof(struct trx_header)); + munmap((void *) ptr, len); + close (fd); return 0; } |