History log of /freebsd-9.3-release/sbin/mount_msdosfs/mount_msdosfs.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 201227 29-Dec-2009 ed

ANSIfy almost all applications that use WARNS=6.

I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.


# 185422 29-Nov-2008 imp

Noticed the following error message:

mount_msdosfs: /dev/cf0s1: : Operation not supported by device

and thought I'd fix it to be:

mount_msdosfs: /dev/cf0s1: Operation not supported by device

Not sure why errmsg isn't getting filled in, or why this error is even
happening at all... (fsck_msdosfs is clean, and I can mount this same
CF elsewhere).


# 166326 28-Jan-2007 rodrigc

Pass "errmsg" to nmount(), so that if nmount() fails, we can get
strings provided by vfs_mount_error().


# 159128 01-Jun-2006 rodrigc

mount_msdosfs.c:
- remove call to getmntopts(), and just pass -o options to
nmount(). This removes some confusion as to what options
msdosfs can parse, by pushing the responsibility of option parsing
to the VFS and FS specific code in the kernel.

msdosfs_vfsops.c:
- add "force" and "sync" to msdosfs_opts. They used to be specified
in mount_msdosfs.c, so move them here. It's not clear whethere these
options should be placed into global_opts in vfs_mount.c or not.

Motivated by: marcus


# 152974 30-Nov-2005 avatar

Fixing yet another regression introduced in rev1.37 by preserving cs_local
pointer such that local to DOS code page conversion with combined option
'-L,-D' works again.

Reviewed by: rodrigc


# 152809 25-Nov-2005 avatar

It turns out that set_charset() invokes build_iovec_argf() which modifies
iov address internally through realloc(3). However, since the function
parameter wasn't designed to allow the modified iov being passed back to
the caller, we ended up feeding iov with several corrupted entries(this
depends on how many arguments were pushed into iovec before set_charset())
to nmount(2).

This commit fixes this regression introduced in rev1.37 such that
mount_msdosfs(8) with code page conversion option(-W,-D) enabled works again.

Reviewed by: rodrigc


# 152731 23-Nov-2005 avatar

- Adding the missing 'W' option back which was accidentally removed
in rev1.37.
- Fixing a core dump inside build_iovec_argf by providing a !NULL format
string to vsnprintf(3).

Reviewed by: rodrigc


# 152416 14-Nov-2005 maxim

o Style: restore tab indentation mangled in the previous delta.


# 152362 13-Nov-2005 rodrigc

Convert mount_msdosfs to use nmount().


# 147242 10-Jun-2005 delphij

Use MOPT_END in favor of MOPT_NULL, which better describes the purporse
of the macro.


# 146853 01-Jun-2005 delphij

Add a handy macro to represent null mount option, MOPT_NULL, and make
use of the macro in sbin/mount*'s, by replacing:

mopts[] = {
MOPT_STDOPTS,
{ NULL }
}

With:
mopts[] = {
MOPT_STDOPTS,
MOPT_NULL
}

This change will help to reduce the situation that we don't explicitly
initialize "struct mntopt"'s. It should not contribute to any
functional/logical changes as far as I can tell.


# 134565 31-Aug-2004 trhodes

Correct a style bug: remove a gratuitous space between ( and ".

Ok'ed by: fjoe


# 131835 08-Jul-2004 trhodes

Remove support for gemdos, John removed it from the driver awhile ago.

Glanced at by: jhb


# 123293 08-Dec-2003 fjoe

Make msdosfs long filenames matching case insensitive again.

PR: 59765
Submitted by: Ryuichiro Imura <imura@ryu16.org>


# 121429 23-Oct-2003 trhodes

Fix several old bugs which got worse over time:

o WARNS should be WARNS?= (broke in rev 1.21).
o Includes should be sorted.
o Move "mntopt.h" out of the standard includes section.
o Rewrite usage() to match the manual page and make it < 80 characters.
o Remove extra .El call on line 187. It is unused and causes mdoc(7) warnings.

Discussed with: bde


# 121373 22-Oct-2003 trhodes

Move prototypes into their function.


# 121363 22-Oct-2003 trhodes

Make WARNS=2 build without error.


# 121360 22-Oct-2003 trhodes

Add back the commas ',' in usage to avoid a garbled usage message.
They were erroneously removed in revision 1.27.


# 121007 11-Oct-2003 fjoe

Describe '-M' in usage().

PR: 57462
Submitted by: Ryuichiro Imura <imura@ryu16.org>


# 120492 26-Sep-2003 fjoe

- Support for multibyte charsets in LIBICONV.
- CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options
(with corresponding modules).
- kiconv(3) for loadable charset conversion tables support.

Submitted by: Ryuichiro Imura <imura@ryu16.org>


# 118837 12-Aug-2003 trhodes

Add a '-M mask' option so that users can have different
masks for files and directories. This should make some
of the Midnight Commander users happy.

Remove an extra ')' in the manual page.

PR: 35699
Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> (original version)
Tested by: simon


# 101270 03-Aug-2002 mux

Now that the kernel is able to load modules itself,
remove all the code which was trying to do so.
This code was nasty in several ways, it was hiding
the kernel bug where the kernel was unable to properly
load a module, and it was quitting if it wasn't able
to load the module. The consequence is that an ABI
breakage of the vfsconf API would have broken *every*
mount utility.


# 92882 21-Mar-2002 imp

o __P removed
o main prototype removed


# 77577 01-Jun-2001 ru

- VFS_SET(msdos) -> VFS_SET(msdosfs)
- msdos.ko -> msdosfs.ko
- mount_msdos(8) -> mount_msdosfs(8)
- "msdos" -> "msdosfs" compatibility glue in mount(8)


# 77162 25-May-2001 ru

- sys/msdosfs moved to sys/fs/msdosfs
- msdos.ko renamed to msdosfs.ko
- /usr/include/msdosfs moved to /usr/include/fs/msdosfs


# 62881 10-Jul-2000 kris

Don't call err with no format string.


# 55613 08-Jan-2000 ache

Allow #-comments in conversion table file


# 52055 09-Oct-1999 phk

mount* fixes from Martin Blapp <mb@imp.ch>:

Made mount more userfriendly (bad slashes are now filtered out)
and we remove in mount_nfs trailing slashes if there are any.

Fixed mount_xxx binarys to resolve with realpath(3)
the mountpoint.

Translate the deprecated nfs-syntax with '@' to ':' .
The ':' syntax has now precedence, but '@' still works.
Notify the user that the '@' syntax should not be used.

PR: 7846
PR: 13692
Submitted by: Martin Blapp <mb@imp.ch>
Reviewed by: phk


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48002 18-Jun-1999 jkh

This lets you specify "gemdosfs", "shortnames", "longnames", and
"nowin95" as arguments to the "-o" flag, as alternatives to "-G", "-s",
"-l", and "-9"; when running "mount_msdos" by hand, that doesn't let you
do anything you couldn't already do, but if you're letting "mount" run
it, it lets you specify those options, which is especially useful if,
for example, you have an entry in "/etc/fstab" for some file system,
with "noauto" set, so you can conveniently mount a DOS partition from a
removable drive and force it to treat the file system as VFAT rather
than boring old FAT.

Submitted by: Guy Harris <guy@netapp.com>


# 37277 30-Jun-1998 charnier

Split usage string.


# 33769 23-Feb-1998 ache

Implement loadable DOS<->local conversion tables for DOS names
Additionly load toupper table to create DOS names always in uppercase


# 33761 23-Feb-1998 ache

Implement loadable upper->lower local conversion table
Recently introduced -w renamed to -W


# 33749 22-Feb-1998 ache

Add loadable local<->Unicode conversion support for Win95 names
Note: DOS names still not work and require similar changes


# 33549 18-Feb-1998 jkh

Support for FAT32 partitions.
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Obtained from: NetBSD


# 28731 25-Aug-1997 bde

Support all mount flags that are supported in the kernel.


# 24359 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 23335 03-Mar-1997 bde

Updated mount_msdos to use the Lite2 getvfsbyname() interface.


# 22990 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 18286 14-Sep-1996 bde

Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.


# 15771 13-May-1996 wollman

One program I missed in removing MOUNT_* constants.


# 4065 01-Nov-1994 wollman

Add support for filesystem-specific `-o' options, and re-implement the
most common cd9660 and nfs options like God intended them. (It is now
possible to say

mount -o ro,soft,bg,intr there:/foo/bar /foo/bar

again.) This whole getmntopt() business is an incredible botch;
it never should have been anything more than a wrapper around
getsubopt(3). Because if the way the current hackaround is implemented,
options which take arguments (like the old `rsize' and `wsize') are still
unavailable, and must be accessed the new, broken way.

(It's unimaginable how Berkeley managed to screw up one of the few things
about NFS that Sun actually got right to begin with!)


# 2999 22-Sep-1994 wollman

Automatically load NFS and a bevy of other filesystems.


# 2892 19-Sep-1994 dfr

Added mount_msdos.

Obtained from: NetBSD