pseudo.h revision 00d08177d2d5d1b8a5ea3f56459006ba9501335e
1/*
2 * Create a squashfs filesystem.  This is a highly compressed read only filesystem.
3 *
4 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5 * Phillip Lougher <phillip@lougher.demon.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2,
10 * or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 *
21 * pseudo.h
22 */
23struct pseudo_dev {
24	char		type;
25	unsigned int	mode;
26	unsigned int	uid;
27	unsigned int	gid;
28	unsigned int	major;
29	unsigned int	minor;
30#ifdef USE_TMP_FILE
31	char		*filename;
32#else
33	int		fd;
34#endif
35};
36
37struct pseudo_entry {
38	char			*name;
39	char			*pathname;
40	struct pseudo		*pseudo;
41	struct pseudo_dev	*dev;
42};
43
44struct pseudo {
45	int			names;
46	int			count;
47	struct pseudo_entry	*name;
48};
49
50struct pseudo_file {
51	char			*filename;
52	struct pseudo_file	*next;
53};
54
55extern int read_pseudo_def(struct pseudo **, char *);
56extern int read_pseudo_file(struct pseudo **, char *);
57extern struct pseudo *pseudo_subdir(char *, struct pseudo *);
58extern struct pseudo_entry *pseudo_readdir(struct pseudo *);
59