From: Andreas Jaeger <aj@suse.de>
To: GNU libc hackers <libc-hacker@sources.redhat.com>
Subject: Fix PR 5208 - readahead
Date: Tue, 23 Oct 2007 07:04:00 -0000 [thread overview]
Message-ID: <hok5pe5n28.fsf@reger.suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
The system call parameters are wrong for little endian.
Ok to commit to both 2.7 and HEAD?
Andreas
2007-10-23 Andreas Jaeger <aj@suse.de>
[BZ #5208]
* sysdeps/unix/sysv/linux/readahead.c (__readahead): Use
__LONG_LONG_PAIR to handle little endian byte order.
Suggested by abhishekrai@google.com
============================================================
Index: sysdeps/unix/sysv/linux/readahead.c
--- sysdeps/unix/sysv/linux/readahead.c 20 Jan 2004 23:21:34 -0000 1.3
+++ sysdeps/unix/sysv/linux/readahead.c 23 Oct 2007 07:03:51 -0000
@@ -1,5 +1,5 @@
/* Provide kernel hint to read ahead.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2007 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
@@ -30,8 +30,10 @@
ssize_t
__readahead (int fd, off64_t offset, size_t count)
{
- return INLINE_SYSCALL (readahead, 4, fd, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff), count);
+ return INLINE_SYSCALL (readahead, 4, fd,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)),
+ count);
}
#else
ssize_t
--
Andreas Jaeger, Director Platform / openSUSE, aj@suse.de
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 193 bytes --]
next reply other threads:[~2007-10-23 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 7:04 Andreas Jaeger [this message]
2007-10-28 1:09 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=hok5pe5n28.fsf@reger.suse.de \
--to=aj@suse.de \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).