MCPcopy Create free account
hub / github.com/F-Stack/f-stack / freebsd11_cvtstatfs

Function freebsd11_cvtstatfs

freebsd/kern/vfs_syscalls.c:846–874  ·  view source on GitHub ↗

* Convert a new format statfs structure to an old format statfs structure. */

Source from the content-addressed store, hash-verified

844 * Convert a new format statfs structure to an old format statfs structure.
845 */
846static void
847freebsd11_cvtstatfs(struct statfs *nsp, struct freebsd11_statfs *osp)
848{
849
850 bzero(osp, sizeof(*osp));
851 osp->f_version = FREEBSD11_STATFS_VERSION;
852 osp->f_type = nsp->f_type;
853 osp->f_flags = nsp->f_flags;
854 osp->f_bsize = nsp->f_bsize;
855 osp->f_iosize = nsp->f_iosize;
856 osp->f_blocks = nsp->f_blocks;
857 osp->f_bfree = nsp->f_bfree;
858 osp->f_bavail = nsp->f_bavail;
859 osp->f_files = nsp->f_files;
860 osp->f_ffree = nsp->f_ffree;
861 osp->f_syncwrites = nsp->f_syncwrites;
862 osp->f_asyncwrites = nsp->f_asyncwrites;
863 osp->f_syncreads = nsp->f_syncreads;
864 osp->f_asyncreads = nsp->f_asyncreads;
865 osp->f_namemax = nsp->f_namemax;
866 osp->f_owner = nsp->f_owner;
867 osp->f_fsid = nsp->f_fsid;
868 strlcpy(osp->f_fstypename, nsp->f_fstypename,
869 MIN(MFSNAMELEN, sizeof(osp->f_fstypename)));
870 strlcpy(osp->f_mntonname, nsp->f_mntonname,
871 MIN(MNAMELEN, sizeof(osp->f_mntonname)));
872 strlcpy(osp->f_mntfromname, nsp->f_mntfromname,
873 MIN(MNAMELEN, sizeof(osp->f_mntfromname)));
874}
875#endif /* COMPAT_FREEBSD11 */
876
877/*

Callers 4

freebsd11_statfsFunction · 0.85
freebsd11_fstatfsFunction · 0.85
freebsd11_getfsstatFunction · 0.85
freebsd11_fhstatfsFunction · 0.85

Calls 2

bzeroFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected