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