Back to index

glibc  2.9
Defines | Functions
lxstat.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 __lxstat64   __lxstat64_disable


int __lxstat (int vers, const char *name, struct stat *buf)

Define Documentation

#define __lxstat64   __lxstat64_disable

Definition at line 20 of file lxstat.c.

Function Documentation

int __lxstat ( int  vers,
const char *  name,
struct stat buf 

Definition at line 35 of file lxstat.c.

  int result, errno_out;
  struct kernel_stat kbuf;

  if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
      result = INTERNAL_SYSCALL (lstat64, err, 2, name, 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 (lstat, err, 2, name, &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: