aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-05-04 14:37:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-05-04 14:37:13 +0000
commit4bb2c27c5d5f31a497367e66bb62538aa9881576 (patch)
tree6a86a368c925182eb7b84c87f9b0746cd5b09d78 /package
parent56d9f305dae20b5418d17b2f6d4b4419c7432113 (diff)
downloadupstream-4bb2c27c5d5f31a497367e66bb62538aa9881576.tar.gz
upstream-4bb2c27c5d5f31a497367e66bb62538aa9881576.tar.bz2
upstream-4bb2c27c5d5f31a497367e66bb62538aa9881576.zip
add oleg's jffs2root fix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@800 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/openwrt/jffs2root.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/openwrt/jffs2root.c b/package/openwrt/jffs2root.c
index d79532ea64..140c8a6e08 100644
--- a/package/openwrt/jffs2root.c
+++ b/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;
}