From: "H. Peter Anvin" <hpa@zytor.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf tools: using O_LARGEFILE to open perf data file - fix
Date: Wed, 03 Feb 2010 09:30:37 -0800 [thread overview]
Message-ID: <4B69B2BD.60909@zytor.com> (raw)
In-Reply-To: <4B6958B8.3000606@cn.fujitsu.com>
On 02/03/2010 03:06 AM, Xiao Guangrong wrote:
> static void get_next_page(int cpu)
> {
> - off64_t save_seek;
> - off64_t ret;
> + s64 save_seek;
> + s64 ret;
Should be off_t (which is 64 bits with _FILE_OFFSET_BITS=64.)
>
> if (!cpu_data[cpu].page)
> return;
> @@ -298,9 +298,9 @@ static void get_next_page(int cpu)
> update_cpu_data_index(cpu);
>
> /* other parts of the code may expect the pointer to not move */
> - save_seek = lseek64(input_fd, 0, SEEK_CUR);
> + save_seek = lseek(input_fd, 0, SEEK_CUR);
>
> - ret = lseek64(input_fd, cpu_data[cpu].offset, SEEK_SET);
> + ret = lseek(input_fd, cpu_data[cpu].offset, SEEK_SET);
> if (ret < 0)
> die("failed to lseek");
Compare for equality against (off_t)-1 here.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2010-02-03 17:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 3:53 [PATCH] perf tools: using O_LARGEFILE to open perf data file Xiao Guangrong
2010-02-03 8:45 ` [tip:perf/core] perf tools: Use " tip-bot for Xiao Guangrong
2010-02-03 9:23 ` H. Peter Anvin
2010-02-03 11:00 ` Xiao Guangrong
2010-02-03 11:06 ` [PATCH] perf tools: using O_LARGEFILE to open perf data file - fix Xiao Guangrong
2010-02-03 13:19 ` Ingo Molnar
2010-02-04 2:31 ` Xiao Guangrong
2010-02-03 17:30 ` H. Peter Anvin [this message]
2010-02-04 8:46 ` [PATCH v2] " Xiao Guangrong
2010-02-04 9:57 ` [tip:perf/core] perf tools: Clean up O_LARGEFILE et al usage tip-bot for Xiao Guangrong
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=4B69B2BD.60909@zytor.com \
--to=hpa@zytor.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=xiaoguangrong@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.