diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2013-01-14 19:30:10 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2013-01-14 19:30:10 +0100 |
commit | a6ec475a92ebfb9ab42685cb63b42a39656705ab (patch) | |
tree | e18051a5a7514511a72a52cb6dc57965c1b21d28 /src/dump.c | |
parent | 783222ed007f93d16bfb224df3d10ddb47bf4a74 (diff) | |
parent | a6ef73359c0e0537ebf83795ebacbbfaee2c9c28 (diff) | |
download | 0xFFFF-a6ec475a92ebfb9ab42685cb63b42a39656705ab.tar.bz2 |
Merge branch 'pvc' into legacylegacy
Diffstat (limited to 'src/dump.c')
-rw-r--r-- | src/dump.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -69,17 +69,14 @@ __rf_extract_exit: * This function was covardly copied from nanddump.c @ mtd-utils-20060907 */ #define _GNU_SOURCE -#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> #include <unistd.h> #include <getopt.h> #include <sys/ioctl.h> #include <sys/types.h> -#include <sys/stat.h> //#include <asm/types.h> #include <mtd/mtd-user.h> #ifndef loff_t @@ -172,6 +169,9 @@ int check_badblocks(char *mtddev) return 1; } + memset(&stat1, 0, sizeof(stat1)); + memset(&stat2, 0, sizeof(stat2)); + fprintf(stderr, "Block size %u, page size %u, OOB size %u\n", meminfo.erasesize, meminfo.writesize, meminfo.oobsize); fprintf(stderr, "Size %u, flags %u, type 0x%x\n", @@ -513,7 +513,7 @@ int dump_config() break; if (!memcmp(buf,"ConF", 4)) { loop: - read(fd, buf, 4); + ret = read(fd, buf, 4); if (ret == -1) break; printf("\n0x%08x : ConF %02x %02x %02x %02x : ", i, buf[0], buf[1], buf[2], buf[3]); |