2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #ifndef AFS_VOL_INFO_H
11 #define AFS_VOL_INFO_H
13 #include <afs/afsint.h>
15 /* scanVolType flags */
16 #define SCAN_RW 0x01 /**< scan read-write volumes vnodes */
17 #define SCAN_RO 0x02 /**< scan read-only volume vnodes */
18 #define SCAN_BK 0x04 /**< scan backup volume vnodes */
20 /* findVnType flags */
21 #define FIND_FILE 0x01 /**< find regular files */
22 #define FIND_DIR 0x02 /**< find directories */
23 #define FIND_MOUNT 0x04 /**< find afs mount points */
24 #define FIND_SYMLINK 0x08 /**< find symlinks */
25 #define FIND_ACL 0x10 /**< find access entiries */
29 int checkout
; /**< Use FSSYNC to checkout volumes from the fileserver. */
30 int dumpInfo
; /**< Dump volume information */
31 int dumpHeader
; /**< Dump volume header files info */
32 int dumpVnodes
; /**< Dump vnode info */
33 int dumpInodeNumber
; /**< Dump inode numbers with vnodes */
34 int dumpDate
; /**< Dump vnode date (server modify date) with vnode */
35 int dumpInodeTimes
; /**< Dump some of the dates associated with inodes */
36 int dumpFileNames
; /**< Dump vnode and special file name filenames */
37 int showOrphaned
; /**< Show "orphaned" vnodes (vnodes with parent of 0) */
38 int showSizes
; /**< Show volume size summary */
39 int saveInodes
; /**< Save vnode data to files */
40 int fixHeader
; /**< Repair header files magic and version fields. */
41 char hostname
[64]; /**< This hostname, for volscan output. */
42 char columnDelim
[16]; /**< Column delimiter char(s) */
43 char printHeading
; /**< Print column heading */
44 int checkMagic
; /**< Check directory vnode magic when looking up paths */
45 unsigned int modeMask
[64]; /**< unix mode bit pattern for searching for specific modes */
46 int scanVolType
; /**< volume types to scan; zero means do not check */
47 int findVnType
; /**< types of objects to find */
52 * volscan output columns
54 #define VOLSCAN_COLUMNS \
92 int volinfo_Init(const char *name
);
93 int volinfo_Options(struct VolInfoOpt
**optp
);
94 void volinfo_AddVnodeToSizeTotals(struct VolInfoOpt
*opt
, struct VnodeDetails
*vdp
);
95 void volinfo_SaveInode(struct VolInfoOpt
*opt
, struct VnodeDetails
*vdp
);
96 void volinfo_PrintVnode(struct VolInfoOpt
*opt
, struct VnodeDetails
*vdp
);
97 void volinfo_PrintVnodeDetails(struct VolInfoOpt
*opt
, struct VnodeDetails
*vdp
);
98 void volinfo_ScanAcl(struct VolInfoOpt
*opt
, struct VnodeDetails
*vdp
);
99 void volinfo_AddVnodeHandler(int vnodeClass
,
100 void (*proc
) (struct VolInfoOpt
* opt
,
101 struct VnodeDetails
* vdp
),
102 const char *heading
);
103 int volinfo_AddOutputColumn(char *name
);
104 int volinfo_ScanPartitions(struct VolInfoOpt
*opt
, char *partNameOrId
, VolumeId volumeId
);
106 #endif /* AFS_VOL_INFO_H */