Changeset c834daa in rtems
- Timestamp:
- 04/18/05 03:42:36 (19 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- a3c06e11
- Parents:
- a9a6845
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libnetworking/sys/mount.h
ra9a6845 rc834daa 43 43 #include <sys/queue.h> 44 44 45 typedef struct fsid { long val[2]; } fsid_t; /* filesystem id type */45 typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */ 46 46 47 47 /* … … 58 58 59 59 /* 60 * file 60 * filesystem statistics 61 61 */ 62 62 … … 65 65 struct statfs { 66 66 long f_spare2; /* placeholder */ 67 long f_bsize; /* fundamental file 67 long f_bsize; /* fundamental filesystem block size */ 68 68 long f_iosize; /* optimal transfer block size */ 69 long f_blocks; /* total data blocks in file 69 long f_blocks; /* total data blocks in filesystem */ 70 70 long f_bfree; /* free blocks in fs */ 71 71 long f_bavail; /* free blocks avail to non-superuser */ 72 long f_files; /* total file nodes in file 72 long f_files; /* total file nodes in filesystem */ 73 73 long f_ffree; /* free file nodes in fs */ 74 fsid_t f_fsid; /* file 74 fsid_t f_fsid; /* filesystem id */ 75 75 uid_t f_owner; /* user that mounted the filesystem */ 76 76 int f_type; /* type of filesystem (see below) */ … … 82 82 83 83 /* 84 * File system types. 85 */ 86 #define MOUNT_NONE 0 87 #define MOUNT_UFS 1 /* Fast Filesystem */ 88 #define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */ 89 #define MOUNT_MFS 3 /* Memory-based Filesystem */ 90 #define MOUNT_MSDOS 4 /* MS/DOS Filesystem */ 91 #define MOUNT_LFS 5 /* Log-based Filesystem */ 92 #define MOUNT_LOFS 6 /* Loopback Filesystem */ 93 #define MOUNT_FDESC 7 /* File Descriptor Filesystem */ 94 #define MOUNT_PORTAL 8 /* Portal Filesystem */ 95 #define MOUNT_NULL 9 /* Minimal Filesystem Layer */ 96 #define MOUNT_UMAP 10 /* User/Group Identifier Remapping Filesystem */ 97 #define MOUNT_KERNFS 11 /* Kernel Information Filesystem */ 98 #define MOUNT_PROCFS 12 /* /proc Filesystem */ 99 #define MOUNT_AFS 13 /* Andrew Filesystem */ 100 #define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */ 101 #define MOUNT_UNION 15 /* Union (translucent) Filesystem */ 102 #define MOUNT_DEVFS 16 /* existing device Filesystem */ 103 #define MOUNT_EXT2FS 17 /* Linux EXT2FS */ 104 #define MOUNT_TFS 18 /* Netcon Novell filesystem */ 105 #define MOUNT_CFS 19 /* Coda filesystem */ 106 #define MOUNT_MAXTYPE 19 107 108 #define INITMOUNTNAMES { \ 109 "none", /* 0 MOUNT_NONE */ \ 110 "ufs", /* 1 MOUNT_UFS */ \ 111 "nfs", /* 2 MOUNT_NFS */ \ 112 "mfs", /* 3 MOUNT_MFS */ \ 113 "msdos", /* 4 MOUNT_MSDOS */ \ 114 "lfs", /* 5 MOUNT_LFS */ \ 115 "lofs", /* 6 MOUNT_LOFS */ \ 116 "fdesc", /* 7 MOUNT_FDESC */ \ 117 "portal", /* 8 MOUNT_PORTAL */ \ 118 "null", /* 9 MOUNT_NULL */ \ 119 "umap", /* 10 MOUNT_UMAP */ \ 120 "kernfs", /* 11 MOUNT_KERNFS */ \ 121 "procfs", /* 12 MOUNT_PROCFS */ \ 122 "afs", /* 13 MOUNT_AFS */ \ 123 "cd9660", /* 14 MOUNT_CD9660 */ \ 124 "union", /* 15 MOUNT_UNION */ \ 125 "devfs", /* 16 MOUNT_DEVFS */ \ 126 "ext2fs", /* 17 MOUNT_EXT2FS */ \ 127 "tfs", /* 18 MOUNT_TFS */ \ 128 "cfs", /* 19 MOUNT_CFS */ \ 129 0, /* 20 MOUNT_SPARE */ \ 130 } 131 132 /* 133 * Structure per mounted file system. Each mounted file system has an 134 * array of operations and an instance record. The file systems are 84 * Structure per mounted filesystem. Each mounted filesystem has an 85 * array of operations and an instance record. The filesystems are 135 86 * put on a doubly linked list. 87 * 136 88 */ 137 89 LIST_HEAD(vnodelst, vnode); … … 146 98 int mnt_maxsymlinklen; /* max size of short symlink */ 147 99 struct statfs mnt_stat; /* cache of filesystem stats */ 148 qaddr_t mnt_data; /* private data */ 149 /* struct vfsconf *mnt_vfc; */ /* configuration info */ 100 void * mnt_data; /* private data */ 150 101 time_t mnt_time; /* last time written*/ 151 102 }; … … 157 108 */ 158 109 #define MNT_RDONLY 0x00000001 /* read only filesystem */ 159 #define MNT_SYNCHRONOUS 0x00000002 /* file 110 #define MNT_SYNCHRONOUS 0x00000002 /* filesystem written synchronously */ 160 111 #define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */ 161 112 #define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */ 162 113 #define MNT_NODEV 0x00000010 /* don't interpret special files */ 163 114 #define MNT_UNION 0x00000020 /* union with underlying filesystem */ 164 #define MNT_ASYNC 0x00000040 /* file 115 #define MNT_ASYNC 0x00000040 /* filesystem written asynchronously */ 165 116 #define MNT_NOATIME 0x10000000 /* Disable update of file access times */ 166 117 … … 169 120 */ 170 121 #define MNT_EXRDONLY 0x00000080 /* exported read only */ 171 #define MNT_EXPORTED 0x00000100 /* file 122 #define MNT_EXPORTED 0x00000100 /* filesystem is exported */ 172 123 #define MNT_DEFEXPORTED 0x00000200 /* exported to the world */ 173 124 #define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */ 174 125 #define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */ 126 #define MNT_EXPUBLIC 0x20000000 /* public export (WebNFS) */ 175 127 176 128 /* … … 181 133 #define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */ 182 134 #define MNT_USER 0x00008000 /* mounted by a user */ 135 #define MNT_IGNORE 0x00800000 /* do not show entry in df */ 183 136 184 137 /* … … 221 174 222 175 /* 223 * NB: these flags refer to IMPLEMENTATION properties, not properties of 224 * any actual mounts; i.e., it does not make sense to change the flags. 225 */ 226 #define VFCF_STATIC 0x00000001 /* statically compiled into kernel */ 227 #define VFCF_NETWORK 0x00000002 /* may get data over the network */ 228 #define VFCF_READONLY 0x00000004 /* writes are not implemented */ 229 #define VFCF_SYNTHETIC 0x00000008 /* data does not represent real files */ 230 #define VFCF_LOOPBACK 0x00000010 /* aliases some other mounted FS */ 231 #define VFCF_UNICODE 0x00000020 /* stores file names as Unicode*/ 232 233 /* 234 * Operations supported on mounted file system. 176 * Operations supported on mounted filesystem. 235 177 */ 236 178 #ifdef _KERNEL … … 281 223 #define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP) 282 224 283 #ifdef VFS_LKM284 #include <sys/conf.h>285 #include <sys/exec.h>286 #include <sys/sysent.h>287 #include <sys/lkm.h>288 289 #define VFS_SET(vfsops, fsname, index, flags) \290 static struct vfsconf _fs_vfsconf = { \291 &vfsops, \292 #fsname, \293 index, \294 0, \295 flags \296 }; \297 extern struct linker_set MODVNOPS; \298 MOD_VFS(#fsname,index,&MODVNOPS,&_fs_vfsconf); \299 int \300 fsname ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \301 DISPATCH(lkmtp, cmd, ver, lkm_nullcmd, lkm_nullcmd, lkm_nullcmd); }302 #else303 304 #define VFS_SET(vfsops, fsname, index, flags) \305 static struct vfsconf _fs_vfsconf = { \306 &vfsops, \307 #fsname, \308 index, \309 0, \310 flags | VFCF_STATIC \311 }; \312 DATA_SET(vfs_set,_fs_vfsconf)313 #endif /* VFS_LKM */314 315 225 #endif /* _KERNEL */ 316 226 … … 327 237 */ 328 238 struct fhandle { 329 fsid_t fh_fsid; /* File 330 struct fid fh_fid; /* File 239 fsid_t fh_fsid; /* Filesystem id of mount point */ 240 struct fid fh_fid; /* Filesys specific id */ 331 241 }; 332 242 typedef struct fhandle fhandle_t; … … 366 276 int ex_masklen; /* and the smask length */ 367 277 }; 368 369 /*370 * Arguments to mount UFS-based filesystems371 */372 struct ufs_args {373 char *fspec; /* block special device to mount */374 struct export_args export; /* network export information */375 };376 377 #ifdef MFS378 /*379 * Arguments to mount MFS380 */381 struct mfs_args {382 char *fspec; /* name to export for statfs */383 struct export_args export; /* if exported MFSes are supported */384 caddr_t base; /* base of file system in memory */385 u_long size; /* size of file system */386 };387 #endif /* MFS */388 389 #ifdef MSDOSFS390 /*391 * Arguments to mount MSDOS filesystems.392 */393 struct msdosfs_args {394 char *fspec; /* blocks special holding the fs to mount */395 struct export_args export; /* network export information */396 uid_t uid; /* uid that owns msdosfs files */397 gid_t gid; /* gid that owns msdosfs files */398 mode_t mask; /* mask to be applied for msdosfs perms */399 };400 #endif401 402 #ifdef CD9660403 /*404 * Arguments to mount ISO 9660 filesystems.405 */406 struct iso_args {407 char *fspec; /* block special device to mount */408 struct export_args export; /* network export info */409 int flags; /* mounting flags, see below */410 int ssector; /* starting sector */411 412 };413 #define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/414 #define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */415 #define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */416 #endif /* CD9660 */417 278 418 279 #ifdef _KERNEL
Note: See TracChangeset
for help on using the changeset viewer.