[Ocfs2-tools-devel] [PATCH 1/1] Ocfs2-tools: Let o2image.c also correctly deal with LARGEFILE.

Coly Li coly.li at suse.de
Thu Feb 26 23:29:58 PST 2009



Joel Becker Wrote:
> 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.
> 
Since include/ocfs2/ocfs2.h declares _LARGEFILES64_SOURCE explicitly, can we say if:
1) a source file includes "ocfs2/ocfs2.h"
2) a device file (e.g. /dev/sda or /dev/sda1) to be opened
an open64() should be used other than open() ?

Thanks.
-- 
Coly Li
SuSE Labs



More information about the Ocfs2-tools-devel mailing list