]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/parse_mtab.h
Warning fixes.
[netatalk.git] / etc / afpd / parse_mtab.h
1 /*
2  * $Id: parse_mtab.h,v 1.5 2001-12-10 20:16:54 srittau Exp $
3  *
4  * header for afpd_mtab_parse, afpd_st_cnid
5  */
6
7 #ifndef _parse_mtab_h
8 #define _parse_mtab_h
9
10 /* set this to 31 to reserve the high-order bit for distinguishing files and
11    directories.  */
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
15
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) */
23 };
24
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 */
32 };
33
34 extern
35     unsigned int
36     afpd_st_cnid __P((struct stat *st));
37
38 extern
39     struct afpd_mount_table *
40                 afpd_mtab_parse __P((char *file_name));
41
42 #endif /* not _parse_mtab_h */