xref: /freebsd/usr.sbin/makefs/ffs.h (revision ca57a343e86ed3015596db68bda17518ad45436a)
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 
40 #ifndef _FFS_H
41 #define _FFS_H
42 
43 #include <ufs/ufs/dinode.h>
44 #include <ufs/ffs/fs.h>
45 #include <stdbool.h>
46 
47 typedef struct {
48 	char	label[MAXVOLLEN];	/* volume name/label */
49 	int	bsize;		/* block size */
50 	int	fsize;		/* fragment size */
51 	int	cpg;		/* cylinders per group */
52 	int	cpgflg;		/* cpg was specified by user */
53 	int	density;	/* bytes per inode */
54 	bool	min_inodes;	/* allocate minimum number of inodes */
55 	int	ntracks;	/* number of tracks */
56 	int	nsectors;	/* number of sectors */
57 	int	rpm;		/* rpm */
58 	int	minfree;	/* free space threshold */
59 	int	optimization;	/* optimization (space or time) */
60 	int	maxcontig;	/* max contiguous blocks to allocate */
61 	int	rotdelay;	/* rotational delay between blocks */
62 	int	maxbpg;		/* maximum blocks per file in a cyl group */
63 	int	nrpos;		/* # of distinguished rotational positions */
64 	int	avgfilesize;	/* expected average file size */
65 	int	avgfpdir;	/* expected # of files per directory */
66 	int	version;	/* filesystem version (1 = FFS, 2 = UFS2) */
67 	int	maxbsize;	/* maximum extent size */
68 	int	maxblkspercg;	/* max # of blocks per cylinder group */
69 	int	softupdates;	/* soft updates */
70 		/* XXX: support `old' file systems ? */
71 } ffs_opt_t;
72 
73 #endif /* _FFS_H */
74