mntopts.h revision 18007
11558Srgrimes/*- 21558Srgrimes * Copyright (c) 1994 31558Srgrimes * The Regents of the University of California. All rights reserved. 41558Srgrimes * 51558Srgrimes * Redistribution and use in source and binary forms, with or without 61558Srgrimes * modification, are permitted provided that the following conditions 71558Srgrimes * are met: 81558Srgrimes * 1. Redistributions of source code must retain the above copyright 91558Srgrimes * notice, this list of conditions and the following disclaimer. 101558Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111558Srgrimes * notice, this list of conditions and the following disclaimer in the 121558Srgrimes * documentation and/or other materials provided with the distribution. 131558Srgrimes * 3. All advertising materials mentioning features or use of this software 141558Srgrimes * must display the following acknowledgement: 151558Srgrimes * This product includes software developed by the University of 161558Srgrimes * California, Berkeley and its contributors. 171558Srgrimes * 4. Neither the name of the University nor the names of its contributors 181558Srgrimes * may be used to endorse or promote products derived from this software 191558Srgrimes * without specific prior written permission. 201558Srgrimes * 211558Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221558Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231558Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241558Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251558Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261558Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271558Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281558Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291558Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301558Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311558Srgrimes * SUCH DAMAGE. 321558Srgrimes * 331558Srgrimes * @(#)mntopts.h 8.3 (Berkeley) 3/27/94 341558Srgrimes */ 351558Srgrimes 361558Srgrimesstruct mntopt { 371558Srgrimes const char *m_option; /* option name */ 381558Srgrimes int m_inverse; /* if a negative option, eg "dev" */ 391558Srgrimes int m_flag; /* bit to set, eg. MNT_RDONLY */ 404065Swollman int m_altloc; /* zero if this is a real mount flag */ 411558Srgrimes}; 421558Srgrimes 431558Srgrimes/* User-visible MNT_ flags. */ 444065Swollman#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 } 4518007Sdg#define MOPT_NOATIME { "atime", 1, MNT_NOATIME, 0 } 4618007Sdg#define MOPT_NOAUTO { "auto", 1, 0, 0 } 474065Swollman#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 } 484065Swollman#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } 494065Swollman#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } 504065Swollman#define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY, 0 } 514065Swollman#define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS, 0 } 524065Swollman#define MOPT_UNION { "union", 0, MNT_UNION, 0 } 531558Srgrimes 543202Sache/* Skip this options without any action (needed for checkquota/quotaon) */ 554065Swollman#define MOPT_UQUOTA { "userquota", 0, 0, 0 } 564065Swollman#define MOPT_GQUOTA { "groupquota", 0, 0, 0 } 573202Sache 581558Srgrimes/* Control flags. */ 598487Sdg#define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } 604065Swollman#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 } 611558Srgrimes 621558Srgrimes/* Support for old-style "ro", "rw" flags. */ 634065Swollman#define MOPT_RO { "ro", 0, MNT_RDONLY, 0 } 644065Swollman#define MOPT_RW { "rw", 1, MNT_RDONLY, 0 } 651558Srgrimes 661558Srgrimes#define MOPT_FSTAB_COMPAT \ 671558Srgrimes MOPT_RO, \ 681558Srgrimes MOPT_RW 691558Srgrimes 701558Srgrimes/* Standard options which all mounts can understand. */ 711558Srgrimes#define MOPT_STDOPTS \ 721558Srgrimes MOPT_FSTAB_COMPAT, \ 7318007Sdg MOPT_NOATIME, \ 7410199Sjkh MOPT_NOAUTO, \ 751558Srgrimes MOPT_NODEV, \ 761558Srgrimes MOPT_NOEXEC, \ 771558Srgrimes MOPT_NOSUID, \ 781558Srgrimes MOPT_RDONLY, \ 791558Srgrimes MOPT_UNION 801558Srgrimes 814065Swollmanvoid getmntopts __P((const char *, const struct mntopt *, int *, int *)); 824065Swollmanextern int getmnt_silent; 83