This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.11-26-g8ad81b3
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 18 Nov 2009 02:05:17 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.11-26-g8ad81b3
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 8ad81b316bc158746aee18aa7d7df44d3eb61871 (commit)
from f8c10bb45b7639ec7b6bb500a9e69b1e29d5e6f6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ad81b316bc158746aee18aa7d7df44d3eb61871
commit 8ad81b316bc158746aee18aa7d7df44d3eb61871
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 17 18:04:51 2009 -0800
Fix sync_file_range on ppc/ppc64.
I've noticed that sync_file_range is a stub on ppc/ppc64.
The kernel on these arches provides sync_file_range2 syscall with swapped
parameters.
The following completely untested patch ought to fix this.
diff --git a/ChangeLog b/ChangeLog
index 0a6ae19..fd62431 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
+ Implement using sync_file_range2 syscall if __NR_sync_file_range2
+ is defined.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c: New
+ file.
+
2009-11-17 Paolo Bonzini <bonzini@gnu.org>
* posix/bug-regex30.c: New file.
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
similarity index 82%
copy from sysdeps/unix/sysv/linux/sync_file_range.c
copy to sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
index 4e267a1..1ca4ce6 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009 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
@@ -25,14 +25,11 @@
#include <sys/syscall.h>
-#ifdef __NR_sync_file_range
+#if defined __NR_sync_file_range2
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
{
- return INLINE_SYSCALL (sync_file_range, 6, fd,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
+ return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
}
#else
int
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
index 4e267a1..41e08e0 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/sync_file_range.c
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009 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
@@ -34,6 +34,14 @@ sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
__LONG_LONG_PAIR ((long) (to >> 32), (long) to),
flags);
}
+#elif defined __NR_sync_file_range2
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range2, 6, fd, flags,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
+}
#else
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
.../{ => powerpc/powerpc64}/sync_file_range.c | 9 +++------
sysdeps/unix/sysv/linux/sync_file_range.c | 10 +++++++++-
3 files changed, 20 insertions(+), 7 deletions(-)
copy sysdeps/unix/sysv/linux/{ => powerpc/powerpc64}/sync_file_range.c (82%)
hooks/post-receive
--
GNU C Library master sources