Commit Graph

38 Commits

Author SHA1 Message Date
Mike Smith
0a9bd6b010 Fix parsing of mount options with '=' in their name.
PR:		bin/3027
Submitted by:	Louis Mamakos <louie@TransSys.COM>
1997-04-30 05:48:22 +00:00
Andrey A. Chernov
7c506958f1 Change vfork to fork, too many memory-clobbering actions present in child 1997-04-23 23:04:58 +00:00
Warner Losh
8d64695c7c compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Bruce Evans
74cf460b66 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).
1997-03-12 18:35:10 +00:00
Peter Wemm
c06fe0a05e 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!
1997-03-11 12:28:00 +00:00
Bruce Evans
2822751af3 This commit was generated by cvs2svn to compensate for changes in r23412,
which included commits to RCS files with non-trunk default branches.
1997-03-05 17:51:21 +00:00
Bruce Evans
92e2d9bed5 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
Peter Wemm
c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Jordan K. Hubbard
1130b656e5 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.
1997-01-14 07:20:47 +00:00
Andrey A. Chernov
677ab44579 Add mount_msdos(8) reference
2.2 candidate
1996-11-10 02:21:05 +00:00
David Greenman
fa9471546d Added description of "noatime" option. 1996-09-08 13:28:12 +00:00
David Greenman
55e50ace1e 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).
1996-09-03 07:13:56 +00:00
Wolfram Schneider
b8923d4cc0 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
Jordan K. Hubbard
a257a45ecd 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>
1996-07-21 23:34:04 +00:00
Wolfram Schneider
b23472acb2 Document that suid wrapper like suidperl(1) break option 'nosuid'. 1996-07-02 23:18:38 +00:00
Satoshi Asami
b6cf6bb275 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)
1996-03-15 00:14:09 +00:00
Mike Pritchard
d5f6aa5f24 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).
1996-03-11 20:01:17 +00:00
Mike Pritchard
bd70de3eaf 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.
1996-03-11 00:22:28 +00:00
Mike Pritchard
d48b626da3 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).
1996-03-10 00:20:28 +00:00
Jordan K. Hubbard
66fa281751 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.
1996-03-03 08:44:22 +00:00
Mike Pritchard
c4c23c4df8 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
David Greenman
c4e9518794 Document the -a option, and mention ``noauto''. 1995-08-26 06:06:15 +00:00
David Greenman
89beb278f7 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.
1995-08-26 05:39:53 +00:00
Jordan K. Hubbard
5411032ad5 Sigh. This isn't my night. I forgot the manpage updates too!
Thanks, Andrey.
1995-08-23 14:14:32 +00:00
Jordan K. Hubbard
81b9534dc5 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>
1995-08-23 12:59:27 +00:00
Rodney W. Grimes
5ebc7e6281 Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
David Greenman
1469eec81e 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
1995-05-15 08:39:37 +00:00
David Greenman
e83d87f1fc Fix force flag: It is not a "negative" flag. Add MNT_FORCE to the acceptable
options for UFS (which fixes another bug).
1995-05-12 23:39:15 +00:00
Bruce Evans
48ab66a1f5 Fix another bogon in the change before the last. 1995-02-16 11:23:25 +00:00
David Greenman
792016e7a4 Woops, last change wasn't done quite right...fixed. 1995-02-15 14:45:08 +00:00
David Greenman
8a978495e7 Verify that the last component of the mount point path exists and is
a directory - allows for better error reporting.
1995-02-15 14:20:50 +00:00
Garrett Wollman
93eb556775 Document the requirements of dynamic loading on mounting order. Cross-ref
to vfsload(3).
1995-01-22 22:54:56 +00:00
Garrett Wollman
3fa88dec7f 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!)
1994-11-01 23:51:53 +00:00
Andrey A. Chernov
0fd4e043f4 Add code to skip "userquota"/"groupquota" options needed for
quotaon/quotacheck
1994-09-29 16:39:26 +00:00
Garrett Wollman
c974f9c6a6 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.)
1994-09-22 02:07:33 +00:00
Garrett Wollman
404c1a5fc1 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.
1994-08-05 02:42:42 +00:00
David Greenman
e05db2e2a5 Fixed NULL pointer dereference that occured when any options were
specified.
1994-08-02 11:42:10 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00