Beispiel #1
0
int
__xstat (int vers, const char *file, struct stat *buf)
{
  if (vers != _STAT_VER)
    {
      __set_errno (EINVAL);
      return -1;
    }

  return __syscall_stat (file, buf);
}
Beispiel #2
0
int stat(const char *file_name, struct stat *buf)
{
	int result;
	struct kernel_stat kbuf;

	result = __syscall_stat(file_name, &kbuf);
	if (result == 0) {
		__xstat_conv(&kbuf, buf);
	}
	return result;
}
Beispiel #3
0
int
__xstat (int vers, const char *file, struct stat *buf)
{
  if (__builtin_expect (vers == _STAT_VER, 1))
    {
      struct stat16 buf16;
      int result = __syscall_stat (CHECK_STRING (file), __ptrvalue (&buf16));
      if (result == 0)
	stat16_to_stat (&buf16, buf);
      return result;
    }
  else if (__builtin_expect (vers == _STAT_VER_stat, 1))
    return __syscall_stat (CHECK_STRING (file),
			   CHECK_1 ((struct stat16 *) buf));
  else
    {
      __set_errno (EINVAL);
      return -1;
    }
}