1 /* 2 * Copyright (c) 1980 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)fstab.h 5.9 (Berkeley) 05/29/90 18 */ 19 20 /* 21 * File system table, see fstab(5). 22 * 23 * Used by dump, mount, umount, swapon, fsck, df, ... 24 * 25 * For ufs fs_spec field is the block special name. Programs that want to 26 * use the character special name must create that name by prepending a 'r' 27 * after the right most slash. Quota files are always named "quotas", so 28 * if type is "rq", then use concatenation of fs_file and "quotas" to locate 29 * quota file. 30 */ 31 #define _PATH_FSTAB "/etc/fstab" 32 #define FSTAB "/etc/fstab" /* deprecated */ 33 34 #define FSTAB_RW "rw" /* read/write device */ 35 #define FSTAB_RQ "rq" /* read/write with quotas */ 36 #define FSTAB_RO "ro" /* read-only device */ 37 #define FSTAB_SW "sw" /* swap device */ 38 #define FSTAB_XX "xx" /* ignore totally */ 39 40 struct fstab { 41 char *fs_spec; /* block special device name */ 42 char *fs_file; /* file system path prefix */ 43 char *fs_vfstype; /* File system type, ufs, nfs */ 44 char *fs_mntops; /* Mount options ala -o */ 45 char *fs_type; /* FSTAB_* from fs_mntops */ 46 int fs_freq; /* dump frequency, in days */ 47 int fs_passno; /* pass number on parallel dump */ 48 }; 49 50 #if __STDC__ || c_plusplus 51 extern struct fstab *getfsent(void); 52 extern struct fstab *getfsspec(const char *); 53 extern struct fstab *getfsfile(const char *); 54 extern int setfsent(void); 55 extern void endfsent(void); 56 #else 57 extern struct fstab *getfsent(); 58 extern struct fstab *getfsspec(); 59 extern struct fstab *getfsfile(); 60 extern int setfsent(); 61 extern void endfsent(); 62 #endif 63