From 5f4476566d894e0bab91a8257dbffa839fe4975b Mon Sep 17 00:00:00 2001 From: "pancake@localhost.localdomain" Date: Sun, 18 Oct 2009 21:03:16 +0200 Subject: * Fix n900 identification for dump (-e) * Make clean libusb from the root makefile --- Makefile | 1 + src/dump.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index a8042d9..1614e3c 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ logot: clean: cd src && ${MAKE} clean + cd libusb && ${MAKE} clean cd logotool && ${MAKE} clean install: diff --git a/src/dump.c b/src/dump.c index 16fe4aa..b61c551 100644 --- a/src/dump.c +++ b/src/dump.c @@ -141,8 +141,8 @@ int mtd_close(int fd, struct nand_oobinfo *old_oobinfo, int oobinfochanged) // configuration for nanddump // //int noecc = 0; // don't error correct -int omitoob = 1; // omit oob data -int omitbad = 1; +static int omitoob = 1; // omit oob data +static int omitbad = 1; // configuration for nanddump // #define CONFIGURE_FLAGS(x) \ @@ -456,27 +456,27 @@ __done: static int is_n900() { - int n800 = 0; + int n900 = 0; unsigned char buf[4]; - FILE *fd = fopen("/dev/mtd0", "rb"); + FILE *fd = fopen("/dev/mtd2", "rb"); if (!fd) { - fprintf(stderr, "Cannot open /dev/mtd0.\n"); + fprintf(stderr, "Cannot open /dev/mtd2.\n"); exit(1); } fread(buf, 4, 1, fd); if (!memcmp("\xff\xff\xff\xff", buf, 4)) - n800 = 1; + n900 = 1; fclose(fd); - return n800; + return n900; } static int is_n800() { int n800 = 0; unsigned char buf[4]; - FILE *fd = fopen("/dev/mtd2", "rb"); + FILE *fd = fopen("/dev/mtd0", "rb"); if (!fd) { - fprintf(stderr, "Cannot open /dev/mtd2.\n"); + fprintf(stderr, "Cannot open /dev/mtd0.\n"); exit(1); } fread(buf, 4, 1, fd); -- cgit v1.2.3