diff options
| author | pancake@localhost.localdomain <pancake@localhost.localdomain> | 2009-10-18 21:03:16 +0200 | 
|---|---|---|
| committer | pancake@localhost.localdomain <pancake@localhost.localdomain> | 2009-10-18 21:03:16 +0200 | 
| commit | 5f4476566d894e0bab91a8257dbffa839fe4975b (patch) | |
| tree | cb7c5e402bc246dc0e752f6587b95f408a2053b6 | |
| parent | b7206abf1156f5834e6c5c014703d95ae2969c93 (diff) | |
| download | 0xFFFF-5f4476566d894e0bab91a8257dbffa839fe4975b.tar.bz2 | |
* Fix n900 identification for dump (-e) * Make clean libusb from the root makefile
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | src/dump.c | 18 | 
2 files changed, 10 insertions, 9 deletions
@@ -22,6 +22,7 @@ logot:  clean:  	cd src && ${MAKE} clean +	cd libusb && ${MAKE} clean  	cd logotool && ${MAKE} clean  install: @@ -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);  |