mtd/fs/jffs2 write.c,1.30,1.30.2.1

David Woodhouse dwmw2 at infradead.org
Thu Aug 8 04:36:33 EDT 2002


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv1180

Modified Files:
      Tag: jffs2-2_4-branch
	write.c 
Log Message:
Check return value from mtd->write()


Index: write.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/write.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -r1.30 -r1.30.2.1
--- write.c	30 Dec 2001 16:01:11 -0000	1.30
+++ write.c	8 Aug 2002 08:36:31 -0000	1.30.2.1
@@ -110,8 +110,9 @@
 	return inode;
 }
 
-/* This ought to be in core MTD code. All registered MTD devices without writev should have
-   this put in place. Bug the MTD maintainer */
+/* This ought to be in core MTD code. All registered MTD devices
+   without writev should have this put in place. Bug the MTD
+   maintainer */
 static int mtd_fake_writev(struct mtd_info *mtd, const struct iovec *vecs, unsigned long count, loff_t to, size_t *retlen)
 {
 	unsigned long i;
@@ -119,7 +120,7 @@
 	int ret = 0;
 
 	for (i=0; i<count; i++) {
-		mtd->write(mtd, to, vecs[i].iov_len, &thislen, vecs[i].iov_base);
+		ret = mtd->write(mtd, to, vecs[i].iov_len, &thislen, vecs[i].iov_base);
 		totlen += thislen;
 		if (ret || thislen != vecs[i].iov_len)
 			break;





More information about the linux-mtd-cvs mailing list