Back to index

glibc  2.9
Defines | Functions
fxstat.c File Reference
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
#include <kernel_stat.h>
#include <sysdep.h>
#include <sys/syscall.h>
#include <xstatconv.h>

Go to the source code of this file.


#define __fxstat64   __fxstat64_disable


int __fxstat (int vers, int fd, struct stat *buf)

Define Documentation

#define __fxstat64   __fxstat64_disable

Definition at line 20 of file fxstat.c.

Function Documentation

int __fxstat ( int  vers,
int  fd,
struct stat buf 

Definition at line 35 of file fxstat.c.

  int result, errno_out;
  struct kernel_stat kbuf;

  if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
      result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
       return result;
      errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
      if (errno_out != ENOSYS)
       goto fail;
      __libc_missing_axp_stat64 = 1;

  result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
  if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
    return __xstat_conv (vers, &kbuf, buf);
  errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
  __set_errno (errno_out);
  return -1;

Here is the call graph for this function: