Skip to contentSkip to conversation

How to support LFS on ppc

DISCUSSION JohnsonCheng 1 participant 1 message Sep 14, 2005

lore
Share & tools
lore
#0 lore raw

Dear All,

I have a problem about Large File System on ppc. The following is my example code:

#define _FILE_OFFSET_BITS 64

#include <sys/stat.h>

#include <unistd.h>

Int main()

{

           struct stat buf;

           stat64("/3G",&buf);

           printf("size of test = %ld \n",buf.st_size);

           lstat64("/3G",&buf);

     printf("size of test 2= %ld\n",buf.st_size);

           return 0;

}

The conclusion is as following:

size of test = 2141735952

size of test 2= 805910402

But the real size of 3G file is 3145728000. I think it maybe the offset is wrong, but I don't know how to correct it. Can someone give me some advise.

Thanks,

Johnson Cheng