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