[Yaffs] YAFFS2 commit_write return 0 for success

Martin Fouts Martin.Fouts at palmsource.com
Thu Oct 20 08:47:11 BST 2005


Thanks,

I've put this in the testing queue and will probably push it later this
week.

Marty 

> -----Original Message-----
> From: yaffs-bounces at stoneboat.aleph1.co.uk 
> [mailto:yaffs-bounces at stoneboat.aleph1.co.uk] On Behalf Of Todd Poynor
> Sent: Wednesday, October 19, 2005 12:11 AM
> To: yaffs at stoneboat.aleph1.co.uk
> Subject: [Yaffs] YAFFS2 commit_write return 0 for success
> 
> 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.
> 
> Signed-off-by: Todd Poynor <tpoynor at mvista.com>
> 
> Index: yaffs_fs.c
> ===================================================================
> RCS file: /home/aleph1/cvs/yaffs2/yaffs_fs.c,v
> retrieving revision 1.31
> diff -u -r1.31 yaffs_fs.c
> --- yaffs_fs.c	21 Sep 2005 01:14:03 -0000	1.31
> +++ yaffs_fs.c	19 Oct 2005 06:58:36 -0000
> @@ -604,9 +604,10 @@
>  	}
>  
>  	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;
>  
>  }
>  
> 
> _______________________________________________
> yaffs mailing list
> yaffs at stoneboat.aleph1.co.uk
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> 



More information about the yaffs mailing list