Commit Graph

99 Commits

Author SHA1 Message Date
ast 7d4f6c34b0 No code change: corrected spelling in comment, removed trailing white spaces. 2013-10-05 08:06:35 +00:00
christos 0a4e19dfb8 use return instead of exit. 2013-01-24 17:53:49 +00:00
christos e5d78d1189 don't print the NULL, but the error 2012-06-14 00:39:33 +00:00
mlelstv 4c4531d7b7 return exit code from mount_XXXX again 2012-04-09 15:50:20 +00:00
christos 338fb03101 use getfsspecname 2012-04-07 04:13:06 +00:00
christos 6ab6e47220 Accept NAME=label for special so that we can wire down our wedges. 2012-04-07 03:13:32 +00:00
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
pooka 2fff573bcd In case we are union-mounting /, don't force MNT_UPDATE. This makes
the following work:

	mount -t tmpfs -o union tmpfs /

(some caveats are implied, such as if you "mkdir /usr" you're
screwed, but then again you'll get there with "rm -rf /usr" even
without union -- we supply rope)

per discussion with zafer, use case for jibbed
2011-01-13 11:57:02 +00:00
pooka ce626609cc Remove puffs| from vfstype before making comparison to determine if
fs is mounted.

Fixes slightly-miscategorized kern/37626.
2010-01-14 21:46:24 +00:00
pooka 707f1f2b92 If getargs and vfs has PUFFS_TYPEPREFIX, use mount_puffs to query args. 2010-01-14 21:30:17 +00:00
yamt f0ea152bc0 disable automatic mountd reloading for now because it makes the service
temporary unavailable.  PR/41331 from FUKAUMI Naoki.
2009-05-04 11:41:48 +00:00
pooka 694167d28f Support mount -o rump, which uses the rump server instead of using
the kernel service.  E.g. "mount -t efs -o rump /dev/sgidev /mnt"
runs effectively "rump_efs /dev/sgidev /mnt".
2009-01-11 20:39:34 +00:00
pooka 4d0f7c6fcd Warn that autoselecting nfs based on : or @ in the device path will
be removed in a future release.
2009-01-11 12:33:50 +00:00
pooka 99fed7264c Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
2008-08-05 20:57:45 +00:00
lukem 6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
christos 7f593965ea cast sizeof() to int for printf widths. 2007-07-17 23:56:01 +00:00
christos a6e0a40b9f kill MFSTYPENAME 2007-07-17 20:13:43 +00:00
christos 2f9c53340f sprinkle volatile. 2006-10-16 02:54:23 +00:00
christos c543e3e4ab since yamt prohibits any flag with MNT_GETARGS, don't set MNT_UPDATE for
/ when we do getargs.
2006-05-04 19:38:50 +00:00
christos 0c9dfbbbdf Coverity CID 1688: Fix memory leak. 2006-03-21 21:37:34 +00:00
rumble e948e1b17f Check for allocation failures in malloc, calloc, realloc, asprintf, and
vasprintf and try to handle them.
2006-03-17 15:53:46 +00:00
christos 2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
lukem 6ac207736c Fix core dump when doing
mount fileserver:/somepath
by not passing a NULL pointer to getfsfile(3).
(Bug was introduced in rev 1.74 as part of fix for PR 28644.)
2005-03-18 04:24:35 +00:00
xtraeme 23bd8cd383 Kill __P(), use ANSI function declarations. 2005-02-05 14:44:46 +00:00
he 66369741ef Move local variable declaration to variable declaration section at
top of function, and at least away from after active code within
a block.  Fixes build problem with gcc 2 (for vax).
2005-01-31 14:18:08 +00:00
erh 897e5cc524 PR #28644: Use realpath to make mount more forgiving of non-canonical
mount paths entered on the command line.
2005-01-31 02:32:35 +00:00
thorpej ef92b0de59 Try the DIOCGWEDGEINFO ioctl first. If that succeeds (i.e. the block
device is a wedge), use the partition type string from the dkwedge_info
structure to get the file system type.
2004-09-25 03:32:52 +00:00
christos 79455d444d Handle RESCUEDIR 2004-08-19 23:00:22 +00:00
enami 15b3a40e8a Print fsid on verbose printing. It is useful when debugging nfs. 2004-04-30 00:48:07 +00:00
hannken f15d491175 Use PRIu64 to printf uint64_t. Compiles again on sparc64. 2004-04-22 10:17:00 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
cgd efddf99c99 Recognize 'from_mount' as the device, which is especially useful when
putting root on NFS.  (From my PR, 20305.)
2004-03-27 06:11:48 +00:00
itojun 6379e11194 realloc pedant 2003-09-19 08:29:58 +00:00
agc 276d62f603 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
jdolecek 4a97217e59 do not link all mount programs into single image; the total size difference
isn't really that huge now that these are compiled as dynamic
2003-01-19 10:49:11 +00:00
enami a1f7b117b6 Cosmetic changes. 2002-09-23 03:39:41 +00:00
enami 0dbc7886c7 Properly terminate the output from mount -v. 2002-09-23 03:35:22 +00:00
christos b7d2f8ff04 make sure options is not NULL before we look in it. Thanks Charles. 2002-09-21 21:30:27 +00:00
christos 9f9ee29713 MNT_GETARGS support 2002-09-21 18:43:31 +00:00
lukem 8f87d6469c if _PATH_RESCUE is defined, try that before _PATH_SBIN & _PATH_USRSBIN 2002-08-23 03:17:18 +00:00
nathanw be856ef968 When attempting to guess the filesystem type from the disklabel, don't
consider a out-of-range partition letter at the end of the special
device node to be a fatal error; just return NULL and let the caller
fall back to FFS.

This fixes the "mount -u /kern/rootdev /" done by the script installer.

XXX this is still gross, and breaks things like
"mount /my/strange/dev/path/b /mnt". Perhaps it should stat the node
and use the minor number as an index instead?
2002-05-21 23:51:19 +00:00
christos bcbaa46862 Use __MNT_FLAGS from <sys/mount.h> instead of rolling our own list. Also
when -v is used, print even the silent flags.
2002-01-30 21:40:31 +00:00
soren dc53bf3cba Sync getopt() / man page with actual getopt options. 2001-12-20 20:10:33 +00:00
tsutsui 899149f1e5 Add x_mount, which does not include any MOUNT_PROGS.
Installer does not require all vfs progs and all binaries
are crunched after all.
2001-02-18 06:15:48 +00:00
enami 4952afaa4f Factor out some function declarations into a header file. 2000-11-01 04:10:02 +00:00
enami 290c3a67ba When failed to read disklabel to deduce filesystem type,
- don't warn.  It's just too verbose when we know there is
	  no disklabel and want to use the default filesystem type.
	- close the file descriptor so that further mount success.
2000-11-01 04:06:49 +00:00
enami a56e1ec458 Cosmetic changes. 2000-11-01 04:01:45 +00:00
jdolecek 366b58f084 mount(8) now includes code for all mount_*(8) but mount_portal(8) and
mount_mfs(8); the mount_*(8) are hardlinked to mount (appropriate mount routine
is called depending on program name) - this saves approx. 1.7MB of /sbin
space
mount.c: make all local symbols static
2000-10-30 21:31:49 +00:00
abs 5d868db883 When determining the filesystem type automatically, only try the raw device
for the disklabel if the given device fails with EBUSY. Also make disklabel
errors non fatal (just fall back to ffs as per pre-autofilesystem behaviour)
Based on further discussion with Launey Thomas <ljt@alum.mit.edu>
2000-10-11 17:56:05 +00:00
is 9979da6cbb Format string cleanups by Bill Sommerfeld. 2000-10-10 20:24:49 +00:00