File: mount.2

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (211 lines) | stat: -rw-r--r-- 6,752 bytes parent folder | download
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 1993 Rickard E. Faith <faith@cs.unc.edu>
.\" Copyright (C) 1994 Andries E. Brouwer <aeb@cwi.nl>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\" "
.\" Modified Mon Nov  4 20:23:39 1996 by Eric S. Raymond <esr@thyrsus.com
.\" Modified 13 Oct 2001 by Michael Kerrisk <mtk16@ext.canterbury.ac.nz>
.\"	Added note on historical behaviour of MS_NOSUID
.\"
.\"
.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
.\"         all rights reserved.
.\" Translated Thu Jun 26 21:03:11 JST 1997
.\"         by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
.\" Updated Sun May 20 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\" Updated Mon Jun 25 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\" Updated Mon Oct 15 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\" Updated Thu Jan  1 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
.\"
.\"WORD:	Linux-specific		Linux ͭ
.\"
.TH MOUNT 2 2001-12-20 "Linux 2.5" "Linux Programmer's Manual"
.SH ̾
mount, umount \- ե륷ƥޥ/ޥȤ
.SH 
.B "#include <sys/mount.h>"
.sp
.BI "int mount(const char *" source ", const char *" target
.BI ", const char *" filesystemtype ", unsigned long " mountflags
.BI ", const void *" data );
.sp
.BI "int umount(const char *" target );
.SH 
.B mount

.I source
ǻꤵ줿ե륷ƥ(ǥХ̾Ǥ뤳Ȥ¿
ǥ쥯ȥ̾ߡξ⤢)
.I target
ǻꤵ줿ǥ쥯ȥ˷ӤĤ롣

.B umount

.I target
ǻꤵ줿˷ӤĤƤ(Ǿ̤)ե륷ƥ򳰤

ե륷ƥΥޥ/ޥȤǤΤϥѡ桼
Ǥ롣


.IR filesystemtype
 /proc/filesystems ˤƤͤΰ(㤨 "minix",
"ext2", "msdos", "proc", "nfs", "iso9660" )ꤹ롣


.I mountflags
Ƭ 16 ӥåȤޥåʥС 0xC0ED ǤꡢĤ 16 ӥåȤ
ޥȥե饰 (libc4  libc5 Ǥ <linux/fs.h> ǡglibc2 Ǥ
<sys/mount.h> ǰʲΤ褦Ƥ) Ǥ롣
.nf
#define MS_RDONLY        1 /* mount read-only */
#define MS_NOSUID        2 /* ignore suid and sgid bits */
#define MS_NODEV         4 /* no access to device special files */
#define MS_NOEXEC        8 /* no program execution */
#define MS_SYNCHRONOUS  16 /* writes are synced at once */
#define MS_REMOUNT      32 /* alter flags of a mounted fs */
#define MS_MANDLOCK     64 /* allow mandatory locks */
#define MS_NOATIME    1024 /* do not update access times */
#define MS_NODIRATIME 2048 /* do not update dir access times */
#define MS_BIND       4096 /* bind subtree elsewhere */
#define MS_MOVE       8192 /* atomically move subtree */
.fi


.IR data
̤Υե륷ƥˤäƲᤵ롣

.SH ֤
 0 ֤롣Ԥ \-1 ֤ꡢ
.I errno
顼Ƥ˽äꤵ롣
.SH 顼
顼ͤϥե륷ƥॿפ˰¸ưʲ˼褦ˤʤ롣
줾Υե륷ƥॿפˤϸͭΥ顼¸ߤ礬ꡢ
ޤȼư򤹤뤳Ȥ⤢롣ܤϥͥΥ򸫤ߤ
.TP
.B EPERM
¹ԼԤѡ桼ǤϤʤ
.TP
.B ENODEV
.I filesystemtype
ͥ (config) Ƥʤ
.TP
.B ENOTBLK
.I source
֥åǥХǤϤʤ(ǥХ׵ᤵƤ)
.TP
.B EBUSY
.I source
ϴ˥ޥȤƤ롣
ޤϴ˥ե뤬񤭹Ѥ˳Ƥꡢ
ɤ߹Ѥ˺ƥޥȤ뤳ȤǤʤ
ޤ
.I target
˻ȤƤ(륿Ǥäꡢ̤ΥǥХ
ޥȥݥȤǤäꡢץ󤵤줿եǤä....)
.I target
ˤϥޥȤǤʤ
.TP
.B EINVAL
.I source
Υѡ֥åǤ롣ޤ
.I source

.I target
ФƥޥȤƤʤΤ˺ƥޥȤ׵ᤵ줿
ޤ
.I source
ޥȥݥȤǤϤʤ뤤'/'ʤΤ˰ư׵ᤵ줿
ޤ
.I target
ޥȥݥȤǤϤʤΤ˥ޥȤ׵ᤵ줿
.TP
.B ENOTDIR
2 ܤΰ⤷ 1 ܤΰƬǥ쥯ȥǤϤʤ
.TP
.B EFAULT
򼨤ΤҤȤĤ桼Υɥ쥹֤γؤƤ롣
.TP
.B ENOMEM
ͥ뤬ե̾ǡ򥳥ԡ뤿ζڡݤǤʤ
.TP
.B ENAMETOOLONG
ѥ̾Ĺ MAXPATHLEN ۤ
.TP
.B ENOENT
ѥ̾Ǥ롣⤷ϻꤵ줿ѥ¸ߤʤ
.TP
.B ELOOP
ѥ̾β˥󥯤¿
ޤ
.I target

.I source
λ¹ʤΤ˰ư׵ᤵ줿
.B EACCES
ѥ˴ޤޤǥ쥯ȥ˸(¹)Ĥʤ
.br
ޤ MS_RONLY ե饰̵ǥ꡼ɥ꡼(ɤ߽ФΤ)Υե륷ƥ
ޥȤ褦Ȥ
.br
ޤϥ֥åǥХ
.I source
 MS_NODEV ץǥޥȤ줿ե륷ƥ˰֤Ƥ롣
.TP
.B ENXIO
֥åǥХ
.I source
Υ᥸㡼ֹ椬ϰϤۤ
.TP
.B EMFILE
(֥åǥХ׵ᤵ줿)ߡǥХΥơ֥뤬դˤʤä
.SH 
δؿ Linux ͭδؿǤꡢܿץˤ
Ѥ٤Ǥʤ
.SH 
ǽ
.B umount
ؿ \fIumount(device)\fP ηǸƤӽФ졢
֥åǥХʳꤷƸƤӽФ ENOTBLK ֤
Linux 0.98p4 ǡ̾Τ狼ʤǥХб뤿
\fIumount(dir)\fP ƤӽФä줿
Linux 2.3.99-pre7 ǡ\fIumount(device)\fP Ϻ졢
\fIumount(dir)\fP Ĥ줿
(ĤΥǥХʣΰ֤˥ޥȽ褦ˤʤäᡢ
ǥХꤷǤԽʬǤ)
.LP
 MS_SYNC ե饰ϡ̤ MS_SYNC  <mman.h> ɲä줿Τ
1.1.69  MS_SYNCHRONOUS ̾Ѥä
.LP
Linux 2.4 Ǥϡ
.B MS_NOSUID
ץդǥޥȤ줿ե륷ƥ
set-UID  set-GID Υץ¹Ԥ褦Ȥȡ
.B EPERM
顼Ȥʤä
Linux 2.4 ʹߤǤϡΤ褦ʾ set-UID ӥåȤ set-GID ӥåȤ
ñ̵뤵롣
.SH Ϣ
.BR mount (8),
.BR umount (8)