* syscalls.cc (_write): Allow zero length as per SUSv2.

This commit is contained in:
Christopher Faylor 2001-11-14 04:12:11 +00:00
parent b83587946b
commit 65814395b6
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2001-11-13 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (_write): Allow zero length as per SUSv2.
2001-11-13 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (mkdir): Add HIDDEN file attribute if file has leading dot

View File

@ -355,6 +355,9 @@ _read (int fd, void *ptr, size_t len)
extern "C" ssize_t
_write (int fd, const void *ptr, size_t len)
{
if (len == 0)
return 0;
if (__check_invalid_read_ptr_errno (ptr, len))
return -1;