diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2005-04-18 03:42:36 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2005-04-18 03:42:36 +0000 |
commit | c834daa71682d2dedae8d4d55005d053aa03c3c3 (patch) | |
tree | 068b0fcbf2e8acfa685ba9d1b9ea04b7e4293d8d /cpukit | |
parent | 2005-04-18 Ralf Corsepius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-c834daa71682d2dedae8d4d55005d053aa03c3c3.tar.bz2 |
2005-04-18 Ralf Corsepius <ralf.corsepius@rtems.org>
* libnetworking/sys/mount.h: More updates from FreeBSD.
Remove ufs, mfs, dosfs, isofs.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libnetworking/sys/mount.h | 175 |
1 files changed, 18 insertions, 157 deletions
diff --git a/cpukit/libnetworking/sys/mount.h b/cpukit/libnetworking/sys/mount.h index acb1f697f1..694b1dda14 100644 --- a/cpukit/libnetworking/sys/mount.h +++ b/cpukit/libnetworking/sys/mount.h @@ -42,7 +42,7 @@ #endif #include <sys/queue.h> -typedef struct fsid { long val[2]; } fsid_t; /* file system id type */ +typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */ /* * File identifier. @@ -57,21 +57,21 @@ struct fid { }; /* - * file system statistics + * filesystem statistics */ #define MNAMELEN 90 /* length of buffer for returned name */ struct statfs { long f_spare2; /* placeholder */ - long f_bsize; /* fundamental file system block size */ + long f_bsize; /* fundamental filesystem block size */ long f_iosize; /* optimal transfer block size */ - long f_blocks; /* total data blocks in file system */ + long f_blocks; /* total data blocks in filesystem */ 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_files; /* total file nodes in filesystem */ long f_ffree; /* free file nodes in fs */ - fsid_t f_fsid; /* file system id */ + fsid_t f_fsid; /* filesystem id */ uid_t f_owner; /* user that mounted the filesystem */ int f_type; /* type of filesystem (see below) */ int f_flags; /* copy of mount flags */ @@ -81,58 +81,10 @@ struct statfs { }; /* - * File system types. - */ -#define MOUNT_NONE 0 -#define MOUNT_UFS 1 /* Fast Filesystem */ -#define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */ -#define MOUNT_MFS 3 /* Memory-based Filesystem */ -#define MOUNT_MSDOS 4 /* MS/DOS Filesystem */ -#define MOUNT_LFS 5 /* Log-based Filesystem */ -#define MOUNT_LOFS 6 /* Loopback Filesystem */ -#define MOUNT_FDESC 7 /* File Descriptor Filesystem */ -#define MOUNT_PORTAL 8 /* Portal Filesystem */ -#define MOUNT_NULL 9 /* Minimal Filesystem Layer */ -#define MOUNT_UMAP 10 /* User/Group Identifier Remapping Filesystem */ -#define MOUNT_KERNFS 11 /* Kernel Information Filesystem */ -#define MOUNT_PROCFS 12 /* /proc Filesystem */ -#define MOUNT_AFS 13 /* Andrew Filesystem */ -#define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */ -#define MOUNT_UNION 15 /* Union (translucent) Filesystem */ -#define MOUNT_DEVFS 16 /* existing device Filesystem */ -#define MOUNT_EXT2FS 17 /* Linux EXT2FS */ -#define MOUNT_TFS 18 /* Netcon Novell filesystem */ -#define MOUNT_CFS 19 /* Coda filesystem */ -#define MOUNT_MAXTYPE 19 - -#define INITMOUNTNAMES { \ - "none", /* 0 MOUNT_NONE */ \ - "ufs", /* 1 MOUNT_UFS */ \ - "nfs", /* 2 MOUNT_NFS */ \ - "mfs", /* 3 MOUNT_MFS */ \ - "msdos", /* 4 MOUNT_MSDOS */ \ - "lfs", /* 5 MOUNT_LFS */ \ - "lofs", /* 6 MOUNT_LOFS */ \ - "fdesc", /* 7 MOUNT_FDESC */ \ - "portal", /* 8 MOUNT_PORTAL */ \ - "null", /* 9 MOUNT_NULL */ \ - "umap", /* 10 MOUNT_UMAP */ \ - "kernfs", /* 11 MOUNT_KERNFS */ \ - "procfs", /* 12 MOUNT_PROCFS */ \ - "afs", /* 13 MOUNT_AFS */ \ - "cd9660", /* 14 MOUNT_CD9660 */ \ - "union", /* 15 MOUNT_UNION */ \ - "devfs", /* 16 MOUNT_DEVFS */ \ - "ext2fs", /* 17 MOUNT_EXT2FS */ \ - "tfs", /* 18 MOUNT_TFS */ \ - "cfs", /* 19 MOUNT_CFS */ \ - 0, /* 20 MOUNT_SPARE */ \ -} - -/* - * Structure per mounted file system. Each mounted file system has an - * array of operations and an instance record. The file systems are + * Structure per mounted filesystem. Each mounted filesystem has an + * array of operations and an instance record. The filesystems are * put on a doubly linked list. + * */ LIST_HEAD(vnodelst, vnode); @@ -145,8 +97,7 @@ struct mount { int mnt_flag; /* flags */ int mnt_maxsymlinklen; /* max size of short symlink */ struct statfs mnt_stat; /* cache of filesystem stats */ - qaddr_t mnt_data; /* private data */ -/* struct vfsconf *mnt_vfc; */ /* configuration info */ + void * mnt_data; /* private data */ time_t mnt_time; /* last time written*/ }; @@ -156,22 +107,23 @@ struct mount { * Unmount uses MNT_FORCE flag. */ #define MNT_RDONLY 0x00000001 /* read only filesystem */ -#define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */ +#define MNT_SYNCHRONOUS 0x00000002 /* filesystem written synchronously */ #define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */ #define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */ #define MNT_NODEV 0x00000010 /* don't interpret special files */ #define MNT_UNION 0x00000020 /* union with underlying filesystem */ -#define MNT_ASYNC 0x00000040 /* file system written asynchronously */ +#define MNT_ASYNC 0x00000040 /* filesystem written asynchronously */ #define MNT_NOATIME 0x10000000 /* Disable update of file access times */ /* * exported mount flags. */ #define MNT_EXRDONLY 0x00000080 /* exported read only */ -#define MNT_EXPORTED 0x00000100 /* file system is exported */ +#define MNT_EXPORTED 0x00000100 /* filesystem is exported */ #define MNT_DEFEXPORTED 0x00000200 /* exported to the world */ #define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */ #define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */ +#define MNT_EXPUBLIC 0x20000000 /* public export (WebNFS) */ /* * Flags set by internal operations. @@ -180,6 +132,7 @@ struct mount { #define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */ #define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */ #define MNT_USER 0x00008000 /* mounted by a user */ +#define MNT_IGNORE 0x00800000 /* do not show entry in df */ /* * Mask of flags that are visible to statfs() @@ -220,18 +173,7 @@ struct vfsconf { }; /* - * NB: these flags refer to IMPLEMENTATION properties, not properties of - * any actual mounts; i.e., it does not make sense to change the flags. - */ -#define VFCF_STATIC 0x00000001 /* statically compiled into kernel */ -#define VFCF_NETWORK 0x00000002 /* may get data over the network */ -#define VFCF_READONLY 0x00000004 /* writes are not implemented */ -#define VFCF_SYNTHETIC 0x00000008 /* data does not represent real files */ -#define VFCF_LOOPBACK 0x00000010 /* aliases some other mounted FS */ -#define VFCF_UNICODE 0x00000020 /* stores file names as Unicode*/ - -/* - * Operations supported on mounted file system. + * Operations supported on mounted filesystem. */ #ifdef _KERNEL @@ -280,38 +222,6 @@ struct vfsops { (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, NAM, VPP, EXFLG, CRED) #define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP) -#ifdef VFS_LKM -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> - -#define VFS_SET(vfsops, fsname, index, flags) \ - static struct vfsconf _fs_vfsconf = { \ - &vfsops, \ - #fsname, \ - index, \ - 0, \ - flags \ - }; \ - extern struct linker_set MODVNOPS; \ - MOD_VFS(#fsname,index,&MODVNOPS,&_fs_vfsconf); \ - int \ - fsname ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \ - DISPATCH(lkmtp, cmd, ver, lkm_nullcmd, lkm_nullcmd, lkm_nullcmd); } -#else - -#define VFS_SET(vfsops, fsname, index, flags) \ - static struct vfsconf _fs_vfsconf = { \ - &vfsops, \ - #fsname, \ - index, \ - 0, \ - flags | VFCF_STATIC \ - }; \ - DATA_SET(vfs_set,_fs_vfsconf) -#endif /* VFS_LKM */ - #endif /* _KERNEL */ /* @@ -326,8 +236,8 @@ struct vfsops { * Generic file handle */ struct fhandle { - fsid_t fh_fsid; /* File system id of mount point */ - struct fid fh_fid; /* File sys specific id */ + fsid_t fh_fsid; /* Filesystem id of mount point */ + struct fid fh_fid; /* Filesys specific id */ }; typedef struct fhandle fhandle_t; @@ -366,55 +276,6 @@ struct export_args { int ex_masklen; /* and the smask length */ }; -/* - * Arguments to mount UFS-based filesystems - */ -struct ufs_args { - char *fspec; /* block special device to mount */ - struct export_args export; /* network export information */ -}; - -#ifdef MFS -/* - * Arguments to mount MFS - */ -struct mfs_args { - char *fspec; /* name to export for statfs */ - struct export_args export; /* if exported MFSes are supported */ - caddr_t base; /* base of file system in memory */ - u_long size; /* size of file system */ -}; -#endif /* MFS */ - -#ifdef MSDOSFS -/* - * Arguments to mount MSDOS filesystems. - */ -struct msdosfs_args { - char *fspec; /* blocks special holding the fs to mount */ - struct export_args export; /* network export information */ - uid_t uid; /* uid that owns msdosfs files */ - gid_t gid; /* gid that owns msdosfs files */ - mode_t mask; /* mask to be applied for msdosfs perms */ -}; -#endif - -#ifdef CD9660 -/* - * Arguments to mount ISO 9660 filesystems. - */ -struct iso_args { - char *fspec; /* block special device to mount */ - struct export_args export; /* network export info */ - int flags; /* mounting flags, see below */ - int ssector; /* starting sector */ - -}; -#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/ -#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */ -#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */ -#endif /* CD9660 */ - #ifdef _KERNEL extern int (*mountroot) __P((void *)); extern struct vfsops *mountrootvfsops; |