"Fossies" - the Fresh Open Source Software Archive

Member "coda-6.9.5/coda-src/partition/vicetab.h" (23 May 2003, 2115 Bytes) of package /linux/misc/old/coda-6.9.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "vicetab.h" see the Fossies "Dox" file reference documentation.

    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 
    9 This  code  is  distributed "AS IS" without warranty of any kind under
   10 the terms of the GNU General Public Licence Version 2, as shown in the
   11 file  LICENSE.  The  technical and financial  contributors to Coda are
   12 listed 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 
   25 /* this file is used for parsing routines of /vice/vicetab, the file
   26  * describing server partitions.
   27  * Its structure is similar to fstab: 
   28  * we have  space or tab separated fields:
   29  *    part_host hostname of server
   30  *    part_dir a pathname identifying the server directory or partition
   31  *    part_type the type of server partition found under part_dir 
   32  *    a comma separated list of options of the form:
   33  *         opt1=value1,opt2=value2,....
   34  *
   35  * the semantics of the functions setpartent, getpartent, endpartent
   36  * and addpartent are very similar to the corresponding mntent
   37  * functions (see getmntent (3)).
   38  * However, for increased sanity the structure is not exposed.
   39  */
   40 
   41 #define VICETAB  "/vice/vicetab"
   42 #define VICETAB_MAXSTR  256    /* max line length in VICETAB */
   43 
   44 
   45 /* supported types of server partitions */
   46 #define PTYPE_SIMPLE     "simple"
   47 #define PTYPE_FTREE      "ftree"
   48 
   49 
   50 
   51 typedef struct Partent_s *Partent;
   52 
   53 Partent Partent_new();
   54 void Partent_free(Partent *f);
   55 FILE *Partent_set(const char *file, const char *mode);
   56 int Partent_end(FILE *__filep);
   57 Partent Partent_get(FILE *filep);
   58 int Partent_add(FILE *__filep, Partent mnt);
   59 char *Partent_hasopt(Partent mnt, const char *opt);
   60 int Partent_intopt(Partent ent, const char *opt, int *value);
   61 void Partent_print(Partent ent);
   62 char *Partent_dir(Partent p);
   63 char *Partent_type(Partent p);
   64 char *Partent_host(Partent p);
   65 Partent Partent_create(char *host, char *dir, char *type, char *opts);
   66 
   67 
   68 #endif /* _VICETAB_H_ */