Hi all,

I have a native application porting for Android by using bionic.
When I try to execute this native application the fstatfs() system
call returns -1 always and the errno is 22(EINVAL).

Any idea why this fstatfs() always returns -1 for Android. The same
application is running successful on X86 Linux but fails on Android
emulator.

Example code is
int main (void)
{
        struct statfs  buf;
        int    ret = 0;
        int fd = 0;

        fd = open("test.txt", O_RDWR | O_CREAT, 0700);
        if (fd < 0)
        {
                printf("\n  fd: %d ******* errno: %d *******\n ",fd, errno);
                return 0;
        }

        printf ("\n fd: %d", fd);
        ret = fstatfs(fd, &buf);
        printf("\n  ret: %d  errno: %d \n ",ret, errno);

        close(fd);
        return 0;
}

output
fd: 3
  ret: -1  errno: 22

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to