| 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.4 (Berkeley) %G% |
| 18 | */ |
| 19 | |
| 20 | /* |
| 21 | * File system table, see fstab (5) |
| 22 | * |
| 23 | * Used by dump, mount, umount, swapon, fsck, df, ... |
| 24 | * |
| 25 | * The fs_spec field is the block special name. Programs |
| 26 | * that want to use the character special name must create |
| 27 | * that name by prepending a 'r' after the right most slash. |
| 28 | * Quota files are always named "quotas", so if type is "rq", |
| 29 | * then use concatenation of fs_file and "quotas" to locate |
| 30 | * quota file. |
| 31 | */ |
| 32 | #define FSTAB "/etc/fstab" |
| 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_type; /* FSTAB_* */ |
| 44 | int fs_freq; /* dump frequency, in days */ |
| 45 | int fs_passno; /* pass number on parallel dump */ |
| 46 | }; |
| 47 | |
| 48 | struct fstab *getfsent(); |
| 49 | struct fstab *getfsspec(); |
| 50 | struct fstab *getfsfile(); |
| 51 | int setfsent(); |
| 52 | void endfsent(); |