Commit Graph

291 Commits

Author SHA1 Message Date
Brooks Davis
b32720888a Add a free_iovec() function to reset iovec's.
The primary purpose is to call nmount() in a loop with new iovec's so
free_iovec takes arguments by reference and resets their values.

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8513
2016-12-14 21:26:43 +00:00
Pedro F. Giffuni
8967299b33 mount(1): Simplify by using asprintf(3)
Instead of strlen() + malloc() + snprintf, just use asprintf().
No functional change.

Obtained from:	OpenBSD (CVS Rev. 1.67)
2016-09-19 18:42:58 +00:00
Glen Barber
406d87b1c3 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Ulrich Spörlein
e96092e82b Fix type mismatches for malloc(3) and Co.
Found by:	clang static analyzer
Reviewed by:	ed
Differential Revision:	https://reviews.freebsd.org/D4722
2015-12-29 11:24:35 +00:00
Alan Somers
b5bbeb2117 Fix "mount -a" for NFS and ZFS filesystems with shared mountpoints
sbin/mount.c
	Check whether an fstab entry has the same fstype as a mounted
	filesystem before declaring it to be mounted. This will allow NFS
	filesystems that share a mountpoint with a local filesystem to be
	automatically mounted at boot.

	This is not such an unusual situation. For example, if somebody uses
	the standard installer with a ZFS root, he'll get a /usr/home
	filesystem, even though he may choose to mount /usr/home over NFS.

Reviewed by:	trasz
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4556
2015-12-21 22:19:22 +00:00
Enji Cooper
3f18b7fa12 Replace /dev/acd0 with /dev/cd1
atapicd(4) has been removed since r249083, and if a system has more than one
optical drive, it will likely be /dev/cd1

Update mount.conf(8) to reflect the change in behavior

MFC after: never
Sponsored by: EMC / Isilon Storage Division
2015-10-17 08:51:10 +00:00
Enji Cooper
0b0d825ad8 Replace references to /dev/acd0 with /dev/cd0
atapicd(4) was replaced by cd(4) with the atacam work done by
mav@ and then removed in r249083

X-MFC to: stable/10
MFC after: 2 weeks
2015-10-13 17:14:27 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Edward Tomasz Napierala
4e25c86f4c Remove some oldnfs remnants.
Differential Revision:	https://reviews.freebsd.org/D2287
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-18 16:08:06 +00:00
Joel Dahl
c09eb46601 mdoc: improvements to SEE ALSO. 2014-12-27 08:22:58 +00:00
Edward Tomasz Napierala
be3a49ee62 Add fstyp(8). This utility, named after its SVR4 counterpart, detects
filesystems.  It differs from file(1) in that it gives machine-parseable
output, it outputs filesystem labels, doesn't get confused by other
formats metadata, and runs in Capsicum sandbox.

Differential Revision:	https://reviews.freebsd.org/D1255
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-12-10 14:14:16 +00:00
Baptiste Daroussin
13eb765f2d Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
Edward Tomasz Napierala
9df66c85e3 Cross-reference automount(8) from mount(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-22 16:43:36 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Edward Tomasz Napierala
543bed9345 Add description for the "automounted" mount flag.
Reviewed by:	emaste@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-20 13:52:47 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Edward Tomasz Napierala
3914ddf8a7 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
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-17 09:44:42 +00:00
Steven Kreuzer
47350fa594 Mention tmpfs(5)
PR:		192389
Submitted by:	yaneurabeya@gmail.com
Approved by:	hrs (mentor)
2014-08-06 14:38:09 +00:00
Baptiste Daroussin
bd0891ceb3 use .Mt to mark up email addresses consistently (part1)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Joel Dahl
050da67038 Minor mdoc fixes. 2013-07-18 05:46:33 +00:00
Craig Rodrigues
0d6422dd87 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
2013-07-17 19:32:07 +00:00
Robert Millan
fc98db27df Add -n flag for compatibility with Linux version of mount(8).
Reviewed by: freebsd-fs, eadler, mckusick, jh, wblock
2013-07-15 21:57:21 +00:00
Davide Italiano
237abf0c56 - 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.
2013-06-28 21:00:08 +00:00
Jaakko Heinonen
4feadec3c4 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
2013-06-07 07:17:46 +00:00
Chris Rees
b48b774f99 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
2013-05-04 14:00:16 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Attilio Rao
2e564269d0 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.
2012-10-18 12:04:56 +00:00
Attilio Rao
a42ac676f5 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.
2012-10-17 11:30:00 +00:00
Attilio Rao
e6116d5b8e 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.
2012-10-17 11:16:17 +00:00
Attilio Rao
55793cdccf Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 09:59:10 +00:00
Eitan Adler
429233171b 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
2012-10-15 13:20:08 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Eitan Adler
747943148c 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
2012-07-12 15:20:20 +00:00
Warren Block
344c81a166 Fixes to man8 groff mandoc style, usage mistakes, or typos.
PR:		168016
Submitted by:	Nobuyuki Koganemaru
Approved by:	gjb
MFC after:	3 days
2012-05-24 02:24:03 +00:00
Jaakko Heinonen
f3ee32b285 Don't print the nmount(2) provided error message if it is empty. 2012-01-20 12:59:12 +00:00
Jaakko Heinonen
84d5bd0560 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
2012-01-20 10:06:28 +00:00
Jaakko Heinonen
b8f532c5b7 - Clean up checkpath().
- Remove unneeded sysexits.h include.

No functional change.

Submitted by:	bde
2012-01-20 07:29:29 +00:00
Jaakko Heinonen
d325001438 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)
2012-01-16 19:34:21 +00:00
Ed Schouten
1efe3c6b58 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.
2011-11-04 13:36:02 +00:00
John Baldwin
d2e17ce906 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
2011-09-02 17:11:59 +00:00
Kirk McKusick
fddf7baebe 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)
2011-07-30 00:43:18 +00:00
Kirk McKusick
d716efa9f7 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)
2011-07-24 18:27:09 +00:00
Xin LI
c73830758a 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
2011-06-07 18:48:49 +00:00