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
|
.\" 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
.\"
.\" 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>
.\"
.\"WORD: Linux-specific Linux ͭ
.\"
.TH MOUNT 2 "28 Nov 1994" "Linux 1.1.67" "Linux Programmer's Manual"
.SH ̾
mount, umount \- ե륷ƥޥ/ޥȤ
.SH
.B "#include <sys/mount.h>"
.sp
.BI "int mount(const char *" specialfile ", const char * " dir
.BI ", const char * " filesystemtype ", unsigned long " rwflag
.BI ", const void * " data );
.sp
.BI "int umount(const char *" specialfile );
.sp
.BI "int umount(const char *" dir );
.SH
.B mount
.I specialfile
ǻꤵ줿ե륷ƥ(ǥХ̾Ǥ뤳Ȥ¿)
.IR dir
ǻꤵ줿ǥ쥯ȥ˷ӤĤ롣
.B umount
.IR specialfile
⤷
.IR dir
ǻꤵ줿˷ӤĤƤե륷ƥ
ѡ桼ե륷ƥΥޥ/ޥȤǤ롣
.IR filesystemtype
/proc/filesystems ˤƤͤΰ(㤨 "minix",
"ext2", "msdos", "proc", "nfs", "iso9660" )ꤹ롣
.IR rwflag
Ƭ 16 ӥåȤޥåʥС 0xC0ED ǤꡢĤ 16 ӥåȤ
ޥȥե饰(libc4libc5Ǥ<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 /* disallow access to device special files */
#define MS_NOEXEC 8 /* disallow program execution */
#define MS_SYNC 16 /* writes are synced at once */
#define MS_REMOUNT 32 /* alter flags of a mounted FS */
#define MS_MGC_VAL 0xC0ED0000
.fi
⤷ޥåʥСʤСǸ2ĤΰϻѤʤ
.IR data
̤Υե륷ƥˤäƲᤵ롣
.SH ֤
0 ֤롣Ԥ -1 ֤ꡢ
.I errno
顼Ƥ˽äꤵ롣
.SH 顼
顼ͤϥե륷ƥॿפ˰¸ưʲ˼褦ˤʤ롣
Υե륷ƥॿפˤϸͭΥ顼礬ꡢޤ
ȼư뤳Ȥ⤢롣ܤϥͥΥߤ
.TP
.B EPERM
¹ԼԤѡ桼ǤϤʤ
.TP
.B ENODEV
.I Filesystemtype
ͥ(config)Ƥʤ
.TP
.B ENOTBLK
.I Specialfile
֥åǥХǤϤʤ(ǥХᤵƤ)
.TP
.B EBUSY
.I Specialfile
ϴ˥ޥȤƤ롣ޤϴ˥ե뤬Ѥ˳Ƥꡢ
ɤ߹Ѥ˺ƥޥȤ뤳ȤǤʤޤ
.I dir
˻ȤƤ(륿Ǥäꡢ̤ΥǥХΥޥ
ȥݥȤǤäꡢץ줿եǤä....)
.I dir
ˤϥޥȤǤʤ
.TP
.B EINVAL
.I Specialfile
Υѡ֥å̵Ǥ롣ޤ
.I specialfile
.IR dir .
ФƥޥȤƤʤΤ˺ƥޥȤᤵ줿ޤ
.I dir
ޥȥݥȤǤϤʤΤ˥ޥȤä
.TP
.B EFAULT
ΤҤȤĤ桼Υɥ쥹֤γؤƤ롣
.TP
.B ENOMEM
ͥ뤬ե̾ǡԡ뤿ζڡݤǤʤ
.TP
.B ENAMETOOLONG
ѥ̾Ĺ MAXPATHLEN ۤ
.TP
.B ENOENT
ѥ̾Ǥ롣⤷ϻꤵ줿ѥ¸ߤʤ
.TP
.B ENOTDIR
2ܤΰ⤷1ܤΰƬǥ쥯ȥǤϤʤ
.TP
.B EACCES
ѥ˴ޤޤǥ쥯ȥ˸(¹)Ĥʤ
.br
ޤ MS_RONLY ե饰̵ǥɥ(ɤ߽ФΤ)Υե륷
ƥޥȤ褦Ȥ
.br
ޤϥ֥åǥХ
.I Specialfile
MS_NODEV ץǥޥȤ줿ե륷ƥ˰֤Ƥ롣
.TP
.B ENXIO
֥åǥХ
.I specialfile
Υ㡼ʥФϰϤۤ
.TP
.B EMFILE
(֥åǥХᤵ줿)ߡǥХΥơ֥뤬դˤʤä
.SH
δؿ Linux ͭδؿǤꡢܿץˤϻ
Ѥ٤Ǥʤ
.SH Ϣ
.BR mount (8),
.BR umount (8)
|