Commit Graph

205 Commits

Author SHA1 Message Date
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Poul-Henning Kamp
306d73d61e Align -p output in TAB built columns suitable for /etc/fstab. 2007-04-13 21:30:47 +00:00
Craig Rodrigues
5b54856414 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>
2007-02-06 05:57:40 +00:00
Pawel Jakub Dawidek
e9988ceda3 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.
2007-02-02 23:58:10 +00:00
Craig Rodrigues
011b5486c5 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().
2006-12-07 03:24:43 +00:00
Craig Rodrigues
c195c7f618 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
2006-11-14 01:07:42 +00:00
Pawel Jakub Dawidek
ac88569c5a 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
2006-10-31 21:54:51 +00:00
Ruslan Ermilov
49a41c4f52 Two tiny style fixes. 2006-10-24 22:16:51 +00:00
Ruslan Ermilov
3cbf527e8d 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
2006-10-24 22:02:29 +00:00
Ruslan Ermilov
8266d47670 Markup fixes. 2006-09-18 11:55:10 +00:00
Dag-Erling Smørgrav
7410947271 Fix markup snafu.
Spotted by:	ru
2006-09-14 13:47:55 +00:00
Daniel Gerzo
d6649c2569 Re-word the description of the "async" flag.
Suggested by: Milos Vyletel (mv@rulez.sk)
Reviewed by: ru
Approved by: keramida (mentor), trhodes (mentor)
2006-09-08 13:47:39 +00:00
Dag-Erling Smørgrav
4b4f91707c 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
2006-07-12 16:05:51 +00:00
Juli Mallett
4796c6cc6e Minor style tweaks while nearby. Namely ANSIfy and parens on return values. 2006-06-10 01:44:57 +00:00
Juli Mallett
5256cc2152 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.
2006-06-10 01:37:00 +00:00
Craig Rodrigues
19996233cc Fix "mount -u -o ro".
Requested by:	maxim
2006-06-02 17:53:46 +00:00
Craig Rodrigues
067eb35dd0 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().
2006-05-19 00:04:18 +00:00
Craig Rodrigues
c002dbe6a7 Remove reference to mount_ext2fs(8), add reference to ext2fs(5).
mount no longer invokes mount_ext2fs, it calls nmount() directly
with fstype "ext2fs".
2006-05-17 23:29:11 +00:00
Maxim Konovalov
6e74fb9dff o Extend rev. 1.75 and restore an ability to specify a non-default
quota files location.

Submitted by:	Kostik Belousov
2006-05-10 14:40:40 +00:00
Giorgos Keramidas
3ae7ea6834 When there are no mount options, an implicit "rw" should be printed in
the output of ``mount -p''.

Approved by:	rodrigc
2006-03-03 02:46:15 +00:00
Craig Rodrigues
88e2c33564 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.
2006-02-25 05:09:47 +00:00
Craig Rodrigues
7c5347ae86 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.
2006-02-25 00:47:53 +00:00
Pawel Jakub Dawidek
093a8c9e1b s/<space><tab>/<tab>/ 2006-01-24 15:26:36 +00:00
Pawel Jakub Dawidek
90742659d7 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
2006-01-18 11:00:34 +00:00
Pav Lucistnik
09b03f4714 - Xref mount_reiserfs(8)
PR:		docs/90902
Submitted by:	Scott Robbins <scottro@nyc.rr.com>
MFC after:	3 days
2006-01-10 15:56:46 +00:00
Craig Rodrigues
cf9e56b04e For reiserfs, pass mount parameters directly to nmount() instead
of forking an external mount_reiserfs program.

Reviewed by:	dumbbell
2005-12-12 19:51:37 +00:00
Craig Rodrigues
f6db44904f Remove workaround for old GCC bugs.
Submitted by:	ru
2005-12-03 19:59:35 +00:00
Craig Rodrigues
748e259bc4 Simplify parsing of mount options by passing
"rw" option down to kernel, since vfs_donmount() can now parse it.
2005-12-03 01:57:58 +00:00
Craig Rodrigues
30cb180f7c Remove unsupported "dev" option from comments of mntopts.h.
Requested by:	jkoshy
2005-12-02 03:55:02 +00:00
Craig Rodrigues
2207c7648e 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
2005-11-29 00:28:17 +00:00
Tai-hwa Liang
6973ce04c4 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
2005-11-24 17:35:05 +00:00
Ruslan Ermilov
8bec746911 Fix prototype. 2005-11-24 14:27:53 +00:00
Craig Rodrigues
7f2444598a Remove UFS-specific parts from mount(8).
For mounting UFS, all mount options are passed directly to nmount(),
without any UFS-specific logic.
2005-11-23 23:22:56 +00:00
Craig Rodrigues
35d6c7f50e 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
2005-11-23 20:17:27 +00:00
Craig Rodrigues
b1e6b7123d For mounting a UFS filesystem, call nmount() directly, instead of having
special logic which called mount() in a separate mount_ufs() function.
2005-11-21 22:07:54 +00:00
Craig Rodrigues
d9fa6ce711 Do not pass noauto to nmount() or external mount program.
Noticed by:	maxim
2005-11-16 02:13:27 +00:00
Craig Rodrigues
9fce8c898e 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
2005-11-14 17:39:00 +00:00
Craig Rodrigues
b19e74ca20 - 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
2005-11-13 01:27:57 +00:00
Craig Rodrigues
6f5f1a6b3e - 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
2005-11-12 20:12:56 +00:00
Craig Rodrigues
066b4c1658 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes. 2005-10-07 06:39:08 +00:00
Craig Rodrigues
429cd02cab Bump WARNS up to 3. 2005-10-07 02:22:48 +00:00
Craig Rodrigues
aedf10aca9 In prmount(), use an unsigned int variable to eliminate
'comparison between signed and unsigned' compiler warning.
2005-10-07 02:22:04 +00:00
Craig Rodrigues
e24dc56a22 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
Make prototype in extern.h match prototype in mount_ufs.c
2005-10-07 02:18:20 +00:00
Christian Brueffer
e16a2150d3 Remove Xref to mount_hpfs(8), it's not hooked up to the build.
Approved by:	re (blanket)
MFC after:	3 days
2005-06-16 21:35:33 +00:00
Xin LI
46b7a14ba4 Use MOPT_END in favor of MOPT_NULL, which better describes the purporse
of the macro.
2005-06-10 09:51:43 +00:00
Xin LI
73ac45052f 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.
2005-06-01 09:39:36 +00:00
Colin Percival
6e34b4796d 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@)
2005-03-26 04:45:53 +00:00
Colin Percival
18a3dd1e34 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
2005-03-23 04:17:48 +00:00
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Ruslan Ermilov
6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00