Commit Graph

13520 Commits

Author SHA1 Message Date
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
529d9f352a Warn users when using pkg tools if it looks like they
be be pkgng users.

Reviewed by:	bapt (earlier version)
Reviewed by:	kwm
Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:12:20 +00:00
Eitan Adler
d3522c026f Fix conditional expression: previously a bit vector was being operated
on by a logical not instead of the entire expression.

Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:12:15 +00:00
Ed Schouten
59f3e1891c Move uniq() prototype into extern.h. 2012-10-20 10:34:55 +00:00
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +00:00
Ed Schouten
186475e2dd Remove redundant code.
Both mfi_flash.c and mfi_show.c contain very similar functions to print
a list of firmwares. Move these routines into mfiutil.c.

Reported by:	jhb
2012-10-20 10:20:06 +00:00
Warner Losh
db85bb0492 Indent ecaps the same way we indent caps.
MFC after:	3 days
2012-10-19 22:48:22 +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
Devin Teske
6e0adcda1f More-accurately replicate the help system from sysinstall(8). However, also
improve upon the system by giving the user a "Help" button instead of requiring
the user to press F1.

NOTE: In FreeBSD-9 and higher, dialog(1) does not support the F1 hook, so the
      mechanism for providing help to the user had to be changed to a button.

This now means we can resurrect *.hlp files from usr.sbin/sysinstall/help/ as-
is and reusing them as-needed in bsdconfig (holding to the goal of losing as
little functionality from sysinstall as possible).

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-18 18:43:54 +00:00
Devin Teske
7fba6f489e Fix a bug where blank lines were not being counted (because awk's split()
function returns zero when $0 is the NULL string).

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-18 17:09:45 +00:00
Maksim Yevmenkin
2dcf7e97da make sure that socket's send and receive buffers are properly sized
Submitted by:	Iain Hibbert plunky at rya-online dot net
MFC after:	3 weeks
2012-10-18 16:34:00 +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
Devin Teske
7f72bb4405 Fix typo.
Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-18 07:55:09 +00:00
Maxim Sobolev
27858d0bb4 Fully backout latest changes.
Pointy hat to:	sobomax
2012-10-18 06:27:03 +00:00
Devin Teske
9da4528e6f Ask to become root via sudo(8) and give user ability to save this preference.
Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-17 21:48:45 +00:00
Maxim Sobolev
8675ac22d6 Remove harmless, but superfluous local change that creeped in along
with the r241649.
2012-10-17 21:26:35 +00:00
Maxim Sobolev
07e9aac098 Revert latest changes to cron, until better version is worked out (I hope).
Requested by:   few
2012-10-17 20:45:48 +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
Maxim Sobolev
7bd028861b o Use nanosleep(2) to sleep exact amount of time till the next second,
not multiple of 1 second, which results in actual time to drift back
and forth every run within 1 second of the actual action has
been set for.

Suggested by:   Ian Lepore

o Schedule the first run in 1 second after starting up, not on the
boundary of the next minute, which results in the every_second jobs
not being run.
2012-10-17 00:44:34 +00:00
Maxim Sobolev
890278c188 Properly handle non-keyword case by setting e->second to 0. 2012-10-16 21:34:02 +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
Maxim Sobolev
2543786a37 Add per-second scheduling into the cron(8). Right now it's
only available via the new @every_second shortcut. ENOTIME to
implement crontab(5) format extensions to allow more flexible
scheduling.

In order to address some concerns expressed by Terry Lambert
while discussing the topic few years ago, about per-second cron
possibly causing some bad effects on /etc/crontab by stat()ing
it every second instead of every minute now (i.e. atime update),
only check that database needs to be reloaded on every 60-th
loop run. This should be close enough to the current behaviour.

Add "@every_minute" shortcut while I am here.

MFC after:	1 month
2012-10-15 08:21:49 +00:00
Rick Macklem
e6f3cb32cc Add a description for the '-S' option to the mountd man page.
This is a content change.

Reviewed by:	kib
MFC after:	2 weeks
2012-10-15 00:24:23 +00:00
Rick Macklem
c548eb5cad Add a new '-S' option to mountd, which tells it to suspend
execution of the nfsd threads while it is reloading the exports.
This avoids clients from getting intermittent access errors
when the exports are being reloaded non-atomically.
It is not an ideal solution, since requests will back up while
the nfsd threads are suspended. Also, when this option is used,
if mountd crashes while reloading exports, mountd will have to
be restarted to get the nfsd threads to resume execution.
This has been tested by Vincent Hoffman (vince at unsane.co.uk)
and John Hickey (jh at deterlab.net).
The nfse patch offers a more comprehensive solution for this issue.

PR:		kern/9619, kern/131342
Reviewed by:	kib
MFC after:	2 weeks
2012-10-15 00:17:16 +00:00
Devin Teske
42cdd52718 Mirror the changes made in SVN r240798:
Replace "( : ${var?} )" syntax with better "[ ${var+set} ]" syntax.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-14 23:45:56 +00:00
Joel Dahl
a01d461b70 Remove cvs/cvsup reference. 2012-10-14 10:12:32 +00:00
Devin Teske
25408c853d SVN r240684 broke the ability of the dot module to map include dependencies.
Teach the dot module about the new location these includes moved to (as part
of r240684) and clean things up a bit.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-13 03:56:33 +00:00
Nick Hibma
b79d36786c Some 3G modems return the wrong signature in echo packets and make it
impossible to use LQR/ECHO. They return want_magic instead.

With this change it is now possible to use

	enable lqr
	set lqrperiod 5
	enable echo
	set echoperiod 5

in your ppp.conf file.

MFC after:	3 days
2012-10-12 22:48:33 +00:00
John Baldwin
c388f51ab4 - Fix the error message when a dependency string is not provided to
reference a missing dependency rather than a missing compile command.
- Don't append a newline to the auto-generated compile command.  The
  compile command has a newline appended when it is later output to the
  Makefile.

MFC after:	2 weeks
2012-10-10 14:47:46 +00:00
Joel Dahl
4d36343e3a Minor mdoc fixes. 2012-10-07 19:53:04 +00:00
Marcel Moolenaar
0815243c39 Add support for bmake. This includes:
1.  Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
    there's a bootstrap complication in ths respect. Avoid it. Make the
    necessary changes to have upgrade_checks work wth bmake anyway.
2.  Remove the use of -E. It's not needed in our build because we use ?= for
    the respective variables, which means that we'll take the environment
    value (if any) anyway.
3.  Properly declare phony targets as phony as bmake is a lot smarter (and
    thus agressive) about build avoidance.
4.  Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
    smarter about build avoidance and should not find files we generate in
    the source tree. We should not have files in the repository we want to
    generate, but this is an easier way to cross this hurdle.
5.  Have behavior under bmake the same as it is under make with respect to
    halting when sub-commands fail. Add "set -e" to compound commands so
    that bmake is informed when sub-commands fail.
6.  Make sure crunchgen uses the same make as the rest of the build. This
    is important when the make utility isn't called make (but bmake for
    example).
7.  While here, add support for using MAKEOBJDIR to set the object tree
    location. It's the second alternative bmake looks for when determining
    the actual object directory (= .OBJDIR).

Submitted by:	Simon Gerraty <sjg@juniper.net>
Submitted by:	John Van Horne <jvanhorne@juniper.net>
2012-10-06 20:01:05 +00:00
Joel Dahl
3dacd67e46 mdoc: begin sentences on a new line. 2012-10-06 06:07:33 +00:00
Joel Dahl
be15d0e4dc Minor mdoc fix. 2012-10-06 06:02:29 +00:00
Joel Dahl
9a09c4db0e Remove trailing whitespace. 2012-10-06 05:54:41 +00:00
Xin LI
d09a7e67b9 MFV: tcpdump 4.3.0.
MFC after:	4 weeks
2012-10-05 20:19:28 +00:00
Gleb Smirnoff
ffe9c13e2a Provide ability for printing and decoding pfsync(4) traffic. This
doesn't mean supporting IFT_PFSYNC (which I hope will eventually
die). This means decoding packets with IP protocol of 240 caught
on any normal interface like Ethernet.

  The code is based on couple of files from OpenBSD, significantly
modified by myself.

  Parser differentiates for four levels of verbosity: no -v, -v,
-vv and -vvv.

  We don't yet forward this code upstream, because currently it
strongly relies on if_pfsync.h and even on pfvar.h. I hope that
this can be fixed in future.

Reviewed by:	gnn, delphij
2012-10-05 07:51:21 +00:00
Doug Barton
3aec794146 Remove references to CVS so that people will stop bringing it up
For -p:
	The localtime update should have been excluded in the first place

	The make.conf comparison has been OBE for some time now, and there
	is no src.conf equivalent to share/examples/make.conf, so remove
	the whole thing.

Update copyright
2012-10-05 05:01:42 +00:00
John Baldwin
338666582f Display the matrix of inter-domain distances in the SLIT table. This is
used to complement the SRAT table on NUMA machines.

MFC after:	1 week
2012-10-04 20:00:32 +00:00
Jamie Gritton
01591cd540 Move properly to the next parameter when jailparam_init fails
(i.e. on an unknown parameter), to avoid freeing bogus pointers.
2012-10-04 18:59:46 +00:00
Joel Dahl
50936af6e1 Fix HISTORY. 2012-10-04 06:33:03 +00:00
Niclas Zeising
872d9e3906 Sort manual page cross references.
Approved by:	joel (mentor)
2012-10-03 21:56:16 +00:00
Niclas Zeising
f41e2a4d49 Remove whitespace at EOL
Approved by:	joel (mentor)
2012-10-03 21:50:53 +00:00
Devin Teske
2a357efa9c Import sysutils/sysrc from the ports tree (current version 5.1). Importing
disconnected under the WITH_BSDCONFIG flag (a good idea since this version of
sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)).

Multiple reasons sysrc should not simply continue to live in ports. The most
important being that it is tightly coupled with the base.

Approved by:	adrian (co-mentor)
2012-10-03 02:32:47 +00:00
Eitan Adler
4544286921 Fix alignment related warnings reported by gcc
Switch from old style arguments to modern C
remove WARNS as a result

tested with "make universe"

Approved by:	cperciva
MFC after:	1 week
2012-10-02 14:48:03 +00:00
Sergey Kandaurov
b94db03dca mdoc: point to an existing cross reference. 2012-10-02 09:53:50 +00:00
Sergey Kandaurov
24e4c29c6e Fix build with LOG_FILE undefined and DEBUGGING disabled. 2012-10-02 09:23:16 +00:00
Sergey Kandaurov
9281629f0e Fix build with DEBUGGING disabled. 2012-10-02 09:19:28 +00:00
Baptiste Daroussin
e7e5ec8773 Do not treat empty name as an uid 0
Reported by:	Robert Bonomi <bonomi@mail.r-bonomi.com>
2012-10-01 17:00:33 +00:00
Baptiste Daroussin
e6e9c14bdf Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a
number.
This also allow pw user show to work as expected.

PR:		bin/172112
Submitted by:	"Ilya A. Arkhipov" <rum1cro@yandex.ru>
MFC after:	1 month
2012-10-01 16:42:07 +00:00