Deleted Added
full compact
makefs.h (214921) makefs.h (223306)
1/* $NetBSD: makefs.h,v 1.20 2008/12/28 21:51:46 christos Exp $ */
2
3/*
4 * Copyright (c) 2001 Wasabi Systems, Inc.
5 * All rights reserved.
6 *
7 * Written by Luke Mewburn for Wasabi Systems, Inc.
8 *

--- 20 unchanged lines hidden (view full) ---

29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
1/* $NetBSD: makefs.h,v 1.20 2008/12/28 21:51:46 christos Exp $ */
2
3/*
4 * Copyright (c) 2001 Wasabi Systems, Inc.
5 * All rights reserved.
6 *
7 * Written by Luke Mewburn for Wasabi Systems, Inc.
8 *

--- 20 unchanged lines hidden (view full) ---

29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * $FreeBSD: head/usr.sbin/makefs/makefs.h 214921 2010-11-07 16:05:04Z cognet $
37 * $FreeBSD: head/usr.sbin/makefs/makefs.h 223306 2011-06-19 18:34:49Z marcel $
38 */
39
40#ifndef _MAKEFS_H
41#define _MAKEFS_H
42
43#include <sys/stat.h>
44#include <err.h>
45

--- 42 unchanged lines hidden (view full) ---

88typedef struct _fsnode {
89 struct _fsnode *parent; /* parent (NULL if root) */
90 struct _fsnode *child; /* child (if type == S_IFDIR) */
91 struct _fsnode *next; /* next */
92 struct _fsnode *first; /* first node of current level (".") */
93 uint32_t type; /* type of entry */
94 fsinode *inode; /* actual inode data */
95 char *symlink; /* symlink target */
38 */
39
40#ifndef _MAKEFS_H
41#define _MAKEFS_H
42
43#include <sys/stat.h>
44#include <err.h>
45

--- 42 unchanged lines hidden (view full) ---

88typedef struct _fsnode {
89 struct _fsnode *parent; /* parent (NULL if root) */
90 struct _fsnode *child; /* child (if type == S_IFDIR) */
91 struct _fsnode *next; /* next */
92 struct _fsnode *first; /* first node of current level (".") */
93 uint32_t type; /* type of entry */
94 fsinode *inode; /* actual inode data */
95 char *symlink; /* symlink target */
96 char *contents; /* file to provide contents */
96 char *name; /* file name */
97 int flags; /* misc flags */
98} fsnode;
99
100#define FSNODE_F_HASSPEC 0x01 /* fsnode has a spec entry */
97 char *name; /* file name */
98 int flags; /* misc flags */
99} fsnode;
100
101#define FSNODE_F_HASSPEC 0x01 /* fsnode has a spec entry */
102#define FSNODE_F_OPTIONAL 0x02 /* fsnode is optional */
101
102/*
103 * fsinfo_t - contains various settings and parameters pertaining to
104 * the image, including current settings, global options, and fs
105 * specific options
106 */
107typedef struct {
108 /* current settings */

--- 33 unchanged lines hidden (view full) ---

142 int maximum; /* maximum for value */
143 const char *desc; /* option description */
144} option_t;
145
146
147void apply_specfile(const char *, const char *, fsnode *, int);
148void dump_fsnodes(const char *, fsnode *);
149const char * inode_type(mode_t);
103
104/*
105 * fsinfo_t - contains various settings and parameters pertaining to
106 * the image, including current settings, global options, and fs
107 * specific options
108 */
109typedef struct {
110 /* current settings */

--- 33 unchanged lines hidden (view full) ---

144 int maximum; /* maximum for value */
145 const char *desc; /* option description */
146} option_t;
147
148
149void apply_specfile(const char *, const char *, fsnode *, int);
150void dump_fsnodes(const char *, fsnode *);
151const char * inode_type(mode_t);
152fsnode * read_mtree(const char *, fsnode *);
150int set_option(option_t *, const char *, const char *);
151fsnode * walk_dir(const char *, fsnode *);
152void free_fsnodes(fsnode *);
153
154void ffs_prep_opts(fsinfo_t *);
155int ffs_parse_opts(const char *, fsinfo_t *);
156void ffs_cleanup_opts(fsinfo_t *);
157void ffs_makefs(const char *, const char *, fsnode *, fsinfo_t *);

--- 137 unchanged lines hidden ---
153int set_option(option_t *, const char *, const char *);
154fsnode * walk_dir(const char *, fsnode *);
155void free_fsnodes(fsnode *);
156
157void ffs_prep_opts(fsinfo_t *);
158int ffs_parse_opts(const char *, fsinfo_t *);
159void ffs_cleanup_opts(fsinfo_t *);
160void ffs_makefs(const char *, const char *, fsnode *, fsinfo_t *);

--- 137 unchanged lines hidden ---