ARC: Cache arc_c value during arc_evict()
[zfs.git] / lib / libspl / include / os / freebsd / sys / mnttab.h
blob514e1b67547a8067165b3ea21f2e03493b9db73c
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 https://opensource.org/licenses/CDDL-1.0.
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 */
25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
28 /* Copyright 2006 Ricardo Correia */
30 #ifndef _SYS_MNTTAB_H
31 #define _SYS_MNTTAB_H
33 #include <stdio.h>
34 #include <sys/types.h>
36 #ifdef MNTTAB
37 #undef MNTTAB
38 #endif /* MNTTAB */
40 #include <paths.h>
41 #include <sys/mount.h>
42 #define MNTTAB _PATH_DEVZERO
43 #define MS_NOMNTTAB 0x0
44 #define MS_RDONLY 0x1
45 #define umount2(p, f) unmount(p, f)
46 #define MNT_LINE_MAX 4108
48 #define MNT_TOOLONG 1 /* entry exceeds MNT_LINE_MAX */
49 #define MNT_TOOMANY 2 /* too many fields in line */
50 #define MNT_TOOFEW 3 /* too few fields in line */
52 struct mnttab {
53 char *mnt_special;
54 char *mnt_mountp;
55 char *mnt_fstype;
56 char *mnt_mntopts;
60 * NOTE: fields in extmnttab should match struct mnttab till new fields
61 * are encountered, this allows hasmntopt to work properly when its arg is
62 * a pointer to an extmnttab struct cast to a mnttab struct pointer.
65 struct extmnttab {
66 char *mnt_special;
67 char *mnt_mountp;
68 char *mnt_fstype;
69 char *mnt_mntopts;
70 uint_t mnt_major;
71 uint_t mnt_minor;
74 struct stat64;
75 struct statfs;
77 extern int getmntany(FILE *fp, struct mnttab *mp, struct mnttab *mpref);
78 extern int _sol_getmntent(FILE *fp, struct mnttab *mp);
79 extern int getextmntent(const char *path, struct extmnttab *entry,
80 struct stat64 *statbuf);
81 extern void statfs2mnttab(struct statfs *sfs, struct mnttab *mp);
82 extern char *hasmntopt(struct mnttab *mnt, const char *opt);
83 extern int getmntent(FILE *fp, struct mnttab *mp);
85 #endif