File: dimntopt.h

package info (click to toggle)
di 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 856 kB
  • sloc: ansic: 9,271; sh: 5,090; perl: 1,749; awk: 463; makefile: 371
file content (160 lines) | stat: -rw-r--r-- 3,687 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
 * Copyright 2011-2018 Brad Lanam, Walnut Creek, CA
 * Copyright 2023-2025 Brad Lanam, Pleasant Hill, CA
 */

#ifndef INC_DIMNTOPT_H
#define INC_DIMNTOPT_H

#include "config.h"

#if _hdr_mntent \
  && ! defined (DI_INC_MNTENT)        /* Linux, kFreeBSD, HP-UX */
# define DI_INC_MNTENT 1
# include <mntent.h>                /* MNTOPT_... */
#endif
/* FreeBSD, OpenBSD, NetBSD, HP-UX, MacOS */
#if _sys_mount && ! defined (DI_INC_SYS_MOUNT)
# define DI_INC_SYS_MOUNT 1
# include <sys/mount.h>             /* MNT_...; M_... (hp-ux) */
#endif
#if _sys_mnttab                     /* SCO_SV, UnixWare */
# include <sys/mnttab.h>            /* required for mntent.h */
#endif
#if _sys_mntent                     /* Solaris, SCO_SV, UnixWare */
# include <sys/mntent.h>            /* MNTOPT_... */
#endif
#if _sys_fstypes                    /* NetBSD */
# include <sys/fstypes.h>
#endif
#if _sys_vmount                     /* AIX */
# include <sys/vmount.h>            /* MNT_... */
#endif
#if _hdr_mnttab                     /* SysV.3 */
# include <mnttab.h>
#endif

# if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
# endif

/********************************************************/

    /* remap mount flags */
#if defined (B_FS_IS_READONLY)
# define MNT_RDONLY B_FS_IS_READONLY
#endif
#if defined (FS_IS_READONLY)
# define MNT_RDONLY FS_IS_READONLY
#endif
#if defined (M_RDONLY)
# define MNT_RDONLY M_RDONLY
#endif
#if defined (MNT_READONLY)
# define MNT_RDONLY MNT_READONLY
#endif
#if defined (M_RONLY)
# define MNT_RDONLY M_RONLY
#endif
#if defined (M_SYNCHRONOUS)
# define MNT_SYNCHRONOUS M_SYNCHRONOUS
#endif
#if defined (M_NOEXEC)
# define MNT_NOEXEC M_NOEXEC
#endif
#if defined (M_NOSUID)
# define MNT_NOSUID M_NOSUID
#endif
#if defined (M_NODEV)
# define MNT_NODEV M_NODEV
#endif
#if defined (M_NOATIMES)
# define MNT_NOATIMES M_NOATIMES
#endif
#if defined (M_GRPID)
# define MNT_GRPID M_GRPID
#endif
#if defined (M_SECURE)
# define MNT_SECURE M_SECURE
#endif
#if defined (M_MLSD)
# define MNT_MLSD M_MLSD
#endif
#if defined (M_SMSYNC2)
# define MNT_SMSYNC2 M_SMSYNC2
#endif
#if defined (M_LOCAL)
# define MNT_LOCAL M_LOCAL
#endif
#if defined (M_FORCE)
# define MNT_FORCE M_FORCE
#endif
#if defined (M_SYNC)
# define MNT_SYNC M_SYNC
#endif
#if defined (M_NOCACHE)
# define MNT_NOCACHE M_NOCACHE
#endif
#if defined (B_FS_IS_REMOVABLE)
# define MNT_REMOVABLE B_FS_IS_REMOVABLE
#endif
#if defined (FS_IS_REMOVABLE)
# define MNT_REMOVABLE FS_IS_REMOVABLE
#endif
#if defined (B_FS_IS_PERSISTENT)
# define MNT_PERSISTENT B_FS_IS_PERSISTENT
#endif
#if defined (FS_IS_PERSISTENT)
# define MNT_PERSISTENT FS_IS_PERSISTENT
#endif
#if defined (B_FS_IS_SHARED)
# define MNT_SHARED B_FS_IS_SHARED
#endif
#if defined (FS_IS_SHARED)
# define MNT_SHARED FS_IS_SHARED
#endif
#if defined (FS_IS_BLOCKBASED)
# define MNT_BLOCKBASED FS_IS_BLOCKBASED
#endif
#if defined (B_FS_HAS_MIME)
# define MNT_HAS_MIME B_FS_HAS_MIME
#endif
#if defined (FS_HAS_MIME)
# define MNT_HAS_MIME FS_HAS_MIME
#endif
#if defined (B_FS_HAS_ATTR)
# define MNT_HAS_ATTR B_FS_HAS_ATTR
#endif
#if defined (FS_HAS_ATTR)
# define MNT_HAS_ATTR FS_HAS_ATTR
#endif
#if defined (B_FS_HAS_QUERY)
# define MNT_HAS_QUERY B_FS_HAS_QUERY
#endif
#if defined (FS_HAS_QUERY)
# define MNT_HAS_QUERY FS_HAS_QUERY
#endif

#if defined (MNTOPT_IGNORE)
# define DI_MNTOPT_IGNORE MNTOPT_IGNORE
#else
# define DI_MNTOPT_IGNORE "ignore"
#endif

#if defined (MNTOPT_RO)
# define DI_MNTOPT_RO MNTOPT_RO
#else
# define DI_MNTOPT_RO "ro"
#endif

#if defined (MNTOPT_DEV)
# define DI_MNTOPT_DEV MNTOPT_DEV
#else
# define DI_MNTOPT_DEV "dev="
#endif

# if defined (__cplusplus) || defined (c_plusplus)
}
# endif

#endif /* INC_DIMNTOPT_H */