X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/a4cf24d38a15dec9dbc1970b53049af4823ea476..57b73bf423b68390a7ca428306ec0e30348e3401:/package/mtd/src/mtd.c?ds=sidebyside diff --git a/package/mtd/src/mtd.c b/package/mtd/src/mtd.c index 7f5816539..a7d4c1b85 100644 --- a/package/mtd/src/mtd.c +++ b/package/mtd/src/mtd.c @@ -41,10 +41,14 @@ #include #include #include -#include "mtd-api.h" +#include #include "fis.h" #include "mtd.h" +#ifndef MTDREFRESH +#define MTDREFRESH _IO('M', 50) +#endif + #define MAX_ARGS 8 #define JFFS2_DEFAULT_DIR "" /* directory name without /, empty means root dir */ @@ -409,6 +413,9 @@ resume: /* got an EOF marker - this is the place to add some jffs2 data */ skip = mtd_replace_jffs2(mtd, fd, e, jffs2file); + /* don't add it again */ + jffs2file = NULL; + w += skip; e += skip; skip -= buflen;