Back to index

glibc  2.9
Functions
pwrite.c File Reference
#include <errno.h>
#include <unistd.h>
#include <stub-tag.h>

Go to the source code of this file.

Functions

ssize_t __libc_pwrite (int fd, const void *buf, size_t nbytes, off_t offset)

Function Documentation

ssize_t __libc_pwrite ( int  fd,
const void *  buf,
size_t  nbytes,
off_t  offset 
)

Definition at line 25 of file pwrite.c.

{
  if (nbytes == 0)
    return 0;
  if (fd < 0)
    {
      __set_errno (EBADF);
      return -1;
    }
  if (buf == NULL || offset < 0)
    {
      __set_errno (EINVAL);
      return -1;
    }

  __set_errno (ENOSYS);
  return -1;
}