It is supported both in the sense of being contained in mips version of statfs/statfs64 structs and also in the sense that it's filled by the corresponding kernel syscalls.
It is UNsupported in that sense that it's value is the same as that of f_bsize (at least on older kernel versions, the oldest version tested is 2.6.13), s. [1] and [2] for details ([1] is the latest kernel version as of now, [2] is the oldest kernel version git history is available for).
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree... [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree...
Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac
Signed-off-by: Eugene Rudoy gene.devel@gmail.com Signed-off-by: Ralf Friedl Ralf.Friedl@online.de --- libc/sysdeps/linux/mips/bits/statfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/sysdeps/linux/mips/bits/statfs.h b/libc/sysdeps/linux/mips/bits/statfs.h index 673120d1a..baa964532 100644 --- a/libc/sysdeps/linux/mips/bits/statfs.h +++ b/libc/sysdeps/linux/mips/bits/statfs.h @@ -26,7 +26,7 @@ struct statfs long int f_type; #define f_fstyp f_type long int f_bsize; - long int f_frsize; /* Fragment size - unsupported */ + long int f_frsize; #ifndef __USE_FILE_OFFSET64 __fsblkcnt_t f_blocks; __fsblkcnt_t f_bfree; @@ -53,7 +53,7 @@ struct statfs64 long int f_type; #define f_fstyp f_type long int f_bsize; - long int f_frsize; /* Fragment size - unsupported */ + long int f_frsize; __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_files;
Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac
Signed-off-by: Eugene Rudoy gene.devel@gmail.com --- test/misc/tst-statfs.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/test/misc/tst-statfs.c b/test/misc/tst-statfs.c index 6b501c0..87f4462 100644 --- a/test/misc/tst-statfs.c +++ b/test/misc/tst-statfs.c @@ -19,6 +19,9 @@ main(int argc, char* argv[]) ++ret; printf("statfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n", argv[i], s.f_blocks, s.f_bfree, s.f_bsize); +#ifdef _STATFS_F_FRSIZE + printf("\tfrsize=%lld\n", s.f_frsize); +#endif } exit(ret ? EXIT_SUCCESS : EXIT_FAILURE); }
Follow-up of e3d6c8bffe79b2c070bc7a3aabc9d9c65f6b099e
Signed-off-by: Eugene Rudoy gene.devel@gmail.com Signed-off-by: Ralf Friedl Ralf.Friedl@online.de --- libc/misc/statfs/fstatfs64.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c index bb9ca3063..6c2c41822 100644 --- a/libc/misc/statfs/fstatfs64.c +++ b/libc/misc/statfs/fstatfs64.c @@ -25,7 +25,7 @@ #include <sys/syscall.h> #include <stddef.h>
-#if defined __NR_fstatfs +#if !defined __NR_fstatfs64 extern __typeof(fstatfs) __libc_fstatfs;
/* Return information about the filesystem on which FD resides. */ @@ -55,11 +55,6 @@ int fstatfs64 (int fd, struct statfs64 *buf) return 0; } #else -/* - * Use the fstatfs64 system call if fstatfs is not defined - * This is for backwards compatibility and it should be - * made default in the future - */ int fstatfs64(int fd, struct statfs64 *buf) { /* Signature has 2 arguments but syscalls wants 3 */
Hi Eugene, Eugene Rudoy wrote,
It is supported both in the sense of being contained in mips version of statfs/statfs64 structs and also in the sense that it's filled by the corresponding kernel syscalls.
It is UNsupported in that sense that it's value is the same as that of f_bsize (at least on older kernel versions, the oldest version tested is 2.6.13), s. [1] and [2] for details ([1] is the latest kernel version as of now, [2] is the oldest kernel version git history is available for).
Thanks for the patches, I applied and pushed all three. They are part of the latest release.
best regards Waldemar