Add some casts to bring us up to WARNS2. This is almost WARNS6 except for
[dragonfly.git] / sbin / mount_msdos / mount_msdos.8
1 .\"     $NetBSD: mount_msdos.8,v 1.13 1998/02/06 05:57:00 perry Exp $
2 .\"
3 .\" Copyright (c) 1993,1994 Christopher G. Demetriou
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\"    must display the following acknowledgment:
16 .\"      This product includes software developed by Christopher G. Demetriou.
17 .\" 3. The name of the author may not be used to endorse or promote products
18 .\"    derived from this software without specific prior written permission
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD: src/sbin/mount_msdos/mount_msdos.8,v 1.19.2.1 2000/12/08 14:03:59 ru Exp $
32 .\" $DragonFly: src/sbin/mount_msdos/mount_msdos.8,v 1.2 2003/06/17 04:27:33 dillon Exp $
33 .\"
34 .Dd April 7, 1994
35 .Dt MOUNT_MSDOS 8
36 .Os
37 .Sh NAME
38 .Nm mount_msdos
39 .Nd mount an MS-DOS file system
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl o Ar options
43 .Op Fl u Ar uid
44 .Op Fl g Ar gid
45 .Op Fl m Ar mask
46 .Op Fl s
47 .Op Fl l
48 .Op Fl 9
49 .\".Op Fl G
50 .Op Fl L Ar locale
51 .Op Fl W Ar table
52 .Pa special
53 .Pa node
54 .Sh DESCRIPTION
55 The
56 .Nm
57 command attaches the MS-DOS filesystem residing on
58 the device
59 .Pa special
60 to the global filesystem namespace at the location
61 indicated by
62 .Pa node .
63 This command is normally executed by
64 .Xr mount 8
65 at boot time, but can be used by any user to mount an
66 MS-DOS file system on any directory that they own (provided,
67 of course, that they have appropriate access to the device that
68 contains the file system).
69 .Pp
70 The options are as follows:
71 .Bl -tag -width Ds
72 .It Fl o Ar options
73 Use the specified mount
74 .Ar options ,
75 as described in
76 .Xr mount 8 ,
77 or one of the MSDOS filesystem-specific options
78 .Ar shortnames ,
79 .Ar longnames
80 or
81 .Ar nowin95 ,
82 all of which can be used to affect Windows name translation in the
83 underlying filesystem.
84 .It Fl u Ar uid
85 Set the owner of the files in the file system to
86 .Ar uid .
87 The default owner is the owner of the directory
88 on which the file system is being mounted.
89 .It Fl g Ar gid
90 Set the group of the files in the file system to
91 .Ar gid .
92 The default group is the group of the directory
93 on which the file system is being mounted.
94 .It Fl m Ar mask
95 Specify the maximum file permissions for files
96 in the file system.
97 (For example, a
98 .Ar mask
99 of
100 .Li 755
101 specifies that, by default, the owner should have
102 read, write, and execute permissions for files, but
103 others should only have read and execute permissions.
104 See
105 .Xr chmod 1
106 for more information about octal file modes.)
107 Only the nine low-order bits of
108 .Ar mask
109 are used.
110 The default
111 .Ar mask
112 is taken from the
113 directory on which the file system is being mounted.
114 .It Fl s
115 Force behaviour to
116 ignore and not generate Win'95 long filenames.
117 .It Fl l
118 Force listing and generation of
119 Win'95 long filenames
120 and separate creation/modification/access dates.
121 .Pp
122 If neither
123 .Fl s
124 nor
125 .Fl l
126 are given,
127 .Nm
128 searches the root directory of the filesystem to
129 be mounted for any existing Win'95 long filenames.
130 If no such entries are found, but short DOS filenames are found,
131 .Fl s
132 is the default.
133 Otherwise
134 .Fl l
135 is assumed.
136 .It Fl 9
137 Ignore the special Win'95 directory entries even
138 if deleting or renaming a file.
139 This forces
140 .Fl s .
141 .\".It Fl G
142 .\"This option causes the filesystem to be interpreted as an Atari-Gemdos
143 .\"filesystem. The differences to the MS-DOS filesystem are minimal and
144 .\"limited to the boot block. This option enforces
145 .\".Fl s .
146 .It Fl L Ar locale
147 Specify locale name used for internal uppercase and lowercase conversions
148 for DOS and Win'95 names.
149 By default ISO 8859-1 assumed as local character set.
150 .It Fl W Ar table
151 Specify text file with 3 conversion tables:
152 .Bl -enum
153 .It
154 Local character set to Unicode conversion table (upper half) for Win'95 long
155 names, 128 Unicode codes separated by 8 per row.
156 If some code not present in Unicode, use
157 0x003F code ('?') as replacement.
158 .It
159 DOS to local character set conversion table (upper half) for DOS names,
160 128 character codes separated by 8 per row.
161 Code 0x3F ('?') used for impossible translations.
162 .It
163 Local character set to DOS conversion table (upper half) for DOS names,
164 128 character codes separated by 8 per row.
165 Some codes have special meaning:
166 .Bl -hang
167 .It 0x00
168 character disallowed in DOS file name;
169 .It 0x01
170 character should be replaced by '_' in DOS file name;
171 .It 0x02
172 character should be skipped in DOS file name;
173 .El
174 .El
175 .Pp
176 By default ISO 8859-1 assumed as local character set.
177 If file path isn't absolute,
178 .Pa /usr/libdata/msdosfs/
179 prefix prepended.
180 .El
181 .Sh FILES
182 .Bl -tag -width /usr/libdata/msdosfs -compact
183 .It Pa /usr/libdata/msdosfs
184 default place for character sets conversion tables
185 .El
186 .Sh SEE ALSO
187 .Xr mount 2 ,
188 .Xr unmount 2 ,
189 .Xr fstab 5 ,
190 .Xr mount 8
191 .Sh CAVEATS
192 The use of the
193 .Fl 9
194 flag could result in damaged filesystems,
195 albeit the damage is in part taken care of by
196 procedures similar to the ones used in Win'95.
197 .Pp
198 .Fx 2.1
199 and earlier versions could not handle cluster sizes larger than 16K.
200 Just mounting an MS-DOS file system could cause corruption to any
201 mounted file system.
202 Cluster sizes larger than 16K are unavoidable for file system sizes
203 larger than 1G, and also occur when filesystems larger than 1G are
204 shrunk to smaller than 1G using FIPS.
205 .Sh HISTORY
206 The
207 .Nm
208 utility first appeared in
209 .Fx 2.0 .
210 Its predecessor, the
211 .Nm mount_pcfs
212 utility appeared in
213 .Fx 1.0 ,
214 and was abandoned in favor
215 of the more aptly-named
216 .Nm .