genfth.cf revision 1.1.4.2 1 1.1.4.2 bouyer # $NetBSD: genfth.cf,v 1.1.4.2 2000/11/20 20:35:40 bouyer Exp $
2 1.1.4.2 bouyer
3 1.1.4.2 bouyer #
4 1.1.4.2 bouyer # Copyright (c) 1997 The NetBSD Foundation, Inc.
5 1.1.4.2 bouyer # All rights reserved.
6 1.1.4.2 bouyer #
7 1.1.4.2 bouyer # This code is derived from software contributed to The NetBSD Foundation
8 1.1.4.2 bouyer # by Christos Zoulas.
9 1.1.4.2 bouyer #
10 1.1.4.2 bouyer # Redistribution and use in source and binary forms, with or without
11 1.1.4.2 bouyer # modification, are permitted provided that the following conditions
12 1.1.4.2 bouyer # are met:
13 1.1.4.2 bouyer # 1. Redistributions of source code must retain the above copyright
14 1.1.4.2 bouyer # notice, this list of conditions and the following disclaimer.
15 1.1.4.2 bouyer # 2. Redistributions in binary form must reproduce the above copyright
16 1.1.4.2 bouyer # notice, this list of conditions and the following disclaimer in the
17 1.1.4.2 bouyer # documentation and/or other materials provided with the distribution.
18 1.1.4.2 bouyer # 3. All advertising materials mentioning features or use of this software
19 1.1.4.2 bouyer # must display the following acknowledgement:
20 1.1.4.2 bouyer # This product includes software developed by the NetBSD
21 1.1.4.2 bouyer # Foundation, Inc. and its contributors.
22 1.1.4.2 bouyer # 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1.4.2 bouyer # contributors may be used to endorse or promote products derived
24 1.1.4.2 bouyer # from this software without specific prior written permission.
25 1.1.4.2 bouyer #
26 1.1.4.2 bouyer # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1.4.2 bouyer # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1.4.2 bouyer # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1.4.2 bouyer # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1.4.2 bouyer # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1.4.2 bouyer # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1.4.2 bouyer # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1.4.2 bouyer # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1.4.2 bouyer # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1.4.2 bouyer # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1.4.2 bouyer # POSSIBILITY OF SUCH DAMAGE.
37 1.1.4.2 bouyer #
38 1.1.4.2 bouyer # Copyright (c) 1992, 1993
39 1.1.4.2 bouyer # The Regents of the University of California. All rights reserved.
40 1.1.4.2 bouyer #
41 1.1.4.2 bouyer # This software was developed by the Computer Systems Engineering group
42 1.1.4.2 bouyer # at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
43 1.1.4.2 bouyer # contributed to Berkeley.
44 1.1.4.2 bouyer #
45 1.1.4.2 bouyer # All advertising materials mentioning features or use of this software
46 1.1.4.2 bouyer # must display the following acknowledgement:
47 1.1.4.2 bouyer # This product includes software developed by the University of
48 1.1.4.2 bouyer # California, Lawrence Berkeley Laboratory.
49 1.1.4.2 bouyer #
50 1.1.4.2 bouyer # Redistribution and use in source and binary forms, with or without
51 1.1.4.2 bouyer # modification, are permitted provided that the following conditions
52 1.1.4.2 bouyer # are met:
53 1.1.4.2 bouyer # 1. Redistributions of source code must retain the above copyright
54 1.1.4.2 bouyer # notice, this list of conditions and the following disclaimer.
55 1.1.4.2 bouyer # 2. Redistributions in binary form must reproduce the above copyright
56 1.1.4.2 bouyer # notice, this list of conditions and the following disclaimer in the
57 1.1.4.2 bouyer # documentation and/or other materials provided with the distribution.
58 1.1.4.2 bouyer # 3. All advertising materials mentioning features or use of this software
59 1.1.4.2 bouyer # must display the following acknowledgement:
60 1.1.4.2 bouyer # This product includes software developed by the University of
61 1.1.4.2 bouyer # California, Berkeley and its contributors.
62 1.1.4.2 bouyer # 4. Neither the name of the University nor the names of its contributors
63 1.1.4.2 bouyer # may be used to endorse or promote products derived from this software
64 1.1.4.2 bouyer # without specific prior written permission.
65 1.1.4.2 bouyer #
66 1.1.4.2 bouyer # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
67 1.1.4.2 bouyer # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
68 1.1.4.2 bouyer # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
69 1.1.4.2 bouyer # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
70 1.1.4.2 bouyer # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
71 1.1.4.2 bouyer # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
72 1.1.4.2 bouyer # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
73 1.1.4.2 bouyer # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
74 1.1.4.2 bouyer # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
75 1.1.4.2 bouyer # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 1.1.4.2 bouyer # SUCH DAMAGE.
77 1.1.4.2 bouyer #
78 1.1.4.2 bouyer # @(#)genassym.c 8.1 (Berkeley) 6/11/93
79 1.1.4.2 bouyer #
80 1.1.4.2 bouyer
81 1.1.4.2 bouyer include <sys/param.h>
82 1.1.4.2 bouyer include <sys/time.h>
83 1.1.4.2 bouyer include <ufs/ufs/dinode.h>
84 1.1.4.2 bouyer include <ufs/ufs/dir.h>
85 1.1.4.2 bouyer include <ufs/ffs/fs.h>
86 1.1.4.2 bouyer
87 1.1.4.2 bouyer #
88 1.1.4.2 bouyer # ufs sizing constants
89 1.1.4.2 bouyer #
90 1.1.4.2 bouyer define dev_bsize DEV_BSIZE
91 1.1.4.2 bouyer define maxbsize MAXBSIZE
92 1.1.4.2 bouyer define bbsize BBSIZE
93 1.1.4.2 bouyer define sbsize SBSIZE
94 1.1.4.2 bouyer define bboff BBOFF
95 1.1.4.2 bouyer define sboff SBOFF
96 1.1.4.2 bouyer define bblock BBLOCK
97 1.1.4.2 bouyer define sblock SBLOCK
98 1.1.4.2 bouyer
99 1.1.4.2 bouyer #
100 1.1.4.2 bouyer # ufs superblock
101 1.1.4.2 bouyer #
102 1.1.4.2 bouyer struct fs
103 1.1.4.2 bouyer member fs_magic
104 1.1.4.2 bouyer member fs_bsize
105 1.1.4.2 bouyer member fs_npsect
106 1.1.4.2 bouyer member fs_nsect
107 1.1.4.2 bouyer member fs_interleave
108 1.1.4.2 bouyer member fs_postblformat
109 1.1.4.2 bouyer member fs_nrpos
110 1.1.4.2 bouyer member fs_inodefmt
111 1.1.4.2 bouyer member fs_maxfilesize
112 1.1.4.2 bouyer member fs_qbmask
113 1.1.4.2 bouyer member fs_qfmask
114 1.1.4.2 bouyer member fs_bmask
115 1.1.4.2 bouyer member fs_fmask
116 1.1.4.2 bouyer member fs_ipg
117 1.1.4.2 bouyer member fs_fpg
118 1.1.4.2 bouyer member fs_inopb
119 1.1.4.2 bouyer member fs_fragshift
120 1.1.4.2 bouyer member fs_bshift
121 1.1.4.2 bouyer member fs_fshift
122 1.1.4.2 bouyer member fs_cgoffset
123 1.1.4.2 bouyer member fs_cgmask
124 1.1.4.2 bouyer member fs_dblkno
125 1.1.4.2 bouyer member fs_iblkno
126 1.1.4.2 bouyer member fs_sblkno
127 1.1.4.2 bouyer member fs_cblkno
128 1.1.4.2 bouyer member fs_fsbtodb
129 1.1.4.2 bouyer member fs_nindir
130 1.1.4.2 bouyer member fs_frag
131 1.1.4.2 bouyer member fs_maxsymlinklen
132 1.1.4.2 bouyer
133 1.1.4.2 bouyer #
134 1.1.4.2 bouyer # ufs dinode
135 1.1.4.2 bouyer #
136 1.1.4.2 bouyer struct dinode
137 1.1.4.2 bouyer member di_size
138 1.1.4.2 bouyer member di_mode
139 1.1.4.2 bouyer member di_db
140 1.1.4.2 bouyer member di_ib
141 1.1.4.2 bouyer member di_shortlink
142 1.1.4.2 bouyer
143 1.1.4.2 bouyer #
144 1.1.4.2 bouyer # ufs direct
145 1.1.4.2 bouyer #
146 1.1.4.2 bouyer struct direct
147 1.1.4.2 bouyer member d_ino
148 1.1.4.2 bouyer member d_reclen
149 1.1.4.2 bouyer #member d_type # notused
150 1.1.4.2 bouyer member d_namlen
151 1.1.4.2 bouyer member d_name
152 1.1.4.2 bouyer
153 1.1.4.2 bouyer define fs_magic_value FS_MAGIC
154 1.1.4.2 bouyer define fs_42postblfmt FS_42POSTBLFMT
155 1.1.4.2 bouyer define fs_44inodefmt FS_44INODEFMT
156 1.1.4.2 bouyer define ndaddr NDADDR
157 1.1.4.2 bouyer define niaddr NIADDR
158 1.1.4.2 bouyer define rootino ROOTINO
159 1.1.4.2 bouyer define ifmt IFMT
160 1.1.4.2 bouyer define ifdir IFDIR
161 1.1.4.2 bouyer define iflnk IFLNK