summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-02-03 09:39:28 +0000
committerJakub Jelinek <jakub@redhat.com>2006-02-03 09:39:28 +0000
commit9f57ac239bd04f64ae20f6e7b35f387ae6605312 (patch)
tree1971d9c5a6261ff535fec20e8be494fac1f61eb2 /sysdeps
parentc3a8c11b0c6a6e44e98dcd4bb0fdb397e4fd56f7 (diff)
Updated to fedora-glibc-20060203T0932
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/futimesat.c3
-rw-r--r--sysdeps/unix/sysv/linux/openat.c19
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysconf.c16
3 files changed, 22 insertions, 16 deletions
diff --git a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c
index 514f456927..7c96b78045 100644
--- a/sysdeps/unix/sysv/linux/futimesat.c
+++ b/sysdeps/unix/sysv/linux/futimesat.c
@@ -42,6 +42,9 @@ futimesat (fd, file, tvp)
if (__have_atfcts >= 0)
# endif
{
+ if (file == NULL)
+ return __futimes (fd, tvp);
+
result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
# ifndef __ASSUME_ATFCTS
if (result == -1 && errno == ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 67e9df2e45..4c1f302ab0 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -30,7 +30,8 @@
#if !defined OPENAT && !defined __ASSUME_ATFCTS
# define OPENAT openat
-
+/* Set errno after a failed call. If BUF is not null,
+ it is a /proc/self/fd/ path name we just tried to use. */
void
attribute_hidden
__atfct_seterrno (int errval, int fd, const char *buf)
@@ -39,7 +40,7 @@ __atfct_seterrno (int errval, int fd, const char *buf)
{
struct stat64 st;
- if (errval == ENOTDIR)
+ if (errval == ENOTDIR || errval == ENOENT)
{
/* This can mean either the file descriptor is invalid or
/proc is not mounted. */
@@ -48,23 +49,11 @@ __atfct_seterrno (int errval, int fd, const char *buf)
return;
/* If /proc is not mounted there is nothing we can do. */
- if (S_ISDIR (st.st_mode)
+ if ((errval != ENOTDIR || S_ISDIR (st.st_mode))
&& (__xstat64 (_STAT_VER, "/proc/self/fd", &st) != 0
|| !S_ISDIR (st.st_mode)))
errval = ENOSYS;
}
- else if (errval == ENOENT)
- {
- /* This could mean the file descriptor is not valid. We
- reuse BUF for the stat call. Find the slash after the
- file descriptor number. */
- *(char *) strchr (buf + sizeof "/proc/self/fd", '/') = '\0';
-
- int e = __lxstat64 (_STAT_VER, buf, &st);
- if ((e == -1 && errno == ENOENT)
- ||(e == 0 && !S_ISLNK (st.st_mode)))
- errval = EBADF;
- }
}
__set_errno (errval);
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysconf.c b/sysdeps/unix/sysv/linux/x86_64/sysconf.c
index 407fd46bc3..99f704e1b9 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysconf.c
+++ b/sysdeps/unix/sysv/linux/x86_64/sysconf.c
@@ -1,5 +1,5 @@
/* Get file-specific information about a file. Linux version.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,11 +45,24 @@ static const struct intel_02_cache_info
{ 0x29, _SC_LEVEL3_CACHE_SIZE, 4194304, 8, 64 },
{ 0x2c, _SC_LEVEL1_DCACHE_SIZE, 32768, 8, 64 },
{ 0x30, _SC_LEVEL1_ICACHE_SIZE, 32768, 8, 64 },
+ { 0x39, _SC_LEVEL2_CACHE_SIZE, 131072, 4, 64 },
+ { 0x3a, _SC_LEVEL2_CACHE_SIZE, 196608, 6, 64 },
+ { 0x3b, _SC_LEVEL2_CACHE_SIZE, 131072, 2, 64 },
+ { 0x3c, _SC_LEVEL2_CACHE_SIZE, 262144, 4, 64 },
+ { 0x3d, _SC_LEVEL2_CACHE_SIZE, 393216, 6, 64 },
+ { 0x3e, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 64 },
{ 0x41, _SC_LEVEL2_CACHE_SIZE, 131072, 4, 32 },
{ 0x42, _SC_LEVEL2_CACHE_SIZE, 262144, 4, 32 },
{ 0x43, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 32 },
{ 0x44, _SC_LEVEL2_CACHE_SIZE, 1048576, 4, 32 },
{ 0x45, _SC_LEVEL2_CACHE_SIZE, 2097152, 4, 32 },
+ { 0x46, _SC_LEVEL3_CACHE_SIZE, 4194304, 4, 64 },
+ { 0x47, _SC_LEVEL3_CACHE_SIZE, 8388608, 8, 64 },
+ { 0x49, _SC_LEVEL3_CACHE_SIZE, 4194304, 16, 64 },
+ { 0x4a, _SC_LEVEL3_CACHE_SIZE, 6291456, 12, 64 },
+ { 0x4b, _SC_LEVEL3_CACHE_SIZE, 8388608, 16, 64 },
+ { 0x4c, _SC_LEVEL3_CACHE_SIZE, 12582912, 12, 64 },
+ { 0x4d, _SC_LEVEL3_CACHE_SIZE, 16777216, 16, 64 },
{ 0x60, _SC_LEVEL1_DCACHE_SIZE, 16384, 8, 64 },
{ 0x66, _SC_LEVEL1_DCACHE_SIZE, 8192, 4, 64 },
{ 0x67, _SC_LEVEL1_DCACHE_SIZE, 16384, 4, 64 },
@@ -60,6 +73,7 @@ static const struct intel_02_cache_info
{ 0x7b, _SC_LEVEL2_CACHE_SIZE, 524288, 8, 64 },
{ 0x7c, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 },
{ 0x7d, _SC_LEVEL2_CACHE_SIZE, 2097152, 8, 64 },
+ { 0x7f, _SC_LEVEL2_CACHE_SIZE, 524288, 2, 64 },
{ 0x82, _SC_LEVEL2_CACHE_SIZE, 262144, 8, 32 },
{ 0x83, _SC_LEVEL2_CACHE_SIZE, 524288, 8, 32 },
{ 0x84, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 32 },