X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/449cb3140d8b7c1263298b9f0813b327be4cfeb5..25e2b28f3cf0738d5fa5f23b88edbcfc7faf3b3e:/package/mtd/src/imagetag.c diff --git a/package/mtd/src/imagetag.c b/package/mtd/src/imagetag.c index 2080128c1..a4ce86d6e 100644 --- a/package/mtd/src/imagetag.c +++ b/package/mtd/src/imagetag.c @@ -31,7 +31,7 @@ #include #include -#include "mtd-api.h" +#include #include "mtd.h" #include "crc32.h" #include "bcm_tag.h" @@ -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) {