From: Stef Bon <stefbon@gm...>  20101129 12:36:01

Hi, when programming the statvfs call, I want to program this call like: take these from the underlying fs: unsigned long f_bsize File system block size. unsigned long f_frsize Fundamental file system block size. fsblkcnt_t f_blocks Total number of blocks on file system in units of f_frsize. fsblkcnt_t f_bfree Total number of free blocks. fsblkcnt_t f_bavail Number of free blocks available to nonprivileged process. take these from the fuse fs fsfilcnt_t f_files Total number of file serial numbers. fsfilcnt_t f_ffree Total number of free file serial numbers. fsfilcnt_t f_favail Number of file serial numbers available to nonprivileged process. and the last have a default value: unsigned long f_fsid File system ID. unsigned long f_flag Bit mask of f_flag values. unsigned long f_namemax Maximum filename length. the last ones: the Maximum filename length is a default value ( I've seen values like 256), the system ID is something strange (in the manpage of statfs is noted: Nobody knows what f_fsid is supposed to contain), and flag I do not know either. Then the number of files: this one is the number of files (inodes). To compute the free ones it looks simple: maximum number minus the number of used. But here starts the trouble: the ino is of type __64, which is equivalent to uint64_t, where the maximum is already defined in stdint.h: #define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL) Can I just take that value as maximum or do I hace to do some checks first the host supports 64 bits vars?? Stef 