aboutsummaryrefslogtreecommitdiffstats
path: root/package/mtd
diff options
context:
space:
mode:
authorDaniel Dickinson <daniel@cshore.neomailbox.net>2010-12-26 04:18:13 +0000
committerDaniel Dickinson <daniel@cshore.neomailbox.net>2010-12-26 04:18:13 +0000
commitec103967cb5570cac5558b94aad95fd68a32635a (patch)
treeb31fe0c8ce115d86db9ab2bf1a5da7bb585be8f9 /package/mtd
parent934de91827ceadf6c3cee70503b8c3b7ed9cfdf6 (diff)
downloadupstream-ec103967cb5570cac5558b94aad95fd68a32635a.tar.gz
upstream-ec103967cb5570cac5558b94aad95fd68a32635a.tar.bz2
upstream-ec103967cb5570cac5558b94aad95fd68a32635a.zip
Added OpenWRT-specific field to imagetag so that we can record the real root length, so that when the CRC fixup is applied and the root length is recorded as zero we can still calculate the rootfs mtd partition size.
Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24838 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mtd')
-rw-r--r--package/mtd/src/imagetag.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/mtd/src/imagetag.c b/package/mtd/src/imagetag.c
index 2080128c17..f6095be44a 100644
--- a/package/mtd/src/imagetag.c
+++ b/package/mtd/src/imagetag.c
@@ -124,7 +124,7 @@ trx_fixup(int fd, const char *name)
exit(1);
}
- sprintf(&tag->rootLength[0], "%lu", 0);
+ sprintf(&tag->flashRootLength[0], "%lu", 0);
strncpy(&tag->totalLength[0], &tag->kernelLength[0], IMAGE_LEN);
imagestart = sizeof(tag);
@@ -258,7 +258,7 @@ mtd_fixtrx(const char *mtd, size_t offset)
fprintf(stderr, "Checking current fixed status.\n");
}
- rootfslen = strntoul(&tag->rootLength[0], NULL, 10, IMAGE_LEN);
+ rootfslen = strntoul(&tag->flashRootLength[0], NULL, 10, IMAGE_LEN);
if (rootfslen == 0) {
if (quiet < 2)
fprintf(stderr, "Header already fixed, exiting\n");
@@ -270,7 +270,7 @@ mtd_fixtrx(const char *mtd, size_t offset)
fprintf(stderr, "Setting root length to 0.\n");
}
- sprintf(&tag->rootLength[0], "%lu", 0);
+ sprintf(&tag->flashRootLength[0], "%lu", 0);
strncpy(&tag->totalLength[0], &tag->kernelLength[0], IMAGE_LEN);
if (quiet < 2) {