Commit Graph

22 Commits

Author SHA1 Message Date
mlelstv
fd33bfb7f2 Refactor remaining mount_* commands to use the common pathadj()
function for resolving paths.

Make pathadj() no longer warn about symlinks. Symlinks in /dev are
regularly used in several places like LVM . The warning was also
only visible when calling a mount_* command directly as mount(8)
itself would resolve the path witout warning before passing it to
a mount_* command.
2020-07-26 08:20:22 +00:00
erh
2b151ae574 Eliminate the distinct path check, since the paths don't actually need to be
distinct and allowing this makes certain useful tasks possible, such as
 fixing an unpopulated /dev while a tmpfs is mounted over it.
However, require the paths to be different, as mounting a path directly over
 itself has the side effect of causing any other mount points within that path
 to no longer be accessible, and is difficult to unmount when done on /.
2016-07-25 04:40:51 +00:00
joerg
baa8e84b6f Use __dead 2011-08-29 14:34:58 +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
pooka
704e075311 Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS.  Others worked with < 0,
but make them check against -1 too for consistency.  And sprinkle some
stylish line wrapping where appropriate.
2007-07-16 17:06:52 +00:00
dsl
7af7206539 Add additional 'sizeof args' parameter to mount(2). 2007-07-14 15:57:24 +00:00
christos
5afd1c0a23 use MOPT_NULL 2006-10-16 03:37:42 +00:00
christos
7067dcb9a4 Always check the results of getmntopts() and free them. 2006-03-21 21:11:41 +00:00
xtraeme
60fef07963 Kill __P(), use ANSI function declarations; WARNS=3. 2005-02-05 14:55:44 +00:00
erh
fdd16c549b Fix PR#3617 and PR#3205: call realpath to convert mount points and paths to
device nodes into absolute paths before using them.
2005-01-31 05:19:18 +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
899bce0921 use <> rather than "" for #include mntopts.h 2003-03-22 11:15:45 +00:00
christos
9f9ee29713 MNT_GETARGS support 2002-09-21 18:43:31 +00:00
jdolecek
debb6d80a3 make the code includable into other programs:
* make static all symbols which do not need to be exported
* rename main() to mount_FOO()
* new main() now just calls mount_FOO(), main() is only compiled in if
  MOUNT_NOMAIN is not defined
* a_gid(), a_uid() and a_mask() were put into ../mount/fattr.[ch], local
  versions removed
2000-10-30 20:56:57 +00:00
wrstuden
7c564a9ce6 Update to new mount arguments. 1999-07-08 03:04:39 +00:00
perseant
8847804fc3 Regularize error reporting of mount_* commands for failure of mount(2)
to the form:

	mount_xxx: dev on dir: reason for failure
1999-06-25 19:28:35 +00:00
lukem
0b2c959ebd resolve conflicts from lite-2 merge 1997-09-16 12:26:56 +00:00
lukem
0965d12ed9 * update for WARNS=1
* getopt returns -1 not EOF
* fix .Nm usage
1997-09-15 05:35:37 +00:00
jtc
6397db2ddd Add const qualifier to mopts table 1996-04-13 01:30:59 +00:00
cgd
0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
mycroft
0924c7ec2d Import 4.4-Lite version. 1994-06-13 22:50:46 +00:00
mycroft
5922d844af Update from 4.4-Lite, with local changes. 1994-06-08 19:23:02 +00:00