]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
statfs: add missing f_flags assignment
authorChen Li <chenli@uniontech.com>
Mon, 12 Oct 2020 05:46:00 +0000 (13:46 +0800)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 15 Oct 2020 09:37:45 +0000 (11:37 +0200)
f_flags is added into struct statfs since Linux 2.6.36, which is lacked
in glibc's statfs64.c until now. So mount flags is uninitialized on
platforms having no statfs64 syscall in kernel, e.g., alpha and its derivation

sysdeps/unix/sysv/linux/statfs64.c

index c9411286375b3869b98f08220c3b930b999da40d..2c293badc8b5e6c2641eacdad0966c8bdba65e3d 100644 (file)
@@ -78,6 +78,7 @@ __statfs64 (const char *file, struct statfs64 *buf)
   buf->f_fsid = buf32.f_fsid;
   buf->f_namelen = buf32.f_namelen;
   buf->f_frsize = buf32.f_frsize;
+  buf->f_flags = buf32.f_flags;
   memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
 
   return 0;