Back to index

glibc  2.9
Functions
lseek.c File Reference
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <stub-tag.h>

Go to the source code of this file.

Functions

off_t __lseek (int fd, off_t offset, int whence)

Function Documentation

off_t __lseek ( int  fd,
off_t  offset,
int  whence 
)

Definition at line 25 of file lseek.c.

{
  if (fd < 0)
    {
      __set_errno (EBADF);
      return -1;
    }
  switch (whence)
    {
    case SEEK_SET:
    case SEEK_CUR:
    case SEEK_END:
      break;
    default:
      __set_errno (EINVAL);
      return -1;
    }

  __set_errno (ENOSYS);
  return -1;
}