xref: /minix3/usr.sbin/makefs/chfs_makefs.h (revision 9f988b79349f9b89ecc822458c30ec8897558560)
1*9f988b79SJean-Baptiste Boric /*-
2*9f988b79SJean-Baptiste Boric  * Copyright (c) 2012 Department of Software Engineering,
3*9f988b79SJean-Baptiste Boric  *		      University of Szeged, Hungary
4*9f988b79SJean-Baptiste Boric  * Copyright (c) 2012 Tamas Toth <ttoth@inf.u-szeged.hu>
5*9f988b79SJean-Baptiste Boric  * All rights reserved.
6*9f988b79SJean-Baptiste Boric  *
7*9f988b79SJean-Baptiste Boric  * This code is derived from software contributed to The NetBSD Foundation
8*9f988b79SJean-Baptiste Boric  * by the Department of Software Engineering, University of Szeged, Hungary
9*9f988b79SJean-Baptiste Boric  *
10*9f988b79SJean-Baptiste Boric  * Redistribution and use in source and binary forms, with or without
11*9f988b79SJean-Baptiste Boric  * modification, are permitted provided that the following conditions
12*9f988b79SJean-Baptiste Boric  * are met:
13*9f988b79SJean-Baptiste Boric  * 1. Redistributions of source code must retain the above copyright
14*9f988b79SJean-Baptiste Boric  *    notice, this list of conditions and the following disclaimer.
15*9f988b79SJean-Baptiste Boric  * 2. Redistributions in binary form must reproduce the above copyright
16*9f988b79SJean-Baptiste Boric  *    notice, this list of conditions and the following disclaimer in the
17*9f988b79SJean-Baptiste Boric  *    documentation and/or other materials provided with the distribution.
18*9f988b79SJean-Baptiste Boric  *
19*9f988b79SJean-Baptiste Boric  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20*9f988b79SJean-Baptiste Boric  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21*9f988b79SJean-Baptiste Boric  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22*9f988b79SJean-Baptiste Boric  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23*9f988b79SJean-Baptiste Boric  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24*9f988b79SJean-Baptiste Boric  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25*9f988b79SJean-Baptiste Boric  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26*9f988b79SJean-Baptiste Boric  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27*9f988b79SJean-Baptiste Boric  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28*9f988b79SJean-Baptiste Boric  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29*9f988b79SJean-Baptiste Boric  * SUCH DAMAGE.
30*9f988b79SJean-Baptiste Boric  */
31*9f988b79SJean-Baptiste Boric 
32*9f988b79SJean-Baptiste Boric #ifndef _CHFS_MAKEFS_H
33*9f988b79SJean-Baptiste Boric #define _CHFS_MAKEFS_H
34*9f988b79SJean-Baptiste Boric 
35*9f988b79SJean-Baptiste Boric #define TYPE_NOR 0
36*9f988b79SJean-Baptiste Boric #define TYPE_NAND 1
37*9f988b79SJean-Baptiste Boric 
38*9f988b79SJean-Baptiste Boric #define DEFAULT_PAGESIZE 2048
39*9f988b79SJean-Baptiste Boric #define DEFAULT_ERASEBLOCK 131072
40*9f988b79SJean-Baptiste Boric #define DEFAULT_MEDIATYPE TYPE_NAND
41*9f988b79SJean-Baptiste Boric 
42*9f988b79SJean-Baptiste Boric typedef struct {
43*9f988b79SJean-Baptiste Boric 	int pagesize;		/* page size */
44*9f988b79SJean-Baptiste Boric 	int eraseblock;		/* eraseblock size */
45*9f988b79SJean-Baptiste Boric 	int mediatype;		/* type of the media, 0 (nor) or 1 (nand) */
46*9f988b79SJean-Baptiste Boric } chfs_opt_t;
47*9f988b79SJean-Baptiste Boric 
48*9f988b79SJean-Baptiste Boric #endif
49