vol-salvage: Move global vars into SalvInfo struct
[openafs.git] / src / vol / volinodes.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11         System:         VICE-TWO
12         Module:         volinodes.h
13         Institution:    The Information Technology Center, Carnegie-Mellon University
14
15  */
16
17 #ifndef __volinodes_h_
18 #define __volinodes_h_
19
20 /* Used by vutil.c and salvager.c */
21
22 private struct VolumeHeader tempHeader;
23
24 #ifdef AFS_NAMEI_ENV
25 #define NO_LINK_TABLE 0
26 #else
27 #define NO_LINK_TABLE 1
28 #endif
29 AFS_UNUSED
30 private struct stuff {
31     struct versionStamp stamp;
32     bit32 inodeType;
33     int size;                   /* size of any fixed size portion of the header */
34     Inode *inode;
35     char *description;
36     /* if this is 1, then this inode is obsolete--
37      * salvager may delete it, and shouldn't complain
38      * if it isn't there; create can not bother to create it */
39     int obsolete;
40 } stuff[] = {
41     { {
42     VOLUMEINFOMAGIC, VOLUMEINFOVERSION}, VI_VOLINFO, sizeof(VolumeDiskData),
43         &tempHeader.volumeInfo, "Volume information", 0}
44     , { {
45     SMALLINDEXMAGIC, SMALLINDEXVERSION}
46     , VI_SMALLINDEX, sizeof(struct versionStamp), &tempHeader.smallVnodeIndex,
47         "small inode index", 0}, { {
48     LARGEINDEXMAGIC, LARGEINDEXVERSION}, VI_LARGEINDEX,
49         sizeof(struct versionStamp), &tempHeader.largeVnodeIndex,
50         "large inode index", 0}, { {
51     ACLMAGIC, ACLVERSION}, VI_ACL, sizeof(struct versionStamp),
52         &tempHeader.volumeAcl, "access control list", 1}, { {
53     MOUNTMAGIC, MOUNTVERSION}, VI_MOUNTTABLE, sizeof(struct versionStamp),
54         &tempHeader.volumeMountTable, "mount table", 1}, { {
55 LINKTABLEMAGIC, LINKTABLEVERSION}, VI_LINKTABLE,
56         sizeof(struct versionStamp), &tempHeader.linkTable, "link table",
57         NO_LINK_TABLE},};
58 /* inodeType is redundant in the above table;  it used to be useful, but now
59    we require the table to be ordered */
60 #define MAXINODETYPE VI_LINKTABLE
61
62 #endif /* __volinodes_h_ */