* Fix n900 identification for dump (-e) * Make clean libusb from the root makefile

This commit is contained in:
pancake@localhost.localdomain committed 2009-10-18 21:03:16 +02:00
1 parent b7206abf11
commit 5f4476566d
2 files changed
+10 -9

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ logot:
clean:
cd src && ${MAKE} clean
cd libusb && ${MAKE} clean
cd logotool && ${MAKE} clean
install:
+9 -9
View File
@@ -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);