This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: merging fadvise64_64 fallback?
- From: Andreas Jaeger <aj at suse dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: Carlos O'Donell <carlos at systemhalted dot org>,libc-alpha at sourceware dot org
- Date: Tue, 04 Dec 2012 09:18:06 +0100
- Subject: Re: merging fadvise64_64 fallback?
- References: <201212040215.13715.vapier@gentoo.org>
On 12/04/2012 08:15 AM, Mike Frysinger wrote:
this patch still applies :)
http://sourceware.org/ml/libc-alpha/2004-09/msg00179.html
-mike
That one contains "Before I test", so did anybody test this ?
I suggest to rework the patch:
* add a copyright header change
* have the common parts merged together (see below)
Andreas
--- a/sysdeps/unix/sysv/linux/posix_fadvise.c
+++ b/sysdeps/unix/sysv/linux/posix_fadvise.c
@@ -35,6 +35,19 @@
return INTERNAL_SYSCALL_ERRNO (ret, err);
return 0;
#else
+# ifdef __NR_fadvise64_64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
+ __LONG_LONG_PAIR ((long) (offset >> 31),
+ (long) offset),
+ __LONG_LONG_PAIR ((long) (len >> 31),
+ (long) len),
+ advise);
The following lines are duplicated now in the file, could change the
condition to have them only once?
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+# else
return ENOSYS;
+# endif
#endif
}
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126