fstab.h revision 1539
11539Srgrimes/* 21539Srgrimes * Copyright (c) 1980, 1993 31539Srgrimes * The Regents of the University of California. All rights reserved. 41539Srgrimes * 51539Srgrimes * Redistribution and use in source and binary forms, with or without 61539Srgrimes * modification, are permitted provided that the following conditions 71539Srgrimes * are met: 81539Srgrimes * 1. Redistributions of source code must retain the above copyright 91539Srgrimes * notice, this list of conditions and the following disclaimer. 101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111539Srgrimes * notice, this list of conditions and the following disclaimer in the 121539Srgrimes * documentation and/or other materials provided with the distribution. 131539Srgrimes * 3. All advertising materials mentioning features or use of this software 141539Srgrimes * must display the following acknowledgement: 151539Srgrimes * This product includes software developed by the University of 161539Srgrimes * California, Berkeley and its contributors. 171539Srgrimes * 4. Neither the name of the University nor the names of its contributors 181539Srgrimes * may be used to endorse or promote products derived from this software 191539Srgrimes * without specific prior written permission. 201539Srgrimes * 211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311539Srgrimes * SUCH DAMAGE. 321539Srgrimes * 331539Srgrimes * @(#)fstab.h 8.1 (Berkeley) 6/2/93 341539Srgrimes */ 351539Srgrimes 361539Srgrimes#ifndef _FSTAB_H_ 371539Srgrimes#define _FSTAB_H_ 381539Srgrimes 391539Srgrimes/* 401539Srgrimes * File system table, see fstab(5). 411539Srgrimes * 421539Srgrimes * Used by dump, mount, umount, swapon, fsck, df, ... 431539Srgrimes * 441539Srgrimes * For ufs fs_spec field is the block special name. Programs that want to 451539Srgrimes * use the character special name must create that name by prepending a 'r' 461539Srgrimes * after the right most slash. Quota files are always named "quotas", so 471539Srgrimes * if type is "rq", then use concatenation of fs_file and "quotas" to locate 481539Srgrimes * quota file. 491539Srgrimes */ 501539Srgrimes#define _PATH_FSTAB "/etc/fstab" 511539Srgrimes#define FSTAB "/etc/fstab" /* deprecated */ 521539Srgrimes 531539Srgrimes#define FSTAB_RW "rw" /* read/write device */ 541539Srgrimes#define FSTAB_RQ "rq" /* read/write with quotas */ 551539Srgrimes#define FSTAB_RO "ro" /* read-only device */ 561539Srgrimes#define FSTAB_SW "sw" /* swap device */ 571539Srgrimes#define FSTAB_XX "xx" /* ignore totally */ 581539Srgrimes 591539Srgrimesstruct fstab { 601539Srgrimes char *fs_spec; /* block special device name */ 611539Srgrimes char *fs_file; /* file system path prefix */ 621539Srgrimes char *fs_vfstype; /* File system type, ufs, nfs */ 631539Srgrimes char *fs_mntops; /* Mount options ala -o */ 641539Srgrimes char *fs_type; /* FSTAB_* from fs_mntops */ 651539Srgrimes int fs_freq; /* dump frequency, in days */ 661539Srgrimes int fs_passno; /* pass number on parallel dump */ 671539Srgrimes}; 681539Srgrimes 691539Srgrimes#include <sys/cdefs.h> 701539Srgrimes 711539Srgrimes__BEGIN_DECLS 721539Srgrimesstruct fstab *getfsent __P((void)); 731539Srgrimesstruct fstab *getfsspec __P((const char *)); 741539Srgrimesstruct fstab *getfsfile __P((const char *)); 751539Srgrimesint setfsent __P((void)); 761539Srgrimesvoid endfsent __P((void)); 771539Srgrimes__END_DECLS 781539Srgrimes 791539Srgrimes#endif /* !_FSTAB_H_ */ 80