diff yaffs_fs.c @ 97:a39f723d20f1

Patch from Todd Poyner (tpoynor@mvista.com) Return zero, not number of bytes written, for success (and non-zero for error) in the commit_write method. Some callers, notably the loopback mount driver, treat non-zero return as an error.
author marty
date Thu, 27 Oct 2005 08:22:49 +0100
parents 80d3628fbd18
children 0da5cd5a9ac0
line wrap: on
line diff
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -604,9 +604,10 @@ static int yaffs_commit_write(struct fil
 	}
 
 	T(YAFFS_TRACE_OS,
-	  (KERN_DEBUG "yaffs_commit_write returning %d\n", nWritten));
+	  (KERN_DEBUG "yaffs_commit_write returning %d\n",
+	   nWritten == nBytes ? 0 : -1));
 
-	return nWritten;
+	return nWritten == nBytes ? 0 : -1;
 
 }