Merge commit '7e3488dc6cdcb0c04e1ce167a1a3bfef83b5f2e0'
[unleashed.git] / include / sys / mount.h
blob46d023e0b8ec67b0f47b7e12f12c108472a52dc8
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
27 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29 * Copyright (c) 1996, 1999 by Sun Microsystems, Inc.
30 * All rights reserved.
33 #ifndef _SYS_MOUNT_H
34 #define _SYS_MOUNT_H
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
41 * Flag bits passed to mount(2).
43 #define MS_RDONLY 0x0001 /* Read-only */
44 #define MS_FSS 0x0002 /* Old (4-argument) mount (compatibility) */
45 #define MS_DATA 0x0004 /* 6-argument mount */
46 #define MS_NOSUID 0x0010 /* Setuid programs disallowed */
47 #define MS_REMOUNT 0x0020 /* Remount */
48 #define MS_NOTRUNC 0x0040 /* Return ENAMETOOLONG for long filenames */
49 #define MS_OVERLAY 0x0080 /* Allow overlay mounts */
50 #define MS_OPTIONSTR 0x0100 /* Data is a an in/out option string */
51 #define MS_FORCE 0x0400 /* Forced unmount */
52 #define MS_NOMNTTAB 0x0800 /* Don't show mount in mnttab */
54 * Additional flag bits that domount() is prepared to interpret, but that
55 * can't be passed through mount(2).
57 #define MS_SYSSPACE 0x0008 /* Mounta already in kernel space */
58 #define MS_NOSPLICE 0x1000 /* Don't splice fs instance into name space */
59 #define MS_NOCHECK 0x2000 /* Clustering: suppress mount busy checks */
61 * Mask to sift out flag bits allowable from mount(2).
63 #define MS_MASK \
64 (MS_RDONLY|MS_FSS|MS_DATA|MS_NOSUID|MS_REMOUNT|MS_NOTRUNC|MS_OVERLAY|\
65 MS_OPTIONSTR|MS_NOMNTTAB)
68 * Mask to sift out flag bits allowable from umount2(2).
71 #define MS_UMOUNT_MASK (MS_FORCE)
74 * Maximum option string length accepted or returned by mount(2).
76 #define MAX_MNTOPT_STR 1024 /* max length of mount options string */
78 #if !defined(_KERNEL)
79 int mount(const char *, const char *, int, ...);
80 int umount(const char *);
81 int umount2(const char *, int);
82 #endif
84 #ifdef __cplusplus
86 #endif
88 #endif /* _SYS_MOUNT_H */