Subject: [nextstep pkgsrc bootstrap] nbcompat/statvfs.c function fs2vfs
To: None <tech-pkg@netbsd.org>
From: Andreas_Hallmann <hallmann@ahatec.de>
List: tech-pkg
Date: 06/24/2005 09:08:08
Hi I'm approaching much more serious problems now.

In nbcompat/statvfs.c is a function fs2vfs.

-----------------------
static void
fs2vfs(struct statvfs *vfs, const struct statfs *sfs)
{
        vfs->f_flag = 0;
        if (sfs->f_flags & MNT_RDONLY)
                vfs->f_flag |= ST_RDONLY;
        if (sfs->f_flags & MNT_NOSUID)
                vfs->f_flag |= ST_NOSUID;
...
----------------------

PROBLEM: NextSTEP has a struct statfs in /usr/include/bsd/sys/vfs.h
         but it doesn't have mount flags included. (See below)

Questions: What is fs2vfs good for?
	   Do I need it?
           Ideas for a work around?

----------------------
/*
 * file system statistics
 */
struct statfs {
        long f_type;                    /* type of info, zero for now */
        long f_bsize;                   /* fundamental file system block size */
        long f_blocks;                  /* total blocks in file system */
        long f_bfree;                   /* free block in fs */
        long f_bavail;                  /* free blocks avail to non-superuser */
        long f_files;                   /* total file nodes in file system */
        long f_ffree;                   /* free file nodes in fs */
        fsid_t f_fsid;                  /* file system id */
        long f_spare[7];                /* spare for later */
};
----------------------

netbsd has a struct statfs in  /usr/include//sys/mount.h

----------------------
struct statfs {
        short   f_type;                 /* type of file system */
        u_short f_oflags;               /* deprecated copy of mount flags */
        long    f_bsize;                /* fundamental file system block size */
        long    f_iosize;               /* optimal transfer block size */
        long    f_blocks;               /* total data blocks in file system */
        long    f_bfree;                /* free blocks in fs */
        long    f_bavail;               /* free blocks avail to non-superuser */
        long    f_files;                /* total file nodes in file system */
        long    f_ffree;                /* free file nodes in fs */
        fsid_t  f_fsid;                 /* file system id */
        uid_t   f_owner;                /* user that mounted the file system */
        long    f_flags;                /* copy of mount flags */
        long    f_syncwrites;           /* count of sync writes since mount */
        long    f_asyncwrites;          /* count of async writes since mount */
        long    f_spare[1];             /* spare for later */
        char    f_fstypename[MFSNAMELEN]; /* fs type name */
        char    f_mntonname[MNAMELEN];    /* directory on which mounted */
        char    f_mntfromname[MNAMELEN];  /* mounted file system */
};
----------------------

-- 
NetBSD: If you happen to have any problem with your uptime.