~ubuntu-branches/ubuntu/trusty/eglibc/trusty

« back to all changes in this revision

Viewing changes to sysdeps/unix/sysv/linux/fxstatat64.c

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-10 18:39:35 UTC
  • mfrom: (1.5.2) (4.4.24 experimental)
  • Revision ID: package-import@ubuntu.com-20130110183935-afsgfxkmg7wk5eaj
Tags: 2.17-0ubuntu1
* Merge with Debian, bringing in a new upstream and many small fixes:
  - patches/any/cvs-malloc-deadlock.diff: Dropped, merged upstream.
  - patches/ubuntu/lddebug-scopes.diff: Rebase for upstream changes.
  - patches/ubuntu/local-CVE-2012-3406.diff: Rebased against upstream.
  - patches/ubuntu/no-asm-mtune-i686.diff: Fixed in recent binutils.
* This upstream merge fixes a nasty hang in pulseaudio (LP: #1085342)
* Bump MIN_KERNEL_SUPPORTED to 2.6.32 on ARM, now that we no longer
  have to support shonky 2.6.31 kernels on imx51 babbage builders.
* Drop patches/ubuntu/local-disable-nscd-host-caching.diff, as these
  issues were apparently resolved upstream a while ago (LP: #613662)
* Fix the compiled-in bug URL to point to launchpad.net, not Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
 
1
/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
2
2
   This file is part of the GNU C Library.
3
3
 
4
4
   The GNU C Library is free software; you can redistribute it and/or
29
29
 
30
30
#include <kernel-features.h>
31
31
 
32
 
#if __ASSUME_STAT64_SYSCALL == 0
33
 
# include <xstatconv.h>
34
 
#endif
35
 
 
36
 
#ifdef __NR_stat64
37
 
# if  __ASSUME_STAT64_SYSCALL == 0
38
 
/* The variable is shared between all wrappers around *stat64 calls.
39
 
   This is the definition.  */
40
 
extern int __have_no_stat64;
41
 
# endif
42
 
#endif
43
 
 
44
32
/* Get information about the file NAME in BUF.  */
45
33
 
46
34
int
110
98
      file = buf;
111
99
    }
112
100
 
113
 
# if __ASSUME_STAT64_SYSCALL > 0
114
101
  if (flag & AT_SYMLINK_NOFOLLOW)
115
102
    result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file),
116
103
                               CHECK_1 (st));
119
106
                               CHECK_1 (st));
120
107
  if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
121
108
    {
122
 
#  if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
 
109
# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
123
110
      if (st->__st_ino != (__ino_t) st->st_ino)
124
111
        st->st_ino = st->__st_ino;
125
 
#  endif
 
112
# endif
126
113
      return result;
127
114
    }
128
 
# else
129
 
  struct kernel_stat kst;
130
 
#  ifdef __NR_stat64
131
 
  if (! __have_no_stat64)
132
 
    {
133
 
      if (flag & AT_SYMLINK_NOFOLLOW)
134
 
        result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file),
135
 
                                   CHECK_1 (st));
136
 
      else
137
 
        result = INTERNAL_SYSCALL (stat64, err, 2, CHECK_STRING (file),
138
 
                                   CHECK_1 (st));
139
 
 
140
 
      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
141
 
        {
142
 
#   if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
143
 
          if (st->__st_ino != (__ino_t) st->st_ino)
144
 
            st->st_ino = st->__st_ino;
145
 
#   endif
146
 
          return result;
147
 
        }
148
 
      if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
149
 
        goto fail;
150
 
 
151
 
      __have_no_stat64 = 1;
152
 
    }
153
 
#  endif
154
 
 
155
 
  if (flag & AT_SYMLINK_NOFOLLOW)
156
 
    result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file),
157
 
                               __ptrvalue (&kst));
158
 
  else
159
 
    result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file),
160
 
                               __ptrvalue (&kst));
161
 
 
162
 
  if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
163
 
    return __xstat64_conv (vers, &kst, st);
164
 
 
165
 
 fail:
166
 
# endif
167
115
  __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
168
116
 
169
117
  return -1;