Date: Sun, 19 Mar 2017 10:39:59 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315543 - in stable/11/sys: amd64/linux32 compat/linux i386/linux Message-ID: <201703191039.v2JAdxO1069245@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Sun Mar 19 10:39:59 2017 New Revision: 315543 URL: https://svnweb.freebsd.org/changeset/base/315543 Log: MFC r314282: Fix linux_fstatfs() to return proper value for f_frsize. Without it, linux df(1) binary from Xenial shows garbage. Modified: stable/11/sys/amd64/linux32/linux.h stable/11/sys/compat/linux/linux_stats.c stable/11/sys/i386/linux/linux.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux32/linux.h ============================================================================== --- stable/11/sys/amd64/linux32/linux.h Sun Mar 19 10:38:27 2017 (r315542) +++ stable/11/sys/amd64/linux32/linux.h Sun Mar 19 10:39:59 2017 (r315543) @@ -250,7 +250,9 @@ struct l_statfs64 { uint64_t f_ffree; l_fsid_t f_fsid; l_int f_namelen; - l_int f_spare[6]; + l_int f_frsize; + l_int f_flags; + l_int f_spare[4]; } __packed; /* sigaction flags */ Modified: stable/11/sys/compat/linux/linux_stats.c ============================================================================== --- stable/11/sys/compat/linux/linux_stats.c Sun Mar 19 10:38:27 2017 (r315542) +++ stable/11/sys/compat/linux/linux_stats.c Sun Mar 19 10:39:59 2017 (r315543) @@ -339,7 +339,9 @@ struct l_statfs { l_long f_ffree; l_fsid_t f_fsid; l_long f_namelen; - l_long f_spare[6]; + l_long f_frsize; + l_long f_flags; + l_long f_spare[4]; }; #define LINUX_CODA_SUPER_MAGIC 0x73757245L @@ -407,6 +409,9 @@ bsd_to_linux_statfs(struct statfs *bsd_s linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0]; linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1]; linux_statfs->f_namelen = MAXNAMLEN; + linux_statfs->f_frsize = bsd_statfs->f_bsize; + linux_statfs->f_flags = 0; + memset(linux_statfs->f_spare, 0, sizeof(linux_statfs->f_spare)); return (0); } @@ -451,6 +456,9 @@ bsd_to_linux_statfs64(struct statfs *bsd linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0]; linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1]; linux_statfs->f_namelen = MAXNAMLEN; + linux_statfs->f_frsize = bsd_statfs->f_bsize; + linux_statfs->f_flags = 0; + memset(linux_statfs->f_spare, 0, sizeof(linux_statfs->f_spare)); } int Modified: stable/11/sys/i386/linux/linux.h ============================================================================== --- stable/11/sys/i386/linux/linux.h Sun Mar 19 10:38:27 2017 (r315542) +++ stable/11/sys/i386/linux/linux.h Sun Mar 19 10:39:59 2017 (r315543) @@ -225,7 +225,9 @@ struct l_statfs64 { uint64_t f_ffree; l_fsid_t f_fsid; l_int f_namelen; - l_int f_spare[6]; + l_int f_frsize; + l_int f_flags; + l_int f_spare[4]; }; #define LINUX_NSIG_WORDS 2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703191039.v2JAdxO1069245>