2 * $Id: parse_mtab.h,v 1.5 2001-12-10 20:16:54 srittau Exp $
4 * header for afpd_mtab_parse, afpd_st_cnid
10 /* set this to 31 to reserve the high-order bit for distinguishing files and
12 #define AFPD_MTAB_DEV_AND_INODE_BITS 32
13 /* this gives us some stability when adding partitions. */
14 #define AFPD_MTAB_MIN_DEV_BITS 3
16 struct afpd_mtab_entry {
17 /* Description of one partition. */
18 int id; /* unique index (a small integer) */
19 int dev_major, dev_minor; /* device numbers */
20 int bit_value; /* preshifted device index field */
21 char *device; /* device name string (for debugging) */
22 char *mount_point; /* mounted directory (for debugging) */
25 struct afpd_mount_table {
26 /* Description of all partitions. */
27 int size; /* length of entries array, a power of 2 */
28 int bits; /* number of bits, log2(size) */
29 unsigned int shift; /* amount by which to shift into CNID device field */
30 struct afpd_mtab_entry **table; /* index -> entry map vector, some
31 entries may be null */
36 afpd_st_cnid __P((struct stat *st));
39 struct afpd_mount_table *
40 afpd_mtab_parse __P((char *file_name));
42 #endif /* not _parse_mtab_h */