Commit Graph

7061 Commits

Author SHA1 Message Date
Warren Block
2f78ba90f4 Add an example showing the use of gnop(8) to skip over header data.
PR:		kern/145999
Reviewed by:	mjg
MFC after:	1 week
2012-11-04 03:19:07 +00:00
Jaakko Heinonen
2923ae8a85 Print a newline after the error message.
PR:		bin/168447
Submitted by:	Boris Kochergin
2012-11-03 09:18:37 +00:00
Alfred Perlstein
4a790edd1b Document that you can use -v along with -l.
Noticed by: pjd
2012-11-02 17:30:08 +00:00
Andrey V. Elsukov
ffdbf9da3b Remove the recently added sysctl variable net.pfil.forward.
Instead, add protocol specific mbuf flags M_IP_NEXTHOP and
M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain
contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup
only when this flag is set.

Suggested by:	andre
2012-11-02 01:20:55 +00:00
Alfred Perlstein
f6848434fe Add an option to display the current dump device via dumpon -l.
MFC after:	2 weeks
2012-11-01 18:59:19 +00:00
Edward Tomasz Napierala
549f62fa42 Fix problem with geom_label(4) not recognizing UFS labels on filesystems
extended using growfs(8).  The problem here is that geom_label checks if
the filesystem size recorded in UFS superblock is equal to the provider
(i.e. device) size.  This check cannot be removed due to backward
compatibility.  On the other hand, in most cases growfs(8) cannot set
fs_size in the superblock to match the provider size, because, differently
from newfs(8), it cannot recompute cylinder group sizes.

To fix this problem, add another superblock field, fs_providersize, used
only for this purpose.  The geom_label(4) will attach if either fs_size
(filesystem created with newfs(8)) or fs_providersize (filesystem expanded
using growfs(8)) matches the device size.

PR:		kern/165962
Reviewed by:	mckusick
Sponsored by:	FreeBSD Foundation
2012-10-30 21:32:10 +00:00
Edward Tomasz Napierala
05d43d9882 Declare functions as static and move global variables to the top;
no functional changes.
2012-10-28 19:38:42 +00:00
Andrey V. Elsukov
c1de64a495 Remove the IPFIREWALL_FORWARD kernel option and make possible to turn
on the related functionality in the runtime via the sysctl variable
net.pfil.forward. It is turned off by default.

Sponsored by:	Yandex LLC
Discussed with:	net@
MFC after:	2 weeks
2012-10-25 09:39:14 +00:00
Eitan Adler
1d1d4a4727 Check the return error of set[ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.  Custom
security modules, or future implementations of the setuid and setgid
may fail.

PR:		bin/172289
PR:		bin/172290
PR:		bin/172291
Submittud by:	Erik Cederstrand <erik@cederstrand.dk>
Discussed by:	freebsd-security
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:31:22 +00:00
Eitan Adler
50e04779c4 Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Submitted by:	Erik Cederstrand
Approved by:	cperciva
MFC after:	3 days
2012-10-22 03:07:05 +00:00
Eitan Adler
db702c59cf remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
Eitan Adler
73ea379e32 Add support for gjournal to dumpfs
PR:		165821
Submitted by:	Andreas Longwitz <longwitz@incore.de>
Approved by:	cperciva
MFC after:	3 days
2012-10-22 03:00:20 +00:00
Ulrich Spörlein
3bbc4438c9 Make fsck and fsck_msdosfs WARNS=6 clean
- sprinkle const
- add volatile qualifier to avoid vfork clobbering

Inspired by:	NetBSD
PR:		bin/139802
Reviewed by:	ed
2012-10-21 12:01:19 +00:00
Ulrich Spörlein
6cf357bc6c sbin/fsck: s/perror/perr/ to avoid shadowing
- rename some other vars too
- merge NetBSD license changes

Obtained from:	NetBSD
PR:		bin/139802
Reviewed by:	ed
2012-10-21 12:01:11 +00:00
Andriy Gapon
fcc6af50f0 document acpi_cpu devd notification about _CST change
Based on prodding and a submission by Lars Engels <lars.engels@0x20.net>.

MFC after:	5 days
2012-10-20 09:40:34 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
Ed Schouten
39893d565a Add missing const keywords. 2012-10-19 14:29:03 +00:00
Ed Schouten
ae824d80f2 Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.
2012-10-19 05:43:38 +00:00
Attilio Rao
2e564269d0 Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.
2012-10-18 12:04:56 +00:00
Attilio Rao
a42ac676f5 Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.
2012-10-17 11:30:00 +00:00
Attilio Rao
e6116d5b8e Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.
2012-10-17 11:16:17 +00:00
Attilio Rao
55793cdccf Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 09:59:10 +00:00
Eitan Adler
429233171b Fix minor nits:
use a comma after "i.e."
sentences begin on new lines.

No .Dd bump for trivial modification.

Approved by:	wblock
MFC after:	3 days
2012-10-15 13:20:08 +00:00
Joel Dahl
d0fd6bb00e Remove trailing whitespace. 2012-10-14 07:22:56 +00:00
Joel Dahl
33656abea6 Minor mdoc and language fixes. 2012-10-14 07:19:42 +00:00
Attilio Rao
d14cfe6e65 getopt_long() returns an int. Use the return value accordingly.
Pointy hat to:	me
MFC after:	2 months
X-MFC:		r241519,241521
2012-10-14 03:59:17 +00:00
Attilio Rao
5fe580195f Import a FreeBSD port of the FUSE Linux module.
This has been developed during 2 summer of code mandates and being revived
by gnn recently.
The functionality in this commit mirrors entirely content of fusefs-kmod
port, which doesn't need to be installed anymore for -CURRENT setups.

In order to get some sparse technical notes, please refer to:
http://lists.freebsd.org/pipermail/freebsd-fs/2012-March/013876.html

or to the project branch:
svn://svn.freebsd.org/base/projects/fuse/

which also contains granular history of changes happened during port
refinements. This commit does not came from the branch reintegration
itself because it seems svn is not behaving properly for this functionaly
at the moment.

Partly Sponsored by:		Google, Summer of Code program 2005, 2011
Originally submitted by:	ilya, Csaba Henk <csaba-ml AT creo DOT hu >
In collabouration with:		pho
Tested by:			flo, gnn, Gustau Perez,
				Kevin Oberman <rkoberman AT gmail DOT com>
MFC after:			2 months
2012-10-13 23:54:26 +00:00
Gleb Smirnoff
a1ce87eced - Get rid of #ifdef __FreeBSD__.
- Use correct format when printing uint64_t.
2012-09-29 16:42:01 +00:00
Matthew D Fleming
a1c9ec3ce0 Fix some nearby type and style errors.
Pointed out by:	bde
2012-09-28 17:34:34 +00:00
Matthew D Fleming
e25a029eb2 Fix sbin/ build with a 64-bit ino_t.
Original code by:	Gleb Kurtsou
2012-09-27 23:31:06 +00:00
Matthew D Fleming
623d7cb663 Fix fsck_ffs build with a 64-bit ino_t.
Original code by:	Gleb Kurtsou
2012-09-27 23:30:58 +00:00
Alexander V. Chernikov
26dd50684e Whitespace fixes
MFC after:	2 weeks
2012-09-24 17:34:30 +00:00
Alexander V. Chernikov
7e00325dff Permit table to be used as IPv6 address.
Reported by:	Serhiy Popov <sergiuspso@ukr.net>
MFC after:	2 weeks
2012-09-24 17:31:08 +00:00
Pawel Jakub Dawidek
901610f4b8 Use O_CLOEXEC for open instead of separate fcntl(2) call. 2012-09-22 12:42:51 +00:00
Benjamin Kaduk
2aecf1d196 Fix grammar in the portion about FIBs. Also, cross-reference
setfib(2) instead of setfib(1) for the 16-FIB limit.

PR:		docs/157452
Approved by:	hrs (mentor)
2012-09-18 16:00:44 +00:00
Joel Dahl
b93e731fd4 mdoc: remove superfluous paragraph macro. 2012-09-18 08:12:28 +00:00
Benjamin Kaduk
3a99e819f3 Whitespace cleanup for ipfw.8 -- start each sentence on a new line,
and put a comma after e.g. and i.e..  While here, wrap long lines.

PR:		docs/157452
Approved by:	hrs (mentor)
2012-09-18 02:33:23 +00:00
Jim Harris
a724927cf3 Integrate nvmecontrol(8) into the amd64 and i386 builds.
This includes adding NVMe header files to /usr/include/dev/nvme.

Sponsored by:  Intel
2012-09-17 21:41:38 +00:00
Jim Harris
4cb79292f7 Add nvmecontrol(8) source code and beginnings of a man page to the tree.
Sponsored by:		Intel
Contributions from:	Joe Golio/EMC <joseph dot golio at emc dot com>
2012-09-17 21:26:55 +00:00
Joel Dahl
86dcb2ee7f Minor mdoc fix. 2012-09-14 13:14:48 +00:00
Gleb Smirnoff
3b3a8eb937 o Create directory sys/netpfil, where all packet filters should
reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c		-> sys/netpfil/pf/
sys/contrib/pf/net/*.h		-> sys/net/
contrib/pf/pfctl/*.c		-> sbin/pfctl
contrib/pf/pfctl/*.h		-> sbin/pfctl
contrib/pf/pfctl/pfctl.8	-> sbin/pfctl
contrib/pf/pfctl/*.4		-> share/man/man4
contrib/pf/pfctl/*.5		-> share/man/man5

sys/netinet/ipfw		-> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with:		bz, luigi
2012-09-14 11:51:49 +00:00
Alexander Motin
c89d2fbe18 Add global and per-module sysctls/tunables to enable/disable metadata taste.
That should help to handle some cases when disk has some RAID metadata that
should be ignored, especially during boot.

MFC after:	3 days
2012-09-13 13:27:09 +00:00
Andrey Zonov
0cf7f1865b - Fix a typo in debug message.
Approved by:	kib (mentor)
MFC after:	3 days
2012-09-13 12:55:10 +00:00
David E. O'Brien
4a83537505 Remove needless (int) casts of write(2)'s 3rd argument.
Also change blwrite() 'size' parameter to a ssize_t to better match
write(2).
2012-09-12 15:36:44 +00:00
David E. O'Brien
bd3c72d0d8 Simply printf-like strings and outdent strings so that it is easy to see
if they fit on a standard terminal.
2012-09-12 14:59:57 +00:00
Kevin Lo
3dedcef753 Remove unused values 2012-09-11 07:54:41 +00:00
Ed Schouten
902d9eafbf Rework all non-contributed files that use `struct timezone'.
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

	int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
2012-09-01 14:45:15 +00:00
Dag-Erling Smørgrav
5454cb96ef Change the gptboot example so the boot partition is aligned on a 4 kB
boundary.

MFC after:	3 days
2012-08-29 15:18:56 +00:00
Brooks Davis
447e5996dd Don't overwrite the global default CFLAGS when setting include paths.
MFC after:	3 days
2012-08-28 14:20:41 +00:00
Isabell Long
2368efbed4 Link ipfilter(4) and ipfilter(5) to the build to stop the wrong man page
displaying for 'man 4 ipfilter'.

PR:		docs/118020
Approved by:	gjb (mentor)
MFC after:	5 days
2012-08-28 12:33:54 +00:00