"Jianqiu Zhang" zhangjianqiu_133@yeah.net writes:
if(!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
{
io->u.Status = STATUS_INVALID_DEVICE_REQUEST;
}
else
{
ULONGLONG bsize;
+#if !defined(linux) || !defined(HAVE_FSTATFS)
struct statvfs stfs;
if(fstatvfs( fd, &stfs ) < 0)
{
io->u.Status = FILE_GetNtStatus();
break;
}
bsize = stfs.f_frsize;
+#else
struct statfs stfs;
if(fstatfs( fd, &stfs ) < 0)
{
io->u.Status = FILE_GetNtStatus();
break;
}
bsize = stfs.f_bsize;
+#endif
Please avoid duplicating all that code.