mtd/util Makefile,1.36,1.37 nftl_format.c,1.20,1.21 nftldump.c,1.15,1.16

David Woodhouse dwmw2 at infradead.org
Wed May 5 10:48:29 EDT 2004


Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/tmp/cvs-serv3789

Modified Files:
	Makefile nftl_format.c nftldump.c 
Log Message:
nftl stuff builds again

Index: Makefile
===================================================================
RCS file: /home/cvs/mtd/util/Makefile,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- Makefile	5 May 2004 11:57:54 -0000	1.36
+++ Makefile	5 May 2004 14:48:27 -0000	1.37
@@ -10,7 +10,7 @@
 TARGETS = ftl_format erase eraseall  nanddump doc_loadbios \
 	mkfs.jffs ftl_check mkfs.jffs2 lock unlock \
 	einfo mtd_debug fcp nandwrite jffs2dump \
-	#jffs2reader nftldump nftl_format
+	nftldump nftl_format #jffs2reader
 
 all: $(TARGETS)
 

Index: nftl_format.c
===================================================================
RCS file: /home/cvs/mtd/util/nftl_format.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- nftl_format.c	5 May 2004 11:57:55 -0000	1.20
+++ nftl_format.c	5 May 2004 14:48:27 -0000	1.21
@@ -36,7 +36,7 @@
 
 #include <asm/types.h>
 #include <mtd/mtd-user.h>
-#include <linux/mtd/nftl.h>
+#include <mtd/nftl-user.h>
 
 #define swab16(x) \
         ((__u16)( \

Index: nftldump.c
===================================================================
RCS file: /home/cvs/mtd/util/nftldump.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- nftldump.c	5 May 2004 11:57:55 -0000	1.15
+++ nftldump.c	5 May 2004 14:48:27 -0000	1.16
@@ -23,6 +23,8 @@
  *	2. test, test, and test !!!
  */
 
+#define _XOPEN_SOURCE 500 /* For pread */
+
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,9 +37,7 @@
 #include <sys/ioctl.h>
 #include <asm/types.h>
 #include <mtd/mtd-user.h>
-#include <linux/mtd/nftl.h>
-
-extern ssize_t pread();
+#include <mtd/nftl-user.h>
 
 static struct NFTLMediaHeader MedHead[2];
 static mtd_info_t meminfo;
@@ -87,7 +87,7 @@
 	return UCItable[curEUN][0].a.ReplUnitNum;
 }
 
-static unsigned int find_media_headers()
+static unsigned int find_media_headers(void)
 {
 	int i;
 	static unsigned long ofs = 0;
@@ -135,7 +135,7 @@
 	return NumMedHeads;
 }
 
-static void dump_erase_units()
+static void dump_erase_units(void)
 {
 	int i, j;
 	unsigned long ofs;
@@ -150,7 +150,7 @@
 			oob.start = ofs + (j * 512);
 			if (ioctl(fd, MEMREADOOB, &oob))
 				printf("MEMREADOOB at %lx: %s\n",
-				       (unsigned long) oob.start, sys_errlist[errno]);
+				       (unsigned long) oob.start, strerror(errno));
 			memcpy(&UCItable[i][j], &oobbuf.u, 8);
 		}
 		if (UCItable[i][1].b.EraseMark != cpu_to_le16(0x3c69)) {
@@ -199,7 +199,7 @@
 	}
 }
 
-static void dump_virtual_units()
+static void dump_virtual_units(void)
 {
 	int i, j;
 	char readbuf[512];




More information about the linux-mtd-cvs mailing list