Commit 9a634b93 9a634b93c85617fe56c4606f3a692a37437c4080 by Sergey Poznyakoff

(_file_write): Return ENOSPC if fwrite returns 0.

1 parent 070ac168
...@@ -188,6 +188,8 @@ _file_write (mu_stream_t stream, const char *iptr, size_t isize, ...@@ -188,6 +188,8 @@ _file_write (mu_stream_t stream, const char *iptr, size_t isize,
188 { 188 {
189 if (feof (fs->file) == 0) 189 if (feof (fs->file) == 0)
190 err = EIO; 190 err = EIO;
191 else if (n == 0)
192 err = ENOSPC;
191 clearerr(fs->file); 193 clearerr(fs->file);
192 n = 0; 194 n = 0;
193 } 195 }
......