History log of /freebsd-10.1-release/sbin/mount/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

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


270895 31-Aug-2014 trasz

MFC r270209:

Add description for the "automounted" mount flag.

Reviewed by: emaste@
Sponsored by: The FreeBSD Foundation


270892 31-Aug-2014 trasz

MFC r270096:

Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric: D523
Relnotes: yes
Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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


253445 18-Jul-2013 joel

Minor mdoc fixes.


253433 17-Jul-2013 rodrigc

In this GRN, Marcel Moolenaar overhauled the logic for mounting
the root file system on bootup:

|------------------------------------------------------------------------
|r214006 | marcel | 2010-10-17 22:01:53 -0700 (Sun, 17 Oct 2010) | 20 lines
|
| Re-implement the root mount logic using a recursive approach, whereby each
|root file system (starting with devfs and a synthesized configuration) can
|contain directives for mounting another file system as root.
|------------------------------------------------------------------------

This commit adds a mount.conf(8) man page which documents
the root mount logic. mount.conf(8) also provides some examples
for the /.mount.conf file, which can be used to change the root mount behavior.

Reviewed by: marcel bjk


253372 15-Jul-2013 rmh

Add -n flag for compatibility with Linux version of mount(8).

Reviewed by: freebsd-fs, eadler, mckusick, jh, wblock


252356 28-Jun-2013 davide

- Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.


251485 07-Jun-2013 jh

Revert r238399.

The "failok" option doesn't have any effect at all unless specified in
fstab(5) and combined with the -a flag. The "failok" option is already
documented in fstab(5).

PR: 177630
No objection: eadler
MFC after: 1 week


250235 04-May-2013 crees

Introduce and use new flag -L to mount for mounting only late filesystems.

Previously, rc.d/mountlate mounted *all* filesystems, causing problems with
background NFS mounts being mounted twice.

PR: conf/137629
Submitted by: eadler (original concept)
Reviewed by: mjg
Approved by: hrs


241680 18-Oct-2012 attilio

Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.


241636 17-Oct-2012 attilio

Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.


241629 17-Oct-2012 attilio

Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.


241606 16-Oct-2012 attilio

Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.


241581 15-Oct-2012 eadler

Fix minor nits:
use a comma after "i.e."
sentences begin on new lines.

No .Dd bump for trivial modification.

Approved by: wblock
MFC after: 3 days


238399 12-Jul-2012 eadler

Document the behavior of mount with failok specified.

PR: docs/163742
Submitted by: gcooper
Discussion by: gcooper
Discussion by: bjk
Approved by: gabor
MFC after: 3 days


235873 24-May-2012 wblock

Fixes to man8 groff mandoc style, usage mistakes, or typos.

PR: 168016
Submitted by: Nobuyuki Koganemaru
Approved by: gjb
MFC after: 3 days


230377 20-Jan-2012 jh

Don't print the nmount(2) provided error message if it is empty.


230373 20-Jan-2012 jh

Change mount_fs() to not exit on error. The "failok" mount option
requires that errors are passed to the caller.

PR: 163668
Reviewed by: Garrett Cooper


230372 20-Jan-2012 jh

- Clean up checkpath().
- Remove unneeded sysexits.h include.

No functional change.

Submitted by: bde


230226 16-Jan-2012 jh

Change checkpath() to not exit on error. This is a prerequisite for
fixing the mount(8) "failok" option.

PR: 163668
Reviewed by: Garrett Cooper, delphij (previous version)


227081 04-Nov-2011 ed

Add missing static keywords for global variables to tools in sbin/.

These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.


225341 02-Sep-2011 jhb

Clear the mountprog variable after each mountfs() call so that mountprog
options don't leak over into subsequent mounts listed in /etc/fstab.
While here, fix a memory leak in debug mode.

Reported by: rank1seeker @ gmail
Approved by: re (kib)
MFC after: 1 week


224503 30-Jul-2011 mckusick

Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP
is set so that mount can revert back to using MNT_NOWAIT when doing
getmntinfo.

Approved by: re (kib)


224294 24-Jul-2011 mckusick

Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flag
so that it is visible to userland programs. This change enables
the `mount' command with no arguments to be able to show if a
filesystem is mounted using journaled soft updates as opposed
to just normal soft updates.

Approved by: re (bz)


222832 07-Jun-2011 delphij

Add a special mount option "failok" to indicate that the administrator wants
the system to proceed to boot without bailing out into single user mode,
even when the file system can not be successfully mounted.

This option is implemented in mount(8) and not passed into kernel.

MFC after: 1 month


222754 06-Jun-2011 gavin

Add another example to mount(8) on using the "-o" argument.

PR: docs/157389
Submitted by: Warren Block <wblock wonkity.com>
MFC after: 1 week


221194 29-Apr-2011 rmacklem

Another man page update related to the switchover of the
NFS clients done by r221124.
This is a content change.

Submitted by: jh


221124 27-Apr-2011 rmacklem

This patch changes head so that the default NFS client is now the new
NFS client (which I guess is no longer experimental). The fstype "newnfs"
is now "nfs" and the regular/old NFS client is now fstype "oldnfs".
Although mounts via fstype "nfs" will usually work without userland
changes, an updated mount_nfs(8) binary is needed for kernels built with
"options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and
mount(8) binaries are needed to do mounts for fstype "oldnfs".
The GENERIC kernel configs have been changed to use options
NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER.
For kernels being used on diskless NFS root systems, "options NFSCL"
must be in the kernel config.
Discussed on freebsd-fs@.


219040 25-Feb-2011 dougb

Revert r217871.


217871 26-Jan-2011 dougb

Clarify the availability of the noatime option on network file systems


216399 12-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in sbin. This
is in accordance with the information at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change


215576 20-Nov-2010 mckusick

Delete /sys/ufs/ffs/README.snapshot as it is no longer relevant.
Drop reference to it in mount(8).

MFC: 3 days


213298 30-Sep-2010 jh

Fix printing of the "rw" mount option in fstab(5) format (-p option).
fstab(5) format requires that one of "rw", "rq" or "ro" is always
specified.

PR: bin/123021
Reviewed by: keramida, rodrigc
MFC after: 2 weeks


208647 29-May-2010 jilles

Clarify devfs manpages slightly.

mount(8): add xref to devfs(5)
devfs(5): change example to something more likely to be useful (it is not
necessary to mount a devfs on /dev manually, but for chroots/jails it is
often needed), mention since when devfs is preferred to device nodes on ufs

PR: 146600
MFC after: 2 weeks


208027 13-May-2010 uqs

mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by: mdocml lint run
Reviewed by: ru


204840 07-Mar-2010 bz

As statfs.f_flags are uint64_t the local variables should be as well.
We'll start noticing this with the next flag introduced as the lower
32bit are all used.
As this is old code we might need to do a full tree sweep one day, unless
changing our strategy to use a different `API' for getting/setting flags
along with the rest of the statfs data.

While here compare to 0 explicitly [1].

Suggested by: kib [1]
Reviewed by: kib
MFC after: 5 days


203757 10-Feb-2010 jh

- Remove reference to nfs4. mount_nfs4(8) was removed in r192578.
- Add newnfs.


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.


200796 21-Dec-2009 trasz

Implement NFSv4 ACL support for UFS.

Reviewed by: rwatson


199182 11-Nov-2009 trasz

Add links to zfs(8) and zpool(8) to mount(8) manual page.


198236 19-Oct-2009 ru

Switch the default WARNS level for sbin/ to 6.

Submitted by: Ulrich Spörlein


197200 14-Sep-2009 pjd

Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
does. This is not POLA violation, because there is no single file system in the
base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with
MNT_IGNORE after next commit.

Reviewed by: kib
MFC after: 3 days


192930 27-May-2009 rmacklem

Add support for the experimental nfs client to mount_nfs. The
experimental client is used when the fstype is "newnfs" or the "nfsv4"
option is specified. It includes the addition of the option:
gssname - to specify a client side initiator host based principal name
which is specific to NFSv4.
It also includes a change to mount.c, so that it knows about
mount_newnfs, but not mount_nfs4.

Reviewed by: dfr
Approved by: kib (mentor)


189397 05-Mar-2009 rodrigc

Add a -o mountprog parameter to mount which explicitly allows
an alternative program to be used for mounting a file system.
Ideally, all file systems
should be converted to pass string arguments to nmount(), so that
/sbin/mount can handle them. However, certain file systems such as FUSE have
not done this, and want to have their own userland mount programs.

For example, to mount an NTFS file system with the FUSE NTFS driver:

mount -t ntfs -o mountprog=/usr/local/bin/ntfs-3g /dev/acd0 /mnt

or via an fstab entry:

/dev/acd0 /mnt ntfs ro,noauto,mountprog=/usr/local/bin/ntfs-3g 0 0

PR: 120784
Requested by: Dominic Fandrey


187130 13-Jan-2009 obrien

r187093 failed to keep the lifetime of the pointer suitable for reentrancy.
Fix that. Also move the current buffer size into the 'cpa' structure.


187093 12-Jan-2009 obrien

Use a dynamically grown buffer for building the argv for the sub-mounts.
Also fix RCSid spamage.

Inspired by patch from: Christoph Mallon <christoph.mallon@gmx.de>


187035 10-Jan-2009 obrien

Explicitly check each mount argv building assignment for buffer over flowing.

Reviewed by: imp (earlier version of patch)


186505 26-Dec-2008 obrien

style(9)


186504 26-Dec-2008 obrien

Make the sub-'argc' static to make it harder to overwrite thru a buffer
overflow.


186291 18-Dec-2008 obrien

Be a little bit more pestimistic in argument handling - check if we've
overflown our internal buffer (though after the fact), and s/strncpy/strlcpy/

Reviewed by: rodrigc
Obtained from: Juniper Networks


182570 31-Aug-2008 matteo

Don't return always 0. Return what we get from exec_mountprog or
mount_fs.

PR: bin/125154
MFC after: 1 day


179514 03-Jun-2008 ru

Fix markup.


179513 03-Jun-2008 kib

Add note about a reason to use mount(8) instead of mount_somefs.

Reported and proof-readed by: pho
Discussed with: rodrigc
MFC after: 3 days


177076 12-Mar-2008 tmclaugh

- Update with a better example which shows that options specific to a
file system may be passed using -o.

Approved by: remko, rodrigc


177038 10-Mar-2008 tmclaugh

- Also change the /sbin/mount_unionfs line I managed to miss just two
lines down to '-o below'.

Approved by: remko
Noticed by: rodrigc
Pointyhat by: me


177035 10-Mar-2008 tmclaugh

- unionfs -b option is deprecated in favor of '-o below' as per
mount_unionfs(8).

Approved by: remko


176370 17-Feb-2008 yar

Correct the description of getmnt_silent: unknown options are silently
ignored if this variable is non-zero, which is quite logical given the
variable's name.


175964 04-Feb-2008 matteo

Fix mount -p and mount -u -ocurrent on gjournaled FS

PR: bin/120162
Submitted by: Niki Denev
MFC after: 1 week


175949 03-Feb-2008 matteo

Fix printing of unionfs mounts when using the -p option

PR: bin/75585
MFC after: 1 week


173994 27-Nov-2007 jhb

Properly sort 'sync' in the list of options passed to -o.

MFC after: 3 days


172788 19-Oct-2007 rodrigc

Remove stale reference to mount_std.


171023 25-Jun-2007 rafan

- Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on: freebsd-arch@
Approved by: re (mux)


168698 13-Apr-2007 phk

Align -p output in TAB built columns suitable for /etc/fstab.


166526 06-Feb-2007 rodrigc

Print warning that "-t msdos" is deprecated and being converted to
"-t msdosfs". The conversion has been happening since 1.43, but
no equivalent conversion happens in "umount -t", which led to some
confusion with some users.

PR: 79296
Submitted by: Nobuhiro Yasutomi <nobuhiro yasutomi nifty ne jp>


166439 02-Feb-2007 pjd

Use pidfile(3) API to restart mountd(8) on success mount.
This why we won't kill random process if there is a stale PID in
/var/run/mountd.pid.


164977 07-Dec-2006 rodrigc

Pass a char buffer parameter with name "errmsg" to nmount().
For filesystems which use vfs_mount_error() to log an error, this
char buffer will be populated with a string error message.
If nmount() fails, in addition to printing out strerror(errno),
print out the "errmsg" populated by vfs_mount_error().


164266 14-Nov-2006 rodrigc

Fix debugging output of '-d', to more accurately reflect if
we exec an external mount program, or just call nmount()
to mount a filesystem.

Noticed by: kris


163843 31-Oct-2006 pjd

Teach mount(8) about MNT_GJOURNAL flag.
MNT_GJOURNAL flag is not a mount-time flag, but it is needed to show
'gjournal' option in mount(8) output.

Sponsored by: home.pl


163672 24-Oct-2006 ru

Two tiny style fixes.


163671 24-Oct-2006 ru

Revert rev. 1.86 by jmallett@ as it breaks "ro" mounts specified
in /etc/fstab.

This has been happening due to the priority inversion; options
specified on the command line should take precedence over options
from fstab over default "noro" option, but since both the default
"noro" and options specified on the command line (-w, -r, -o ...)
were put into the same "options" variable, "noro" took precedence
over fstab "ro" (this is easily visible with "mount -d").

PR: bin/100164


162395 18-Sep-2006 ru

Markup fixes.


162307 14-Sep-2006 des

Fix markup snafu.

Spotted by: ru


162154 08-Sep-2006 danger

Re-word the description of the "async" flag.

Suggested by: Milos Vyletel (mv@rulez.sk)
Reviewed by: ru
Approved by: keramida (mentor), trhodes (mentor)


160303 12-Jul-2006 des

Teach mount(8) about a 'late' keyword, which means the file system should
not be mounted unless the -l flag was specified.

Add an rc script, mountlate, which basically runs 'mount -a -l'. It runs
after DAEMON but before LOGIN.

This is useful for things like loopback mounts, because mountcritremote
runs before mountd / nfsd (since /usr might be a remote file system), so
an attempt to mount a loopback network file system in mountcritremote will
fail.

Also add a progress message to mountcritlocal, for the sake of symmetry
with similar messages in mountcritremote and mountlate.

Reviewed by: freebsd-rc
MFC after: 3 weeks


159473 10-Jun-2006 jmallett

Minor style tweaks while nearby. Namely ANSIfy and parens on return values.


159472 10-Jun-2006 jmallett

Rather than using specified_ro to parse the options list an extra time, and
keeping a flag to check whether we actually wanted to mount the filesystem
readonly, setup the options list so that we start off by assuming rw is what's
desired and let later flags change that.


159177 02-Jun-2006 rodrigc

Fix "mount -u -o ro".

Requested by: maxim


158738 19-May-2006 rodrigc

Remove reference to mount_procfs(8), add reference to procfs(5).
mount(8) doesn't use mount_procfs(8), and instead passes an fstype
of "procfs" directly to nmount().


158715 17-May-2006 rodrigc

Remove reference to mount_ext2fs(8), add reference to ext2fs(5).
mount no longer invokes mount_ext2fs, it calls nmount() directly
with fstype "ext2fs".


158400 10-May-2006 maxim

o Extend rev. 1.75 and restore an ability to specify a non-default
quota files location.

Submitted by: Kostik Belousov


156229 03-Mar-2006 keramida

When there are no mount options, an implicit "rw" should be printed in
the output of ``mount -p''.

Approved by: rodrigc


155997 25-Feb-2006 rodrigc

If we specify: mount -u (update), without specifying an
additional -r (read-only) flag or or -w (read-write) flag,
then assume we want, mount -u -w.

When doing a mount update, this will implicitly pass a "noro" mount
option down to the VFS layer.
vfs_mergeopts() in vfs_mount.c will then remove the "ro" mount option
if it exists in the mount options for a mounted file system.
This means that "mount -u" works the same as "mount -u -w"
and will convert a read-only mount to read-write.


155992 25-Feb-2006 rodrigc

Update text to reflect that:
- mount(8) now calls the nmount(2) system call directly, not mount(2)
- specifying a filesystem type with -t will not automatically
invoke an external /sbin/mount_XXXX program....this only happens for
certain file system types. For all other file system types, nmount(2)
is called directly.


154773 24-Jan-2006 pjd

s/<space><tab>/<tab>/


154512 18-Jan-2006 pjd

Resolve the mount point's path with realpath(2) before checking if file
system is mounted. This prevevents duplicated mounts.

The change I made against the original patch is to fall back to the given
path on realpath(2) failure instead of exiting with an error.

Submitted by: Andreas Kohn <andreas@syndrom23.de>
PR: bin/89782
MFC after: 3 days


154189 10-Jan-2006 pav

- Xref mount_reiserfs(8)

PR: docs/90902
Submitted by: Scott Robbins <scottro@nyc.rr.com>
MFC after: 3 days


153360 12-Dec-2005 rodrigc

For reiserfs, pass mount parameters directly to nmount() instead
of forking an external mount_reiserfs program.

Reviewed by: dumbbell


153062 03-Dec-2005 rodrigc

Remove workaround for old GCC bugs.

Submitted by: ru


153038 03-Dec-2005 rodrigc

Simplify parsing of mount options by passing
"rw" option down to kernel, since vfs_donmount() can now parse it.


153007 02-Dec-2005 rodrigc

Remove unsupported "dev" option from comments of mntopts.h.

Requested by: jkoshy


152912 29-Nov-2005 rodrigc

Remove MNT_NODEV mount option. In RELENG_6, MNT_NODEV was a no-op.
The presence of MNT_NODEV was confusing the am-utils autoconf scripts.

PR: conf/79715


152778 24-Nov-2005 avatar

Fixing a regression introduced in rev1.72 by connecting cd9660 to the
external mounting program list as well; otherwise, entry like the following
in /etc/fstab wouldn't work:

/dev/acd0 /mnt/cdrom cd9660 ro,-C=big5 0 0

Reviewed by: rodrigc


152769 24-Nov-2005 ru

Fix prototype.


152738 23-Nov-2005 rodrigc

Remove UFS-specific parts from mount(8).
For mounting UFS, all mount options are passed directly to nmount(),
without any UFS-specific logic.


152732 23-Nov-2005 rodrigc

Do not pass userquota and groupquota mount options to nmount().
These options are read from fstab by quotacheck(8), but are not
valid mount options that need to be passed down the the filesystem.

Noticed by: maxim


152668 21-Nov-2005 rodrigc

For mounting a UFS filesystem, call nmount() directly, instead of having
special logic which called mount() in a separate mount_ufs() function.


152465 16-Nov-2005 rodrigc

Do not pass noauto to nmount() or external mount program.

Noticed by: maxim


152417 14-Nov-2005 rodrigc

In build_iovec(), if passed in len is -1, check to see if
val is NULL before doing strlen() to calculate new len.

Submitted by: maxim


152354 13-Nov-2005 rodrigc

- Make size parameter to build_iovec() a size_t, not an int
- Add build_iovec_argf() helper function, for help converting old
mount options which used the mount_argf() function for the mount() syscall.

Discussed with: phk


152344 12-Nov-2005 rodrigc

- Minor fixes to raise WARNS level to 6.
- Teach the mount program to call the nmount() syscall directly
- Preserve existing method of calling mount() for UFS, until we clean things
up.
- Preserve existing method of forking and calling external mount programs for
mfs, msdosfs, nfs, nfs4, ntfs, nwfs, nullfs, portalfs, reiserfs, smbfs,
udf, umapfs, unionfs
- devfs, linprocfs, procfs, ext2fs call nmount() syscall directly, since
that is all those external mount programs were doing

Reviewed by: phk
Discussed on: arch


151048 07-Oct-2005 rodrigc

Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.


151044 07-Oct-2005 rodrigc

Bump WARNS up to 3.


151043 07-Oct-2005 rodrigc

In prmount(), use an unsigned int variable to eliminate
'comparison between signed and unsigned' compiler warning.


151042 07-Oct-2005 rodrigc

Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
Make prototype in extern.h match prototype in mount_ufs.c


147443 16-Jun-2005 brueffer

Remove Xref to mount_hpfs(8), it's not hooked up to the build.

Approved by: re (blanket)
MFC after: 3 days


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.


144133 26-Mar-2005 cperciva

When executing mount_foo, pass "mount_foo" as argv[0] instead of "foo".
This unbreaks "/rescue/mount -t foo" -- previously it was necessary to
explicitly call "/rescue/mount_foo".

Hints from: gordon
X-MFC after: 3 days (if approved by re@)


144000 23-Mar-2005 cperciva

Add verbiage to the description of the noexec mount option clarifying
that it really wasn't intended as a security feature.

Wording mostly by: simon
Discussed with: secteam


141611 10-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


140415 18-Jan-2005 ru

Sort sections.


139330 26-Dec-2004 josef

Fix typo.

Noticed by: clement


138234 30-Nov-2004 ru

Revert last change. It doesn't break mount(8) reporting
but allows a "nodev" in /etc/fstab, etc.


138187 29-Nov-2004 ru

Fix the mount(8) status reporting, now that MNT_NODEV is a no-op (zero).

Asked to commit by: phk


138097 25-Nov-2004 delphij

Avoid comparing pointer against a numerical value by adding a * in
front of it.

Reviewed by: phk


138095 25-Nov-2004 phk

Add a convenience function for building nmount iov arrays.


138094 25-Nov-2004 phk

Fix bug: don't let "synco" match "sync"


129327 17-May-2004 ru

Assorted markup, grammar, and spelling fixes.


128658 26-Apr-2004 bmilekic

The previous change to mount(8) to report ufs or ufs2 used
libufs, which only works for Charlie root.

This change reverts the introduction of libufs and moves the
check into the kernel. Since the f_fstypename is the same
for both ufs and ufs2, we check fs_magic for presence of
ufs2 and copy "ufs2" explicitly instead.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>


128073 09-Apr-2004 markm

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp


127435 26-Mar-2004 rwatson

Correct the definition of the multilabel flag: it enables multilabel
MAC support on the file system, if supported, which causes MAC to treat
each object as having its own label, rather than using a single label
for all objects on the file system. This doesn't have to be used in
combination with the tunefs/newfs flags -- it's an alternative.


126569 04-Mar-2004 brueffer

s/considred/considered/


125933 17-Feb-2004 grog

Report the difference between ufs and ufs2.

Submitted by: "Christian S.J. Peron" <maneo@bsdpro.com>


125639 10-Feb-2004 trhodes

Reorder Xrefs in SEE ALSO.


125638 10-Feb-2004 trhodes

Update to inform users of acls and multilabel options. Add Xrefs to the
more relevant manual pages.

PR: 62394
Submitted by: Marc Silver <marcs@draenor.org>


125365 03-Feb-2004 nectar

Correct a typo and unbreak the build.

Pointy hat to: pjd


125339 02-Feb-2004 pjd

Made use of MNT_USER flag and inform about user responsible for mount
in those cases:
1. File system was mounted by an unprivileged user.
2. File system was mounted by an unprivileged root user.
3. File system was mounted by a privileged non-root user.

Point 1 is when file system was mounted by unprivileged user
(sysctl vfs.usermount was equal to 1 then).

Point 2 is when file system was mounted by root, while sysctl
security.bsd.suser_enabled is set to 0 and sysctl vfs.usermount
is set to 1.

Point 3 is because we want to be ready for capabilities.

Reviewed by: rwatson
Approved by: scottl (mentor)


125200 29-Jan-2004 guido

Style(9) option sorting

Submitted by: Ruslan Ermilov <ru@FreeBSD.org>


125197 29-Jan-2004 guido

Fix manpage and usage() to reflect that -a can be used in combination
with -o

Submitted by: Ruslan Ermilov <ru@FreeBSD.org>
Pointed out by: Ceri Davies <ceri@submonkey.net


125194 29-Jan-2004 guido

Unbreak -o fstab and -o current in combination with -a

MFC after: 2 weeks


124201 07-Jan-2004 anholt

Allow trailing slashes for MNT_UPDATE case (mount -u), too.

PR: bin/59144
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>


123268 07-Dec-2003 trhodes

Style change


123242 07-Dec-2003 iedowse

Print out the file system access statistics using uintmax_t types
instead of casting the unsigned 64-bit values to longs.

Suggested by: bde


123162 05-Dec-2003 iedowse

Don't include the file system ID in the output of `mount -v' if it
is all zeros. The kernel now consistently zeroes FSIDs for non-root
users, so there's no point in printing these.

Also fix a number of compiler warnings, including two real bugs:
- a bracket placement bug caused `mount -t ufs localhost:/foo /mnt'
to override the `-t ufs' specification and use mount_nfs.
- an unitialised variable was used instead of _PATH_SYSPATH when
warning that the mount_* program cound not be found.

Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> (FSID part)
Approved by: re (scottl)


121520 26-Oct-2003 trhodes

style.Makefile: Add a '?' before '=' in WARNS.


121349 22-Oct-2003 seanc

Reduce fstab(5)/mount(8) confusion by changing the man pages to say "ro"
instead of "rdonly". "rdonly" works for mount(8) and mount_std(8) but
not from /etc/fstab, whereas "ro" works for all mount_*(8) commands.


118580 07-Aug-2003 imp

Prefer PATH_MAX to MAXPATHLEN. PATH_MAX has the trailing NUL.


117742 18-Jul-2003 iedowse

When mount(8) is invoked with the `-v' flag, display the filesystem
ID for each file system in addition to the normal information.

In umount(8), accept filesystem IDs as well as the usual device and
path names. This makes it possible to unambiguously specify which
file system is to be unmounted even when two or more file systems
share the same device and mountpoint names (e.g. NFS mounts from
the same export into different chroots).

Suggested by: Dan Nelson <dnelson@allantgroup.com>


117031 29-Jun-2003 gordon

Convert fsck and mount to using execvP to find fsck_foo and mount_foo.
This simplifies the code path and makes the default path easy to override
in the /rescue case.

Submitted by: Tim Kientzle <kientzle@acm.org>


115116 17-May-2003 ru

Fixed the markup in the recently added ENVIRONMENT section.


114589 03-May-2003 obrien

Use __FBSDID() to quiet GCC 3.3 warnings.


113234 07-Apr-2003 mdodd

Bump the date for recent commits.


113224 07-Apr-2003 mdodd

Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.

Requested by: ru


113220 07-Apr-2003 mdodd

Implement the '-F' option for mount & umount which allows the user to
specify an alternate fstab file.


111284 23-Feb-2003 ru

mdoc(7) police: kill unnecessary xref.


109186 13-Jan-2003 joerg

Mention the oddities and requirements for mount operations executed by
non-root users.

PR: docs/42651
Submitted by: Thomas Seck <tmseck@netcologne.de>
MFC after: 3 days


107825 13-Dec-2002 trhodes

Remove the incorrect information about dump(8) and snapshots. All the
dump(8) issues are assumed to be fixed.

PR: 46224
Submitted By: Chris Knight <chris@aims.com.au>
Approved By: re (murray)


105118 14-Oct-2002 rwatson

Teach mount(8) about MNT_ACLS for the purposes of mount options and
mount option printing.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories


102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


101795 13-Aug-2002 ru

mdoc(7) police: missing markup bits.


101683 11-Aug-2002 mux

Update the manpage to match the code. The mount utilities
now don't try to load the filesystem module, the kernel takes
care of this.


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.


101205 02-Aug-2002 rwatson

Introduce support for Mandatory Access Control and extensible
kernel access control.

Teach mount(8) to understand the MNT_MULTILABEL flag, which is used
to determine whether a file system operates with individual per-vnode
labels, or treats the entire file system as a single object with a
single (mount) label. The behavior here will probably evolve some
now that nmount(2) is available and can more flexibly support mount
options.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs


99817 11-Jul-2002 trhodes

Add a bit of information on FFS snapshots to the mount(8) manual page.

PR: 30139
Submitted by: Chris Knight <chris@aims.com.au?
MFC after: 3 days


99501 06-Jul-2002 charnier

The .Nm utility


96707 16-May-2002 trhodes

more file system > filesystem


96418 11-May-2002 mux

Fix a typo : ".Xr mount_udf 8," -> ".Xr mount_udf 8 ,".


95318 23-Apr-2002 mux

Unbreak NFS mounts when mount(8) is invoked as : mount path@server.

Reviewed by: obrien


95289 22-Apr-2002 mux

Do our best to determine if the user is attempting an NFS mount when
the filesystem type isn't given in the command line. In the case of
an IPv6 address containing ':', one must use the '@' separator for it
to be properly parsed (mount_nfs(8) still needs fixing at the moment
though).

PR: bin/37230
Reviewed by: obrien
MFC after: 1 week


95218 21-Apr-2002 dwmalone

Add mount_udf and mount_smbfs to crossrefs.

PR: 37200
Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net>


92882 21-Mar-2002 imp

o __P removed
o main prototype removed


87325 04-Dec-2001 obrien

Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by: mike


84471 04-Oct-2001 ru

<mntopts.h> -> "mntopts.h" in SYNOPSIS.

Submitted by: bde


84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


79530 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


78732 24-Jun-2001 dd

Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).


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)


77575 01-Jun-2001 ru

Remove vestiges of MFS.


77042 23-May-2001 ru

Rename (after a repo-copy) some mount(8) programs:

mount_fdesc -> mount_fdescfs
mount_null -> mount_nullfs
mount_portal -> mount_portalfs
mount_umap -> mount_umapfs
mount_union -> mount_unionfs


76198 02-May-2001 dd

Implement the -r and -w options as `-o ro' and `-o noro', respectively. At
least in -w's case, simply unsetting the correct bit in init_flags was not
enough. The bit may be reset later if, say, the filesystem is marked `ro'
in fstab. The command line option should override the fstab setting, but
did not. The implementation of -r was changed for consistency.

PR: 26886
Reviewed by: archie


76022 26-Apr-2001 ru

mdoc(7) police: fix markup.


74815 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74531 20-Mar-2001 ru

Set the default manual section for sbin/ to 8.


71916 02-Feb-2001 nik

Add an xref for mount_ntfs.

PR: docs/24693
Submitted by: Etienne Vidal <hallik@libertysurf.fr>


71651 25-Jan-2001 bsd

Always print out the target device when the mount fails, not just on
ENOENT.


71645 25-Jan-2001 bsd

Provide a better error message when the /dev entry is non-existant.
Due to the old message, I spent way more time debugging a diskless
root problem than it should have taken.


70427 28-Dec-2000 des

Retire kernfs (userland part).


70152 18-Dec-2000 ru

Prepare for mdoc(7)NG.


69077 23-Nov-2000 ru

mdoc(7) police: misc minor fixes.


69057 22-Nov-2000 phantom

o get rid lfs mentions
o remove non-mdoc groff's instructions


69056 22-Nov-2000 phantom

We do not support lfs. Remove it from list of remountable fs'es.


68960 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


67884 29-Oct-2000 nik

.Xr to mount_ext2fs, mount_hpfs, mount_linprocfs, mount_nwfs, and
mount_std.

PR: docs/20369
Submitted by: bmah


65155 28-Aug-2000 sheldonh

Explain the notion that additional mount options may be described
in mount_XXX manual pages. Remove explicit mention of NFS mount
options, since they are accurately described by this rule.

PR: 20814


65023 23-Aug-2000 sheldonh

Only print information about reads and writes when the -v flag (for
verbose mode) is specified. This should really have been the case
when this extra cruft was first introduced in rev 1.23.

PR: 20710
Reported by: Mike Meyer <mwm@mired.org>


64696 16-Aug-2000 imp

optreset is declared in unistd.h now.


62664 06-Jul-2000 mckusick

Add the snapshot option to mount_ufs.


59801 30-Apr-2000 nik

Removed xref to mount_lfs, this died in 2.mumble.

PR: docs/18272
Submitted by: Michael Lucas <mwlucas@blackhelicopters.org>


57668 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


57384 22-Feb-2000 alfred

Don't scare the users.
Kirk argees that the comment about corruption caused by switching the flags
on an already mounted manpage are bogus, it doesn't happen.

Ok by: mckusick


56038 15-Jan-2000 green

This is another in Martin Blapp's N-series of mount-related cleanups :)
Changes are:
- rpc.umntall is called at the right places now in /etc/rc*
- rpc.umntall timeout has been lowered from two days (too high) to one
- verbose messages in rpc.umntall have been clarified
- kill double entries in /var/db/mounttab when rpc.umntall is invoked
- ${early_nfs_mounts} has been removed from /etc/rc
- patched mount(8) -p to print different pass/dump values for ufs filesystems.
(last patch recieved from dan <bugg@bugg.strangled.net>)

Submitted by: Martin Blapp <mbr@imp.ch>, dan <bugg@bugg.strangled.net>


55118 26-Dec-1999 eivind

Fix tab completion mounts (like /cdrom/)

Submitted by: Martin Blapp <mb@imp.ch>


53976 01-Dec-1999 mckusick

Print out the filesystem read counts now collected by the kernel.

Submitted by: Craig A Soules <soules+@andrew.cmu.edu>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>


52678 30-Oct-1999 green

Fix a few things:

1. Get rid of the evilly bogus strdup(fstab) and free if (fstab == "")
as in umount.
2. Don't use /etc/fstab info if the mount instance does not exactly match
the fstab entry.
3. Reversed the mountpoint checking order in getmntpt().
4. Clarify the "not mounted" error message in mount -u. The previous
"unknown special file or file system" wasn't quite right.
5. Get rid of a 1-byte memory leak; this was reported by jhb.

Submitted by: Martin Blapp <mb@imp.ch>


52095 10-Oct-1999 green

Let a file with '@' or ':' in it take precedence over defaulting to
nfs.


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


52036 08-Oct-1999 n_hibma

- Fixed some cases in which mount was segfaulting.
Original patch from Adrian. Martin added a check for free().

- Included the filesystem type in output of mount

PR: bin/13143
Submitted-By: Martin Blapp <mblapp@kassiopeja.lan.attic.ch>


51763 28-Sep-1999 obrien

Document the "noasync" option.


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


48790 12-Jul-1999 nik

Add $Id$ to these manpages.

Approved by: bde


46620 07-May-1999 jkoshy

Null commit.

> PR: bin/6399
> Submitted by: David Malone <dwmalone@maths.tcd.ie>

Also reviewed by: bde


46619 07-May-1999 jkoshy

1. Enhanced syntax for mount(8). The -o option now supports two 'meta'
options:

-o fstab brings in filesystem options specified in /etc/fstab
-o current incorporates the current set of options for the file
system

The rightmost option wins in the case of conflicting options being
specified.

E.g.:-

# mount -u -o current,nosuid /home

will preserve the current mount options while adding the 'nosuid' flag.

2. Rewording of manual page to be hopefully clearer; small -Wall
cleanups.

Thanks to David Malone for his patience and willingness to work
multiple patches on request.

PR: bin/6399
Submitted by: David Malone <dwmalone@maths.tcd.ie>


45476 08-Apr-1999 ghelmer

modload -> kldload and add ref to kldload(8) in See Also section.

Submitted by: Nathan Ahlstrom <nrahlstr@winternet.com>


44811 16-Mar-1999 bde

Fixed `mount -a -u ...'. Rev.1.19 broke this by trying too hard to
avoid mounting filesystems multiple times.

PR: 10572
Submitted by: Cy Schubert <cy@cschuber.net.gov.bc.ca>


42438 09-Jan-1999 bde

Removed ROOTSLICE_HUNT. The root device is now found better by
getvfsent() in most cases. (The main exception is when /etc/fstab
still hasn't been converted to use a slice for the root device, the
root device is a SCSI device, and the /dev/sd* inode for this device
still hasn't been renamed to /dev/da*.)


40422 16-Oct-1998 des

Warn about "mount -u" bug.


37526 09-Jul-1998 jkoshy

Add a CAVEAT section documenting the minimum permissions required for a mount
point to be traversable in both directions by all users.

PR: 7172


37425 06-Jul-1998 charnier

Remove unused #includes. Spelling. Add rcsid. Do not dot terminate err()
strings.


36772 08-Jun-1998 bde

Print the write counts if they are nonzero even if we're mounted
readonly, since they tell us about previous write activity.

Use the correct format to print the write counts.


36134 17-May-1998 dt

Remove extraneous ")" from output.


35105 08-Apr-1998 wosch

New mount option nosymfollow. If enabled, the kernel lookup()
function will not follow symbolic links on the mounted
file system and return EACCES (Permission denied).


34910 27-Mar-1998 peter

Don't print the 'writes: sync & async' stuff if we're mounted readonly
or if the fs isn't keeping the stats..


34333 08-Mar-1998 jdp

Fix a type mismatch between a scanf format string and the
corresponding argument.


34322 08-Mar-1998 steve

Make this compile again.

PR: 5948
Submitted by: Brian Feldman


34304 08-Mar-1998 msmith

If we are mounting the root filesystem, and we're accessing it through
something that might refer to the compatability slice rather than the
correct slice entry, try all the possible slice entries first.

This is a compatability hack to deal with the case where the kernel has
correctly mounted the root filesystem out of its slice, but the user
has not updated their /etc/fstab file to reflect this. A diagnostic
is emitted if the mount succeeds, indicating that the file should be
updated.

This is a prelude to fixing the kernel to behave as alluded to above.
Reviewed by: (discussed with) julian, phk


34266 08-Mar-1998 julian

Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by: Kirk McKusick (mcKusick@mckusick.com)
Obtained from: WHistle development tree


33304 13-Feb-1998 bde

Converted putfsent() to Lite2 mount interface - don't use numeric
filesystem types.


32645 20-Jan-1998 bde

Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.


31468 01-Dec-1997 steve

Add mount_devfs(8) to the SEE ALSO section.

PR: 5125


31144 13-Nov-1997 julian

Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.


29890 27-Sep-1997 kato

Add noclusterr and noclusterw options. The noclusterr and noclusterw
disable clustered read and write, respectively.

Reviewed by: bde


28738 25-Aug-1997 bde

Removed duplicate MOPT_FORCE and sorted the first one. Rev.1.5 and
Lite2 messed up the ordering differently.


28735 25-Aug-1997 bde

Moved getmntops() stuff back to mntopt.h so that it is visible in other
mount utilities.


28734 25-Aug-1997 bde

Backed out previous commit - don't clobber the (normally equivalent)
default for NOSHARED.


28672 24-Aug-1997 steve

Forgot to cvs add this new file.


28671 24-Aug-1997 steve

Try to avoid mounting filesystems multiple times. Also while
I'm here do some -Wall cleaning.

PR: kern/1839
Reviewed and corrected by: joerg


28658 24-Aug-1997 joerg

Mention the various reasons for messages of the form:

xxxxx filesystem is not available

Inspired by: PR 3311, and a following discussion with Mikhail


28644 24-Aug-1997 steve

Always include the section name in the .Xr macro and cleanup
.Nm macro usage.

PR: docs/3940
Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>


25301 30-Apr-1997 msmith

Fix parsing of mount options with '=' in their name.
PR: bin/3027
Submitted by: Louis Mamakos <louie@TransSys.COM>


25120 23-Apr-1997 ache

Change vfork to fork, too many memory-clobbering actions present in child


24359 29-Mar-1997 imp

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


23805 12-Mar-1997 bde

Finished (?) merging with Lite2: cleaned up #include mess; fixed merging
errors (mis-sorted prototypes, duplicated MNT_NOATIME, duplicated NULL
mntopts fixup).

Updated getopt() usage.

Fixed style bugs in FreeBSD changes (one or two per line for putfsent()
stuff).


23678 11-Mar-1997 peter

Merge from Lite2
- use new getvfsbyname() interface and mount(2) interface

**DANGER WILL ROBINSON!!** You must be running a -current kernel
from within a week or so in order for this to work!


23413 05-Mar-1997 bde

This commit was generated by cvs2svn to compensate for changes in r23412,
which included commits to RCS files with non-trunk default branches.


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.


19592 10-Nov-1996 ache

Add mount_msdos(8) reference
2.2 candidate


18159 08-Sep-1996 dg

Added description of "noatime" option.


18007 03-Sep-1996 dg

Implemented user side of "noatime" mount option. This option disables
the file access time update on reads and can be useful in reducing
filesystem overhead in cases where the access time is not important (like
Usenet news spools).


17891 29-Aug-1996 wosch

[HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41


17243 21-Jul-1996 jkh

I have added a new option -p to the mount command. This was
inspired by SunOS version of mount which uses option -p to
indicate that the mount information should be printed in fstab
format.
This is a neat way to create a new fstab file to use later when
one has modified the mount points or mount options or added or
removed mount some mount points. You just type

mount -p > /etc/fstab.new

and there is your new fstab file ready to be used though you
will of course have to add any necessary noauto flags manually.

[Committers note: This also seems to do the wrong thing for AMD
mounts, but in the more average case this is a nifty feature nonetheless
and one can always edit the bogus entries out]

Submitted-By: Jukka Ukkonen <jau@jau.csc.fi>


16924 02-Jul-1996 wosch

Document that suid wrapper like suidperl(1) break option 'nosuid'.


14626 15-Mar-1996 asami

Change the messages slightly when there is no "mount_type" executable
found when the user specifies "mount -t type". Instead of printing
out one message for each path element (/sbin, /usr/sbin), it prints
out:

mount: exec mount_type not found in /sbin, /usr/sbin: No such file or directory

The code is quite long for such a stupid little piece of aesthesism
but it is very straghtforward so I guess it's ok. Besides, I don't
want to do a "char foo[100];" and have malloc break down when someone
decides to add a few more paths to a variable that's far apart from
this code. :)

By the way, there is no malloc() off-by-one error for the '\0' at the
end of the string although I don't explicitly add 1 to the length.
The code allocates strlen(path element)+2 bytes for each path element,
and doesn't use the last two bytes (for the delimiting ", ").

Reviewed by: the list (I hope)


14566 11-Mar-1996 mpp

Backout my changes to disallow "mount /mnt /mnt" until I can verify
that nfs mounts work again (I locked up my home machine testing it and can't
see what happened until I get home from work tonight).


14474 11-Mar-1996 mpp

Only restrict the user from doing something like "mount /mnt /mnt"
for file system types that actually cause a panic (ufs, msdos, cd9660).
This makes /proc mountable again.


14445 10-Mar-1996 mpp

Do not allow the caller to specify the same path for the special
device file and the mount point. This prevents the "unexpected recursive
lock" panic from happening.

This is a temporary fix. A kernel fix would be much much more ugly than
this, and still wouldn't be the "right" way to fix it. After some
of Terry's file system rework is installed, it will be possible to
properly fix this problem in a clean manner. Until then,
this change should prevent use from getting a problem report
on this every month or so (and I just noticed that someone in
one of the freebsd news groups was complaining about this problem, too).


14350 03-Mar-1996 jkh

Close PR#17. This may be a contraversal fix in that now mount will
spit out two error lines for a bogus filesystem type, e.g:

root@time-> mount -t foo /dev/sd0a /mnt
mount: exec /sbin/mount_foo for /mnt: No such file or directory
mount: exec /usr/sbin/mount_foo for /mnt: No such file or directory

But I would submit that if you're even going to scan multiple directories
for a mount_foo (which I actually think is somewhat bogus - if it's not
in /sbin, you're probably in big trouble anyway), you should emit an error
for each one. I got multiple complaints (in addition to the PR) that the
existing behavior was very confusing.


14004 09-Feb-1996 mpp

Another round of various man page cleanups.


10291 26-Aug-1995 dg

Document the -a option, and mention ``noauto''.


10288 26-Aug-1995 dg

The changes for adding the "noauto" option were mostly wrong. MNT_NOAUTO
is a kernel flag, and the kernel definately doesn't need to know about
it.


10202 23-Aug-1995 jkh

Sigh. This isn't my night. I forgot the manpage updates too!
Thanks, Andrey.


10199 23-Aug-1995 jkh

Add a "noauto" flag so that you can do things like prevent your system
from not coming up multiuser just because you have a CD mount in fstab
but no CD in the drive.
Submitted by: "Full Name Not Supplied" <simon@masi.ibp.fr>


8871 30-May-1995 rgrimes

Remove trailing whitespace.


8530 15-May-1995 dg

Fixed incompleteness that would allow dirty filesystems to get mounted
when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.

Reviewed by: Poul-Henning Kamp, Rod Grimes


8487 12-May-1995 dg

Fix force flag: It is not a "negative" flag. Add MNT_FORCE to the acceptable
options for UFS (which fixes another bug).


6491 16-Feb-1995 bde

Fix another bogon in the change before the last.


6444 15-Feb-1995 dg

Woops, last change wasn't done quite right...fixed.


6441 15-Feb-1995 dg

Verify that the last component of the mount point path exists and is
a directory - allows for better error reporting.


5786 22-Jan-1995 wollman

Document the requirements of dynamic loading on mounting order. Cross-ref
to vfsload(3).


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!)


3202 29-Sep-1994 ache

Add code to skip "userquota"/"groupquota" options needed for
quotaon/quotacheck


2968 22-Sep-1994 wollman

Use getvfs* functions to map between VFS types and names.
Automatically load UFS if it is not present but is loadable.
(This won't happen now, but could happen if we fix NFS diskless support.)


1855 05-Aug-1994 wollman

Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.


1818 02-Aug-1994 dg

Fixed NULL pointer dereference that occured when any options were
specified.


1559 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1558,
which included commits to RCS files with non-trunk default branches.