mkimg.h revision 263382
1263382Smarcel/*-
2263382Smarcel * Copyright (c) 2014 Juniper Networks, Inc.
3263382Smarcel * All rights reserved.
4263382Smarcel *
5263382Smarcel * Redistribution and use in source and binary forms, with or without
6263382Smarcel * modification, are permitted provided that the following conditions
7263382Smarcel * are met:
8263382Smarcel * 1. Redistributions of source code must retain the above copyright
9263382Smarcel *    notice, this list of conditions and the following disclaimer.
10263382Smarcel * 2. Redistributions in binary form must reproduce the above copyright
11263382Smarcel *    notice, this list of conditions and the following disclaimer in the
12263382Smarcel *    documentation and/or other materials provided with the distribution.
13263382Smarcel *
14263382Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15263382Smarcel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16263382Smarcel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17263382Smarcel * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18263382Smarcel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19263382Smarcel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20263382Smarcel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21263382Smarcel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22263382Smarcel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23263382Smarcel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24263382Smarcel * SUCH DAMAGE.
25263382Smarcel *
26263382Smarcel * $FreeBSD: user/marcel/mkimg/mkimg.h 263382 2014-03-19 21:44:51Z marcel $
27263382Smarcel */
28263382Smarcel
29263382Smarcel#ifndef _MKIMG_MKIMG_H_
30263382Smarcel#define	_MKIMG_MKIMG_H_
31263382Smarcel
32263382Smarcelstruct part {
33263382Smarcel	STAILQ_ENTRY(part) link;
34263382Smarcel	char	*type;		/* Partition type. */
35263382Smarcel	char	*contents;	/* Contents/size specification. */
36263382Smarcel	u_int	kind;		/* Content kind. */
37263382Smarcel#define	PART_UNDEF	0
38263382Smarcel#define	PART_KIND_FILE	1
39263382Smarcel#define	PART_KIND_PIPE	2
40263382Smarcel#define	PART_KIND_SIZE	3
41263382Smarcel	u_int	index;		/* Partition index (0-based). */
42263382Smarcel	off_t	offset;		/* Byte-offset of partition in image. */
43263382Smarcel	off_t	size;		/* Size in bytes of partition. */
44263382Smarcel};
45263382Smarcel
46263382Smarcelextern STAILQ_HEAD(partlisthead, part) partlist;
47263382Smarcelextern u_int nparts;
48263382Smarcel
49263382Smarcel#endif /* _MKIMG_MKIMG_H_ */
50