xref: /freebsd/usr.sbin/makefs/ffs.h (revision 517e52b6c21ccff22c46df0dcd15c19baee3d86c)
1 /*	$NetBSD: ffs.h,v 1.2 2004/12/20 20:51:42 jmc Exp $	*/
2 
3 /*-
4  * SPDX-License-Identifier: BSD-4-Clause
5  *
6  * Copyright (c) 2001-2003 Wasabi Systems, Inc.
7  * All rights reserved.
8  *
9  * Written by Luke Mewburn for Wasabi Systems, Inc.
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  * 3. All advertising materials mentioning features or use of this software
20  *    must display the following acknowledgement:
21  *      This product includes software developed for the NetBSD Project by
22  *      Wasabi Systems, Inc.
23  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
24  *    or promote products derived from this software without specific prior
25  *    written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
28  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
31  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37  * POSSIBILITY OF SUCH DAMAGE.
38  *
39  * $FreeBSD$
40  */
41 
42 #ifndef _FFS_H
43 #define _FFS_H
44 
45 #include <ufs/ufs/dinode.h>
46 #include <ufs/ffs/fs.h>
47 #include <stdbool.h>
48 
49 typedef struct {
50 	char	label[MAXVOLLEN];	/* volume name/label */
51 	int	bsize;		/* block size */
52 	int	fsize;		/* fragment size */
53 	int	cpg;		/* cylinders per group */
54 	int	cpgflg;		/* cpg was specified by user */
55 	int	density;	/* bytes per inode */
56 	bool	min_inodes;	/* allocate minimum number of inodes */
57 	int	ntracks;	/* number of tracks */
58 	int	nsectors;	/* number of sectors */
59 	int	rpm;		/* rpm */
60 	int	minfree;	/* free space threshold */
61 	int	optimization;	/* optimization (space or time) */
62 	int	maxcontig;	/* max contiguous blocks to allocate */
63 	int	rotdelay;	/* rotational delay between blocks */
64 	int	maxbpg;		/* maximum blocks per file in a cyl group */
65 	int	nrpos;		/* # of distinguished rotational positions */
66 	int	avgfilesize;	/* expected average file size */
67 	int	avgfpdir;	/* expected # of files per directory */
68 	int	version;	/* filesystem version (1 = FFS, 2 = UFS2) */
69 	int	maxbsize;	/* maximum extent size */
70 	int	maxblkspercg;	/* max # of blocks per cylinder group */
71 	int	softupdates;	/* soft updates */
72 		/* XXX: support `old' file systems ? */
73 } ffs_opt_t;
74 
75 #endif /* _FFS_H */
76