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