1 /* @(#)restore.h	1.3 04/09/06 Copyright 2004 J. Schilling */
2 /*
3  *	Data structures used to map old to new inode numbers
4  *	when in incremental restore mode.
5  *
6  *	Copyright (c) 2004 J. Schilling
7  */
8 /*
9  * The contents of this file are subject to the terms of the
10  * Common Development and Distribution License, Version 1.0 only
11  * (the "License").  You may not use this file except in compliance
12  * with the License.
13  *
14  * See the file CDDL.Schily.txt in this distribution for details.
15  * A copy of the CDDL is also available via the Internet at
16  * http://www.opensource.org/licenses/cddl1.txt
17  *
18  * When distributing Covered Code, include this CDDL HEADER in each
19  * file and include the License file CDDL.Schily.txt from this distribution.
20  */
21 
22 #ifndef	_RESTORE_H
23 #define	_RESTORE_H
24 
25 /*
26  * Inode mapping from archive and /star-symtable
27  */
28 typedef struct imap imap_t;
29 
30 struct imap {
31 /* ? */	imap_t	*i_next;	/* Next in list			*/
32 	imap_t	*i_hnext;	/* Next in name hash list	*/
33 	imap_t	*i_honext;	/* Next in old inode hash list	*/
34 	imap_t	*i_hnnext;	/* Next in new inode hash list	*/
35 /* ? */	imap_t	*i_dnext;	/* Next Directory in cwd list	*/
36 	imap_t	*i_dparent;	/* Parent Directory		*/
37 	imap_t	*i_dir;		/* Directory content		*/
38 	imap_t	*i_dxnext;	/* Next entry in Directory cont	*/
39 	char	*i_name;	/* File name			*/
40 	int	i_hash;		/* File name hash value		*/
41 	ino_t	i_oino;		/* Old inode number		*/
42 	ino_t	i_nino;		/* New inode number		*/
43 	Int32_t	i_flags;	/* Flags (see below)		*/
44 };
45 
46 /*
47  * Flags for i_flags:
48  */
49 #define	I_DIR		0x01	/* This is a directory		*/
50 #define	I_NOARCHIVE	0x02	/* Name in archive, file is not	*/
51 #define	I_DID_RENAME	0x04	/* Entry (dir) has been renamed	*/
52 #define	I_DELETE	0x80	/* Entry has been deleted	*/
53 
54 #define	I_NO_INO	(ino_t)-1
55 
56 #endif	/* _RESTORE_H */
57