Mercurial > yaffs-ecoscentric
changeset 289:3e4a1f10896a
Fix -ENOSPC to work properly with zero length writes
| author | charles |
|---|---|
| date | Tue, 12 May 2009 03:23:51 +0100 |
| parents | 4ba81e953434 |
| children | 3a9aa9edbf78 |
| files | yaffs_fs.c |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -1075,7 +1075,7 @@ static ssize_t yaffs_file_write(struct f } yaffs_GrossUnlock(dev); - return nWritten == 0 ? -ENOSPC : nWritten; + return (nWritten == 0) && (n > 0) ? -ENOSPC : nWritten; } /* Space holding and freeing is done to ensure we have space available for write_begin/end */
