1: /*
2: * Copyright (c) 1982, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)mount.h 7.2.5 (2.11BSD GTE) 1997/6/29
7: */
8:
9: /*
10: * file system statistics
11: */
12: #include <sys/fs.h>
13:
14: #define MNAMELEN 90 /* length of buffer for returned name */
15:
16: struct statfs {
17: short f_type; /* type of filesystem (see below) */
18: u_short f_flags; /* copy of mount flags */
19: short f_bsize; /* fundamental file system block size */
20: short f_iosize; /* optimal transfer block size */
21: daddr_t f_blocks; /* total data blocks in file system */
22: daddr_t f_bfree; /* free blocks in fs */
23: daddr_t f_bavail; /* free blocks avail to non-superuser */
24: ino_t f_files; /* total file nodes in file system */
25: ino_t f_ffree; /* free file nodes in fs */
26: long f_fsid[2]; /* file system id */
27: long f_spare[5]; /* spare for later */
28: char f_mntonname[MNAMELEN]; /* directory on which mounted */
29: char f_mntfromname[MNAMELEN];/* mounted filesystem */
30: };
31:
32: /*
33: * File system types. Since only UFS is supported the others are not
34: * specified at this time.
35: */
36: #define MOUNT_NONE 0
37: #define MOUNT_UFS 1 /* Fast Filesystem */
38: #define MOUNT_MAXTYPE 1
39:
40: #define INITMOUNTNAMES { \
41: "none", /* 0 MOUNT_NONE */ \
42: "ufs", /* 1 MOUNT_UFS */ \
43: 0, \
44: }
45:
46: /*
47: * Mount structure.
48: * One allocated on every mount.
49: * Used to find the super block.
50: */
51: struct mount
52: {
53: dev_t m_dev; /* device mounted */
54: struct fs m_filsys; /* superblock data */
55: #define m_flags m_filsys.fs_flags
56: struct inode *m_inodp; /* pointer to mounted on inode */
57: struct inode *m_qinod; /* QUOTA: pointer to quota file */
58: memaddr m_extern; /* click address of mount table extension */
59: };
60:
61: struct xmount
62: {
63: char xm_mntfrom[MNAMELEN]; /* /dev/xxxx mounted from */
64: char xm_mnton[MNAMELEN]; /* directory mounted on - this is the
65: * full(er) version of fs_fsmnt.
66: */
67: };
68:
69: #define XMOUNTDESC (((btoc(sizeof (struct xmount)) - 1) << 8) | RW)
70:
71: /*
72: * Mount flags.
73: */
74: #define MNT_RDONLY 0x0001 /* read only filesystem */
75: #define MNT_SYNCHRONOUS 0x0002 /* file system written synchronously */
76: #define MNT_NOEXEC 0x0004 /* can't exec from filesystem */
77: #define MNT_NOSUID 0x0008 /* don't honor setuid bits on fs */
78: #define MNT_NODEV 0x0010 /* don't interpret special files */
79: #define MNT_QUOTA 0x0020 /* quotas are enabled on filesystem */
80: #define MNT_ASYNC 0x0040 /* file system written asynchronously */
81: #define MNT_NOATIME 0x0080 /* don't update access times */
82:
83: /*
84: * Mask of flags that are visible to statfs().
85: */
86: #define MNT_VISFLAGMASK 0x0fff
87:
88: /*
89: * filesystem control flags. The high 4 bits are used for this. Since NFS
90: * support will never be a problem we can avoid making the flags into a 'long.
91: */
92: #define MNT_UPDATE 0x1000 /* not a real mount, just an update */
93:
94: /*
95: * Flags for various system call interfaces.
96: *
97: * These aren't used for anything in the system and are present only
98: * for source code compatibility reasons.
99: */
100: #define MNT_WAIT 1
101: #define MNT_NOWAIT 2
102:
103: #if defined(KERNEL) && !defined(SUPERVISOR)
104: struct mount mount[NMOUNT];
105: #endif
Defined variables
mount
defined in line
104; used 60 times
- in /usr/src/new/crash/crash.c line
904-918(7)
- in /usr/src/sbin/mount/mount_ufs.c line
88
- in /usr/src/sys/pdp/machdep2.c line
231
- in /usr/src/sys/sys/init_main.c line
195,
206-208(2)
- in /usr/src/sys/sys/quota_kern.c line
185,
253-258(3),
316,
463(2),
476,
490,
564(2),
729,
752
- in /usr/src/sys/sys/quota_subr.c line
40
- in /usr/src/sys/sys/quota_sys.c line
40(2),
405(2)
- in /usr/src/sys/sys/quota_ufs.c line
41(2),
72,
191
- in /usr/src/sys/sys/sys_inode.c line
470(2)
- in /usr/src/sys/sys/sys_pipe.c line
46-48(3)
- in /usr/src/sys/sys/ufs_fio.c line
193(2)
- in /usr/src/sys/sys/ufs_inode.c line
135(2)
- in /usr/src/sys/sys/ufs_mount.c line
203(2),
210(2),
277(2)
- in /usr/src/sys/sys/ufs_namei.c line
649(2)
- in /usr/src/sys/sys/ufs_subr.c line
35(2),
135(2),
169-171(3)
- in /usr/src/sys/sys/ufs_syscalls2.c line
101(2)
Defined struct's
mount
defined in line
51; used 100 times
- in line 104(2)
- in /usr/src/new/crash/crash.c line
193-194(4),
904-912(12)
- in /usr/src/new/crash/crashsubs.c line
449(2)
- in /usr/src/sys/CURLY/param.c line
71(2)
- in /usr/src/sys/GENERIC/param.c line
71(2)
- in /usr/src/sys/QT/param.c line
71(2)
- in /usr/src/sys/conf/param.c line
71(2)
- in /usr/src/sys/sys/quota_kern.c line
153(2),
285(2),
454(2),
490(2),
552(2),
580(2),
696(2),
749(2)
- in /usr/src/sys/sys/quota_sys.c line
33(2),
400(2)
- in /usr/src/sys/sys/quota_ufs.c line
35(2)
- in /usr/src/sys/sys/sys_inode.c line
451(2)
- in /usr/src/sys/sys/sys_pipe.c line
33(2)
- in /usr/src/sys/sys/ufs_fio.c line
191(2)
- in /usr/src/sys/sys/ufs_inode.c line
133(2)
- in /usr/src/sys/sys/ufs_mount.c line
40(2),
64-65(4),
143-148(6),
164(2),
269(2)
- in /usr/src/sys/sys/ufs_namei.c line
645(2)
- in /usr/src/sys/sys/ufs_subr.c line
28(2),
132(2),
165(2)
- in /usr/src/sys/sys/ufs_syscalls2.c line
29(2),
35(4),
49-54(6),
60(2),
94(2),
127(2)
statfs
defined in line
16; used 54 times
- in /usr/src/bin/df.c line
72(2),
141(2),
169(2),
231-232(4)
- in /usr/src/lib/libc/gen/getmntinfo.c line
47-50(4),
58-62(6)
- in /usr/src/libexec/acctd/acctd.c line
210(2)
- in /usr/src/sbin/mount/mount.c line
61(2),
94(2),
247(2),
362-366(4)
- in /usr/src/sbin/umount/umount.c line
210(2)
- in /usr/src/sys/sys/ufs_syscalls2.c line
24(2),
46(2),
61-64(6),
83(2),
90(2),
98(2),
109(2)
- in /usr/src/usr.sbin/quotaon/quotaon.c line
217(2)
xmount
defined in line
61; used 10 times
Defined macros
Usage of this include