[Ocfs2-tools-devel] [PATCH 1/1] Ocfs2-tools: Let o2image.c also correctly deal with LARGEFILE.
Joel Becker
Joel.Becker at oracle.com
Mon Feb 23 19:15:46 PST 2009
On Tue, Feb 24, 2009 at 10:36:12AM +0800, Tristan Ye wrote:
> We may not need to switch the open64() on by marco HAVE_OPEN64 here,
> since actually the HAVE_OPEN64 seems never was defined in the scope of
> o2image.c. To be more explicit, we simply could use open64() directly since
> such 64bits utility will never affect on 32bits Linux.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
This change is correct anyway, because _LARGEFILE64_SOURCE explicitly
means we have open64(). If a system is broken enough not to have it, we
just want to fail.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
> ---
> o2image/o2image.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/o2image/o2image.c b/o2image/o2image.c
> index 99cbf7c..dae649f 100644
> --- a/o2image/o2image.c
> +++ b/o2image/o2image.c
> @@ -634,11 +634,7 @@ int main(int argc, char **argv)
> if (!install_flag && !prompt_image_creation(ofs, raw_flag,
> dest_file))
> goto out;
> -#ifdef HAVE_OPEN64
> fd = open64(dest_file, O_CREAT|O_TRUNC|O_WRONLY, 0600);
> -#else
> - fd = open(dest_file, O_CREAT|O_TRUNC|O_WRONLY, 0600);
> -#endif
> if (fd < 0) {
> com_err(program_name, errno,
> "while trying to open \"%s\"",
> --
> 1.5.5
>
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
--
Life's Little Instruction Book #464
"Don't miss the magic of the moment by focusing on what's
to come."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list