mtd/util nftl_format.c,1.21,1.22

David Woodhouse dwmw2 at infradead.org
Wed May 5 11:19:59 EDT 2004


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

Modified Files:
	nftl_format.c 
Log Message:
strerror/pread/pwrite fixes

Index: nftl_format.c
===================================================================
RCS file: /home/cvs/mtd/util/nftl_format.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- nftl_format.c	5 May 2004 14:48:27 -0000	1.21
+++ nftl_format.c	5 May 2004 15:19:57 -0000	1.22
@@ -23,6 +23,7 @@
  *	2. test, test, and test !!!
  */
 
+#define _XOPEN_SOURCE 500 /* for pread/pwrite */
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -59,8 +60,6 @@
 #define le32_to_cpu(x) cpu_to_le32(x)
 #define le16_to_cpu(x) cpu_to_le16(x)
 
-extern ssize_t pread(), pwrite();
-
 unsigned char BadUnitTable[MAX_ERASE_ZONES];
 unsigned char *readbuf;
 unsigned char *writebuf[4];
@@ -330,7 +329,7 @@
 			continue;
 		oob.start = (ezone * meminfo.erasesize) + 512;
 		if (ioctl(fd, MEMWRITEOOB, &oob))
-			printf("MEMWRITEOOB at %lx: %s\n", (unsigned long)oob.start, sys_errlist[errno]);
+			printf("MEMWRITEOOB at %lx: %s\n", (unsigned long)oob.start, strerror(errno));
 	}
 
 	exit(0);




More information about the linux-mtd-cvs mailing list