Commit Graph

39 Commits

Author SHA1 Message Date
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Jung-uk Kim
7039dfb32f GC unused variables. Prefer NULL over 0 for pointers. 2013-03-05 22:41:35 +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
Alexander Leidinger
9bf9af1004 Fix minor memory leak in a function.
MFC after:	1 week
2009-11-20 15:28:38 +00:00
Tai-hwa Liang
cc2c6edb77 Fixing multi-session disc mount by passing the correct "ssector" option
to the kernel.

Submitted by:	Enache Adrian <enache at rdslink dot ro>
2005-12-19 05:52:37 +00:00
Tai-hwa Liang
4acc9672b5 It turns out that set_charset() invokes build_iovec() which modifies
iov address internally through realloc(3).  However, since the function
parameter wasn't designed to allow the modified iov being passed back to
the caller, we end up feeding iov with several corrupted entries(depends on
how many arguments were pushed into iovec before set_charset()) to nmount(2).

This commit fixes this regression introduced in rev1.31 such that
mount_cd9660(8) with code page conversion option(-C) enabled works again.

Reviewed by:	rodrigc
2005-11-25 19:48:53 +00:00
Craig Rodrigues
fe4ad3bc06 Convert mount_cd9660 to use nmount(). 2005-11-13 01:39:55 +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
Ruslan Ermilov
bcd84fb7e3 Sync usage() and SYNOPSIS. 2004-11-13 17:26:54 +00:00
Mark Murray
4c723140a4 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
Max Khon
0f4e4130e1 Make msdosfs long filenames matching case insensitive again.
PR:		59765
Submitted by:	Ryuichiro Imura <imura@ryu16.org>
2003-12-08 08:32:20 +00:00
Tom Rhodes
1476864b52 Use 'const' in the copyright stamp, this is done in other utilities.
Return linker.h to the includes list.

No objection from:	wollman (for the copyright)
2003-11-04 21:04:14 +00:00
Tom Rhodes
b34553a3ab Revert the first part of my previous change.
Requested by:	wollman
2003-11-01 16:57:19 +00:00
Tom Rhodes
31212c21bf The copywrite is not a 'static char', remove the #ifdefs and move the copywrite up
into the commented out 'copywrite' section.

Include sys/linker.h for kldload(3).
2003-11-01 15:58:06 +00:00
Max Khon
c4f02a891f - Support for multibyte charsets in LIBICONV.
- CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options
(with corresponding modules).
- kiconv(3) for loadable charset conversion tables support.

Submitted by:	Ryuichiro Imura <imura@ryu16.org>
2003-09-26 20:26:25 +00:00
Tom Rhodes
ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Maxime Henrion
7b333193e0 This should have been committed too, I have no idea
why p4 didn't gave me this diff too.
2002-08-03 17:05:14 +00:00
Maxime Henrion
526ba6d32b Now that the kernel is able to load modules itself,
remove all the code which was trying to do so.
This code was nasty in several ways, it was hiding
the kernel bug where the kernel was unable to properly
load a module, and it was quitting if it wasn't able
to load the module.  The consequence is that an ABI
breakage of the vfsconf API would have broken *every*
mount utility.
2002-08-03 16:03:21 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Boris Popov
8c602ed981 Update userland interface for broken Joilet disks.
Reviewed by:	adrian
2001-03-11 10:06:28 +00:00
Brian S. Dean
f59091e7cd Print out the target device when the mount fails. 2001-01-25 20:05:34 +00:00
Poul-Henning Kamp
73dd316734 mount* fixes from Martin Blapp <mb@imp.ch>:
Made mount more userfriendly (bad slashes are now filtered out)
        and we remove in mount_nfs trailing slashes if there are any.

        Fixed mount_xxx binarys to resolve with realpath(3)
        the mountpoint.

        Translate the deprecated nfs-syntax with '@' to ':' .
        The ':' syntax has now precedence, but '@' still works.
        Notify the user that the '@' syntax should not be used.

PR: 7846
PR: 13692
Submitted by:   Martin Blapp <mb@imp.ch>
Reviewed by:    phk
1999-10-09 11:54:14 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Daniel C. Sobral
44e568e2a1 Add support for Joliet extensions to the iso9660 fs. The related PR
cannot yet be closed, though.

I hope I got all credits right, and that the multiple submitted by lines
do not break anyone's scripts...

PR:		kern/5038, kern/5567
Submitted by:	Keith Jang <keith@email.gcn.net.tw>
Submitted by:	Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de>
Submitted by:	Byung Yang <byung@wam.umd.edu>
Submitted by:	Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
1999-04-18 10:58:03 +00:00
Joerg Wunsch
d6ef03d3fa Userland part of ISO9660 multi-session support. mount_cd9660(8) will
now by default mount the last data track (thus last session), as
opposed to the very first session it has been mounting previously.
This is consistent with the ISO9660 multi-session idea, and the way
other operating systems are working.

There's support to mount arbitrary sessions using the -s option.  This
way, you can simulate multi-session CDs on something like vn devices
that don't support CDIO* ioctl commands.  You can also force the
historic behaviour with

	mount -t cd9660 -o -s=0 /dev/cd0a /cdrom
1997-04-29 15:56:40 +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
Peter Wemm
4a4c52857e Merge from Lite2 (use new getvfsbyname() and mount(2) interface) 1997-03-11 12:40:45 +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
Garrett Wollman
5e074e31a2 Get rid of the last vestiges of the old MOUNT_* constants in the
mount_* programs.  While we're at it, collapse the four now-identical
mount programs for devfs, fdesc, kernfs, and procfs into links to
a new mount_std(8) which can mount any really generic filesystem
such as these when called with the appropriate argv[0].

Also, convert the mount programs to use sysexits.h.
1996-05-13 17:43:19 +00:00
David Greenman
2ee6a63f1f Include the special device in the error output so that it makes sense. 1995-02-15 14:29:26 +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
Garrett Wollman
d599144d24 Automatically load NFS and a bevy of other filesystems. 1994-09-22 22:17:02 +00:00
David Greenman
6052587146 Get rid of the need for the readonly mandatory option - set readonly
flags regardless of whether the user specified it.
1994-09-07 15:07:43 +00:00
David Greenman
87006abef6 Don't call getmntopts with a null pointer as an option string; it'll
dereference it. Pass optarg from getopts as it should have been done.
This bug caused mount_cd9660 to segfault whenever -o was used.
1994-08-02 11:45:43 +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