Coda Distributed File System
vicetab.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef VICETAB_INCLUDED
20#define VICETAB_INCLUDED
21
22#include <stdio.h>
23
24/* this file is used for parsing routines of /vice/vicetab, the file
25 * describing server partitions.
26 * Its structure is similar to fstab:
27 * we have space or tab separated fields:
28 * part_host hostname of server
29 * part_dir a pathname identifying the server directory or partition
30 * part_type the type of server partition found under part_dir
31 * a comma separated list of options of the form:
32 * opt1=value1,opt2=value2,....
33 *
34 * the semantics of the functions setpartent, getpartent, endpartent
35 * and addpartent are very similar to the corresponding mntent
36 * functions (see getmntent (3)).
37 * However, for increased sanity the structure is not exposed.
38 */
39
40#define VICETAB "/vice/vicetab"
41#define VICETAB_MAXSTR 256 /* max line length in VICETAB */
42
43/* supported types of server partitions */
44#define PTYPE_SIMPLE "simple"
45#define PTYPE_FTREE "ftree"
46
47typedef struct Partent_s *Partent;
48
51FILE *Partent_set(const char *file, const char *mode);
52int Partent_end(FILE *__filep);
53Partent Partent_get(FILE *filep);
54int Partent_add(FILE *__filep, Partent mnt);
55char *Partent_hasopt(Partent mnt, const char *opt);
56int Partent_intopt(Partent ent, const char *opt, int *value);
58char *Partent_dir(Partent p);
59char *Partent_type(Partent p);
60char *Partent_host(Partent p);
61Partent Partent_create(char *host, char *dir, char *type, char *opts);
62
63#endif /* _VICETAB_H_ */
FILE * file
Definition: dirtest.c:723
struct @31::@33 dir
void(* type)()
Definition: rp2main.c:424
@ f
Definition: rvm_private.h:416
Definition: vicetab.c:28
void Partent_free(Partent *f)
Definition: vicetab.c:41
struct Partent_s * Partent
Definition: vicetab.h:47
char * Partent_host(Partent p)
Definition: vicetab.c:185
Partent Partent_new()
Definition: vicetab.c:35
int Partent_end(FILE *__filep)
Definition: vicetab.c:52
Partent Partent_create(char *host, char *dir, char *type, char *opts)
Definition: vicetab.c:97
void Partent_print(Partent ent)
int Partent_add(FILE *__filep, Partent mnt)
Definition: vicetab.c:116
FILE * Partent_set(const char *file, const char *mode)
Definition: vicetab.c:47
char * Partent_type(Partent p)
Definition: vicetab.c:194
int Partent_intopt(Partent ent, const char *opt, int *value)
Definition: vicetab.c:74
char * Partent_hasopt(Partent mnt, const char *opt)
Definition: vicetab.c:63
char * Partent_dir(Partent p)
Definition: vicetab.c:203
Partent Partent_get(FILE *filep)
Definition: vicetab.c:133