Commit Graph

6900 Commits

Author SHA1 Message Date
Joel Dahl
46b035eb2e Document the show alias and add an EXAMPLES section. 2012-03-24 06:40:41 +00:00
Mikolaj Golub
f9c5a09cfe Fix typo.
MFC after:	3 days
2012-03-23 20:18:48 +00:00
Bernhard Schmidt
4b25863e5c Also fix the parameter usage in set80211meshpeering().
Submitted by:	Monthadar Al Jaberi
MFC after:	1 week
X-MFC after:	r233328
2012-03-23 18:12:25 +00:00
Adrian Chadd
bde65615f6 Fix an incorrect parameter usage here.
Submitted by:	monthadar@gmail.com
2012-03-22 21:22:58 +00:00
Andrey V. Elsukov
8da4c41364 Document GEOM_PART_LDM scheme and partition types.
MFC after:	1 month
2012-03-19 13:17:47 +00:00
Hans Petter Selasky
56d3acc16c Add option to ignore error codes if the module specified is already loaded.
MFC after:	1 week
2012-03-18 09:45:43 +00:00
Ed Schouten
4c2c7b2c94 Make init(8) slightly more robust when /dev/console is missing.
If the environment doesn't offer a working /dev/console, the existing
version of init(8) will simply refuse running rc(8) scripts. This means
you'll only have a system running init(8) and nothing else.

Change the code to do the following:

- Open /dev/console like we used to do, but make it more robust to use
  O_NONBLOCK to prevent blocking on a carrier.
- If this fails, use /dev/null as stdin and /var/log/init.log as stdout
  and stderr.
- If even this fails, use /dev/null as stdin, stdout and stderr.

So why us this useful? Well, if you remove the `getpid() == 1' check in
main(), you can now use init(8) inside jails to properly execute rc(8).
It still requires some polishing, as existing tools assume init(8) has
PID 1.

Also it is now possible to use use init(8) on `headless' devices that
don't even have a serial boot console.
2012-03-14 16:22:09 +00:00
Edward Tomasz Napierala
cff3dc0871 Add missing "static". 2012-03-14 10:10:15 +00:00
Alexander V. Chernikov
f8bee51a69 - Add ipfw eXtended tables permitting radix to be used for any kind of keys.
- Add support for IPv6 and interface extended tables
- Make number of tables to be loader tunable in range 0..65534.
- Use IP_FW3 opcode for all new extended table cmds

No ABI changes are introduced. Old userland will see valid tables for
IPv4 tables and no entries otherwise. Flush works for any table.

IP_FW3 socket option is used to encapsulate all new opcodes:
 /* IP_FW3 header/opcodes */
 typedef struct _ip_fw3_opheader {
        uint16_t opcode;        /* Operation opcode */
        uint16_t reserved[3];   /* Align to 64-bit boundary */
 } ip_fw3_opheader;

New opcodes added:
 IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST

ipfw(8) table argument parsing behavior is changed:
 'ipfw table 999 add host' now assumes 'host' to be interface name instead of
 hostname.

New tunable:
 net.inet.ip.fw.tables_max controls number of table supported by ipfw in given
 VNET instance. 128 is still the default value.

New syntax:
ipfw add skipto tablearg ip from any to any via table(42) in
ipfw add skipto tablearg ip from any to any via table(4242) out

This is a bit hackish, special interface name '\1' is used to signal interface
table number is passed in p.glob field.

Sponsored by Yandex LLC

Reviewed by:    ae
Approved by:    ae (mentor)

MFC after:      4 weeks
2012-03-12 14:07:57 +00:00
Dimitry Andric
8f061f61db After r232548, clang complains about the apparent '=-' operator (a
left-over from ancient C times, and a frequent typo) in growfs.c:

sbin/growfs/growfs.c:1550:8: error: use of unary operator that may be intended as compound assignment (-=) [-Werror]
        blkno =- 1;
              ^~

Use 'blkno = -1' instead, to silence the error.
2012-03-12 11:15:44 +00:00
Ed Schouten
7a11d7d883 Fix whitespace.
MFC after:	1 week
2012-03-11 22:30:06 +00:00
Dimitry Andric
24c8f29cf4 Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,
and fixing the format string in sbin/fsdb/fsdbutil.c instead.

Note the remark "Work around a problem with format string warnings and
ntohs macros" was actually incorrect.  The DIP(dp, di_nlink) macro
invocation actually returned an int, due to its ternary expression, even
though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode
are both defined as int16_t.

MFC after:	2 weeks
2012-03-09 21:02:39 +00:00
Eitan Adler
84bb842bb4 Fix a variety of grammar and style nits
PR:		docs/165841
Submitted by:	Robert Simmons <rsimmons0@gmail.com>
Approved by:	brd
MFC after:	1 week
2012-03-09 01:32:05 +00:00
Andrew Thompson
a0778b71ad Fix typo and bump the document date which I also forgot.
Spotted by:	Andrey Zonov
2012-03-07 06:25:17 +00:00
Andrew Thompson
86f67641a9 Add the ability to set which packet layers are used for the load balance hash
calculation.
2012-03-06 22:58:13 +00:00
Edward Tomasz Napierala
a1da07403e Make growfs(8) mostly style compliant. No functional changes,
verified with MD5.
2012-03-05 16:37:51 +00:00
Eitan Adler
c0f0c9848e Fix a variety of grammar issues and style nits.
PR:		docs/165668
Submitted by:	Robert Simmons <rsimmons0@gmail.com>
Reviewed by:	kaduk@mit.edu
Approved by:	cperciva
MFC after:	1 week
2012-03-04 16:37:44 +00:00
Luigi Rizzo
fa8d2a59bc remove some write-only variables.
There is another block of code that is now useless as the computation
is done in the kernel.
2012-03-01 17:35:16 +00:00
Christian Brueffer
5640c37256 Update bridge(4) default values.
PR:		164564
Submitted by:	"Rudy (bulk)" <crapsh@monkeybrains.net>
MFC after:	2 weeks
2012-02-29 21:11:02 +00:00
Dimitry Andric
07b202a847 Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang       (disables -Werror)
- NO_WCAST_ALIGN.clang  (disables -Wcast-align)
- NO_WFORMAT.clang	(disables -Wformat and friends)
- CLANG_NO_IAS		(disables integrated assembler)
- CLANG_OPT_SMALL	(adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf!  For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after:	2 weeks
2012-02-28 18:30:18 +00:00
Gavin Atkinson
1748d1e513 Correct capitalization of "Hz" in user-visible text (manpages, printf(),
etc).

MFC after:	3 days
2012-02-28 13:19:34 +00:00
Glen Barber
9d496f5ab6 Whitespace cleanup:
o Wrap sentences on to new lines
 o Cleanup trailing whitespace

Found with:	textproc/igor
MFC after:	1 week
X-MFC-With:	r232157
2012-02-25 15:21:43 +00:00
Glen Barber
3102cfe2e2 Fix various typos in manual pages.
Submitted by:	amdmi3
PR:		165431
MFC after:	1 week
2012-02-25 14:31:25 +00:00
Kevin Lo
29dcf726d2 Handle NULL return from crypt(3). Mostly from DragonFly 2012-02-22 06:27:20 +00:00
Eitan Adler
5bfdf7f990 Remove reference to gsched_as module, which doesn't
actually exist.

PR:		docs/163043
Submitted by:	olgeni
Approved by:	brd
MFC after:	3 days
2012-02-22 04:51:17 +00:00
Robert Millan
9697f9f801 Disable jail support in ifconfig when either building a rescue
image or MK_JAIL knob has been set to "no".

Reviewed by:	bz
Approved by:	adrian (mentor)
2012-02-14 07:14:42 +00:00
Ed Schouten
6b99842ada Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after:	1 month
2012-02-12 18:29:56 +00:00
Ed Schouten
c21ae3a403 Move utmpx handling out of init(8).
This has the following advantages:

- During boot, the BOOT_TIME record is now written right after the file
  systems become writable, but before users are allowed to log in. This
  means that they can't cause `hidden logins' by logging in right before
  init(8) kicks in.

- The pututxline(3) function may potentially block on file locking,
  though this is very rare to occur. By placing it in an rc script, the
  user can still kill it with ^C if needed.

- Most importantly: jails don't use init(8). This means that a force
  reboot of a system running jails will leave stale entries in the
  accounting database of the jails individually.
2012-02-11 20:47:16 +00:00
Pawel Jakub Dawidek
86b914642c Nice range comparison.
MFC after:	3 days
2012-02-11 16:41:52 +00:00
Edward Tomasz Napierala
92858a92e0 Be more helpful about alternate superblocks. 2012-02-10 12:01:19 +00:00
Ed Maste
9a50115921 Add BSD copyright notice.
Approved by:	gordon@
2012-02-07 14:06:30 +00:00
Don Lewis
ec1a0f73d0 Improve sparse file handling when printing the block list for an inode by
not bailing out early when a hole is encountered in the direct block list.
Print NULL block pointers in the direct block list.  Simplify the
code that prints the fragment count.

Match the style of the existing code.

Reviewed by:	mckusick
MFC after:	1 week
2012-02-06 21:50:11 +00:00
Gleb Smirnoff
600103fc0b Bump .Dd for r231076.
Submitted by:	bz
2012-02-06 11:51:04 +00:00
Gleb Smirnoff
23ccd3d976 Make the 'tcpwin' option of ipfw(8) accept ranges and lists.
Submitted by:	sem
2012-02-06 11:35:29 +00:00
Mikolaj Golub
f737157838 If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by:	Artem Kajalainen <artem kayalaynen ru>
Reviewed by:	pjd
MFC after:	1 week
2012-02-05 15:23:32 +00:00
Mikolaj Golub
2b2cb41812 Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by:	pjd
MFC after:	1 week
2012-02-05 15:21:08 +00:00
Hiroki Sato
87a688aaa1 Fix a possible infinite loop in "route flush" on 64-bit archs.
MFC after:	3 days
2012-02-04 17:53:22 +00:00
Pawel Jakub Dawidek
e0a8ef9d47 Fix typo in comment.
MFC after:	3 days
2012-02-04 07:59:12 +00:00
Ed Maste
b7fa166b60 Add -e to set arbitrary kernel environment variables.
Nextboot(8) can now set any combination of kernel name (-k), kernel
options (-o), and environment strings (-e).  As a result of this change
-k also becomes optional.

Reviewed by:	freebsd-current (Ian Lepore, pluknet@, jhb@)
2012-01-31 15:32:05 +00:00
Yoshihiro Takahashi
506bccaff6 Fix build when RELEASE_CRUNCH is defined. 2012-01-29 09:12:34 +00:00
Jaakko Heinonen
f5764938de Remove trailing whitespace. 2012-01-28 13:41:34 +00:00
Edward Tomasz Napierala
77c437734c Rewrite option parsing in mdconfig(8). This makes it more user-friendly
by removing the ordering requirements and adding more descriptive error
messages; it also makes it more readable and maintainable.

Sponsored by:	The FreeBSD Foundation
2012-01-27 11:48:44 +00:00
Kenneth D. Merry
e6bd5983ca Add CAM infrastructure to allow reporting when a drive's long read capacity
data changes.

cam_ccb.h:	Add a new advanced information type, CDAI_TYPE_RCAPLONG,
		for long read capacity data.

cam_xpt_internal.h:
		Add a read capacity data pointer and length to struct cam_ed.

cam_xpt.c:	Free the read capacity buffer when a device goes away.
		While we're here, make sure we don't leak memory for other
		malloced fields in struct cam_ed.

scsi_all.c:	Update the scsi_read_capacity_16() to take a uint8_t * and
		a length instead of just a pointer to the parameter data
		structure.  This will hopefully make this function somewhat
		immune to future changes in the parameter data.

scsi_all.h:	Add some extra bit definitions to struct
		scsi_read_capacity_data_long, and bump up the structure
		size to the full size specified by SBC-3.

		Change the prototype for scsi_read_capacity_16().

scsi_da.c:	Register changes in read capacity data with the transport
		layer.  This allows the transport layer to send out an
		async notification to interested parties.  Update the
		dasetgeom() API.

		Use scsi_extract_sense_len() instead of
		scsi_extract_sense().

scsi_xpt.c:	Add support for the new CDAI_TYPE_RCAPLONG advanced
		information type.

		Make sure we set the physpath pointer to NULL after freeing
		it.  This allows blindly freeing it in the struct cam_ed
		destructor.

sys/param.h:	Bump __FreeBSD_version from 1000005 to 1000006 to make it
		easier for third party drivers to determine that the read
		capacity data async notification is available.

camcontrol.c,
mptutil/mpt_cam.c:
		Update these for the new scsi_read_capacity_16() argument
		structure.

Sponsored by:	Spectra Logic
2012-01-26 18:09:28 +00:00
John Baldwin
0b17c7bea5 Add a timeout on positive name cache entries in the NFS client. That is,
we will only trust a positive name cache entry for a specified amount of
time before falling back to a LOOKUP RPC, even if the ctime for the file
handle matches the cached copy in the name cache entry.  The timeout is
configured via a new 'nametimeo' mount option and defaults to 60 seconds.
It may be set to zero to disable positive name caching entirely.

Reviewed by:	rmacklem
MFC after:	1 week
2012-01-25 20:05:58 +00:00
Pawel Jakub Dawidek
f17b67e14b - Fix documentation to note that /etc/hast.conf is the default configuration
file for hastd(8) and hastctl(8) and not hast.conf.
- In copyright statement correct that this file is documentation, not software.
- Bump date.

MFC after:	3 days
2012-01-24 23:43:13 +00:00
Pawel Jakub Dawidek
4ed472a1cc Free memory that won't be used in child.
MFC after:	1 week
2012-01-22 11:20:42 +00:00
Pawel Jakub Dawidek
2ce9c023fd Fix minor memory leak.
MFC after:	3 days
2012-01-21 20:13:37 +00:00
Edward Tomasz Napierala
89ef44efa3 Replace the beerware license on mdconfig(8) with standard 2-clause BSD.
Approved by:	phk@
2012-01-21 11:48:48 +00:00
Pawel Jakub Dawidek
ba1fa0f17e Remove another unused token.
MFC after:	3 days
2012-01-20 21:49:56 +00:00
Pawel Jakub Dawidek
77213228fd Remove unused token 'port'.
MFC after:	3 days
2012-01-20 21:45:24 +00:00