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