RE: [Yaffs] YAFFS2 commit_write return 0 for success

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: Martin Fouts
Datum:  
To: Todd Poynor, yaffs
Betreff: RE: [Yaffs] YAFFS2 commit_write return 0 for success
Thanks,

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

Marty

> -----Original Message-----
> From:
> [mailto:yaffs-bounces@stoneboat.aleph1.co.uk] On Behalf Of Todd Poynor
> Sent: Wednesday, October 19, 2005 12:11 AM
> To:
> 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 <>
>
> 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
>
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>