patch-2.4.20 linux-2.4.20/fs/jffs2/write.c

Next file: linux-2.4.20/fs/jffs2/zlib.c
Previous file: linux-2.4.20/fs/jffs2/super.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/fs/jffs2/write.c linux-2.4.20/fs/jffs2/write.c
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: write.c,v 1.30 2001/12/30 16:01:11 dwmw2 Exp $
+ * $Id: write.c,v 1.30.2.1 2002/08/08 08:36:31 dwmw2 Exp $
  *
  */
 
@@ -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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)