]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agobcd isn't installed setuid.
Eitan Adler [Mon, 22 Oct 2012 03:06:53 +0000 (03:06 +0000)]
bcd isn't installed setuid.
caesar isn't installed setuid.

For the archaeologists:
it seems this call originally came from NetBSD PR 5970 and 5945

PR: 172566
Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Approved by: cperciva
MFC after: 3 days

11 years agoSysinstall has been removed from base.
Eitan Adler [Mon, 22 Oct 2012 03:00:43 +0000 (03:00 +0000)]
Sysinstall has been removed from base.

Approved by: cperciva

11 years agoremove duplicate semicolons where possible.
Eitan Adler [Mon, 22 Oct 2012 03:00:37 +0000 (03:00 +0000)]
remove duplicate semicolons where possible.

Approved by: cperciva
MFC after: 1 week

11 years agoMake uhid attach to devices that look like keyboards
Eitan Adler [Mon, 22 Oct 2012 03:00:25 +0000 (03:00 +0000)]
Make uhid attach to devices that look like keyboards
or mice if the quirk which prevents higher level
drivers from attaching is set.

PR: usb/172458
Submitted by: Vitaly Magerya <vmagerya@gmail.com>
Reviewed by: hselasky
Approved by: cperciva
MFC after: 1 week

11 years agoAdd support for gjournal to dumpfs
Eitan Adler [Mon, 22 Oct 2012 03:00:20 +0000 (03:00 +0000)]
Add support for gjournal to dumpfs

PR: 165821
Submitted by: Andreas Longwitz <longwitz@incore.de>
Approved by: cperciva
MFC after: 3 days

11 years agoImplement HTTP 305 redirect handling.
Eitan Adler [Mon, 22 Oct 2012 03:00:15 +0000 (03:00 +0000)]
Implement HTTP 305 redirect handling.

PR: 172452
Submitted by: gcooper
Reviewed by: des
Approved by: cperciva
MFC after: 1 week

11 years agoDon't deny non-temporary redirects if the -A option is set (per
Eitan Adler [Mon, 22 Oct 2012 03:00:10 +0000 (03:00 +0000)]
Don't deny non-temporary redirects if the -A option is set (per
the man page) [0]

While here add support for draft-reschke-http-status-308-07

PR: 172451 [0]
Submitted by: gcooper [0]
Reviewed by: des
Approved by: cperciva
MFC after: 1 week

11 years agoBe a bit more lenient in the maximum number of redirects allowed.
Eitan Adler [Mon, 22 Oct 2012 03:00:04 +0000 (03:00 +0000)]
Be a bit more lenient in the maximum number of redirects allowed.
Chrome and Firefox have a limit of 20. IE has a limit of 8.

Reviewed by: des
Approved by: cperciva
MFC after: 3 days

11 years agoRemove unused variable. Newer versions of gcc care.
Eitan Adler [Mon, 22 Oct 2012 02:59:59 +0000 (02:59 +0000)]
Remove unused variable. Newer versions of gcc care.

Submitted by: Sascha Wildner <saw@online.de>
Approved by: cperciva
MFC after: 3 days

11 years agoFix build if COMPAT_43 is defined without one of
Eitan Adler [Mon, 22 Oct 2012 02:59:55 +0000 (02:59 +0000)]
Fix build if COMPAT_43 is defined without one of
COMPAT_FREEBSD[4567]

Approved by: cperciva

11 years agoRemove {harp,hfa,idt} man pages as they were removed in r179308.
Eitan Adler [Mon, 22 Oct 2012 02:59:49 +0000 (02:59 +0000)]
Remove {harp,hfa,idt} man pages as they were removed in r179308.

PR: docs/171234
Submitted by: Martin Birgmeier <Martin.Birgmeier@aon.at>
Reviewed by: rwatson
Approved by: cperciva
MFC after: 3 days

11 years agoFix conditional expression: previously a bitvector would be operated
Eitan Adler [Mon, 22 Oct 2012 02:59:44 +0000 (02:59 +0000)]
Fix conditional expression: previously a bitvector would be operated
on by a logical not.

Approved by: cperciva
MFC after: 3 days

11 years agoMake do_uniq work with python3
Eitan Adler [Mon, 22 Oct 2012 02:29:56 +0000 (02:29 +0000)]
Make do_uniq work with python3

Approved by: cperciva
MFC after: 3 days

11 years agoMake xen python scripts work with python3
Eitan Adler [Mon, 22 Oct 2012 02:29:53 +0000 (02:29 +0000)]
Make xen python scripts work with python3

Approved by: cperciva
MFC after: 3 days

11 years agoCovert regression test to python 3
Eitan Adler [Mon, 22 Oct 2012 02:29:44 +0000 (02:29 +0000)]
Covert regression test to python 3

Approved by: cperciva
MFC after: 3 days

11 years agoDon't repeat the POSTREAD dma sync.
Tim Kientzle [Mon, 22 Oct 2012 02:28:48 +0000 (02:28 +0000)]
Don't repeat the POSTREAD dma sync.

11 years agoWarn users when using pkg tools if it looks like they
Eitan Adler [Mon, 22 Oct 2012 02:12:20 +0000 (02:12 +0000)]
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

11 years agoFix conditional expression: previously a bit vector was being operated
Eitan Adler [Mon, 22 Oct 2012 02:12:15 +0000 (02:12 +0000)]
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

11 years agoFinish migration of MAINTAINER entries
Eitan Adler [Mon, 22 Oct 2012 02:12:11 +0000 (02:12 +0000)]
Finish migration of MAINTAINER entries

Approved by: cperciva
MFC after: 3 days

11 years agoMark bsdar_errc as __dead2 to help code analysis tools.
Eitan Adler [Mon, 22 Oct 2012 02:12:06 +0000 (02:12 +0000)]
Mark bsdar_errc as __dead2 to help code analysis tools.

PR: bin/172636
Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Approved by: cperciva
MFC after: 3 days

11 years agoCovert to python 3
Eitan Adler [Mon, 22 Oct 2012 02:12:02 +0000 (02:12 +0000)]
Covert to python 3

Approved by: cperciva
MFC after: 3 days

11 years agoPrint flags as hex instead of an integer.
Eitan Adler [Mon, 22 Oct 2012 02:11:57 +0000 (02:11 +0000)]
Print flags as hex instead of an integer.

PR: kern/168210
Submitted by: linimon
Reviewed by: alc
Approved by: cperciva
MFC after: 3 days

11 years agoUpdate after adding WITHOUT_ATF.
Marcel Moolenaar [Mon, 22 Oct 2012 02:05:09 +0000 (02:05 +0000)]
Update after adding WITHOUT_ATF.

11 years agoAdd ATF to the build. This is may be a bit rought around the egdes,
Marcel Moolenaar [Mon, 22 Oct 2012 01:18:41 +0000 (01:18 +0000)]
Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by: Garrett Cooper <yanegomi@gmail.com>
Sponsored by: Isilon Systems
Based on work by: keramida@
Thanks to: gnn@, mdf@, mlaier@, sjg@
Special thanks to: keramida@

11 years agoMake the Wii GPIO driver a separate device.
Rui Paulo [Sun, 21 Oct 2012 22:27:55 +0000 (22:27 +0000)]
Make the Wii GPIO driver a separate device.

11 years agoFix the top comment.
Rui Paulo [Sun, 21 Oct 2012 22:27:21 +0000 (22:27 +0000)]
Fix the top comment.

11 years agoAdd a config file for the Wii.
Rui Paulo [Sun, 21 Oct 2012 22:24:28 +0000 (22:24 +0000)]
Add a config file for the Wii.

11 years agoUpdate dialog to 20120706: includes minor useability enhancements and
Nathan Whitehorn [Sun, 21 Oct 2012 18:25:12 +0000 (18:25 +0000)]
Update dialog to 20120706: includes minor useability enhancements and
fixes for warnings encountered with clang.

11 years agoImport dialog-1.1-20120706
Nathan Whitehorn [Sun, 21 Oct 2012 18:18:09 +0000 (18:18 +0000)]
Import dialog-1.1-20120706

11 years agoAdd the flags parameter to the disk_open() function and DISK_F_NOCACHE
Andrey V. Elsukov [Sun, 21 Oct 2012 12:14:58 +0000 (12:14 +0000)]
Add the flags parameter to the disk_open() function and DISK_F_NOCACHE
flag, that disables the caching of partition tables metadata.
Use this flag for floppies in the libi386/biosdisk driver.

11 years agoMake fsck and fsck_msdosfs WARNS=6 clean
Ulrich Spörlein [Sun, 21 Oct 2012 12:01:19 +0000 (12:01 +0000)]
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

11 years agosbin/fsck: s/perror/perr/ to avoid shadowing
Ulrich Spörlein [Sun, 21 Oct 2012 12:01:11 +0000 (12:01 +0000)]
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

11 years agoFix build.
Andreas Tobler [Sun, 21 Oct 2012 08:38:55 +0000 (08:38 +0000)]
Fix build.

11 years agoAdd "options WII".
Rui Paulo [Sun, 21 Oct 2012 04:02:34 +0000 (04:02 +0000)]
Add "options WII".

11 years agoAdd support for iPhone 5 tethering.
Eitan Adler [Sun, 21 Oct 2012 03:30:36 +0000 (03:30 +0000)]
Add support for iPhone 5 tethering.

PR: usb/172172
Submitted by: Ali Mashtizadeh <mashtizadeh@gmail.com>
Approved by: cperciva
MFC after: 1 week

11 years agoUpdate ktr(4) to reflect changes from r239923.
Glen Barber [Sat, 20 Oct 2012 23:13:09 +0000 (23:13 +0000)]
Update ktr(4) to reflect changes from r239923.

Reviewed by: attilio

11 years agoRevert r241752. The claim that it's more correct while at the same time
Marcel Moolenaar [Sat, 20 Oct 2012 22:44:22 +0000 (22:44 +0000)]
Revert r241752. The claim that it's more correct while at the same time
causing a build breakage is interesting to say the least.

11 years agoGrammar fixes to r241781.
Andre Oppermann [Sat, 20 Oct 2012 19:38:22 +0000 (19:38 +0000)]
Grammar fixes to r241781.

Submitted by: alc

11 years agoSet default for ${pkg_info} like ${pkg_version}.
Hajimu UMEMOTO [Sat, 20 Oct 2012 18:13:20 +0000 (18:13 +0000)]
Set default for ${pkg_info} like ${pkg_version}.

MFC after: 1 week

11 years agoUse correct INDEX on 10-CURRENT.
Hajimu UMEMOTO [Sat, 20 Oct 2012 18:05:27 +0000 (18:05 +0000)]
Use correct INDEX on 10-CURRENT.

11 years agoboot: use -march=i386 for both i386 and amd64 builds
Andriy Gapon [Sat, 20 Oct 2012 16:57:23 +0000 (16:57 +0000)]
boot: use -march=i386 for both i386 and amd64 builds

.. so that consistent compilation algorithms are used for both
architectures as in practice the binaries are expected to be
interchangeable (for time being).
Previously i386 used default setting which were equivalent to
-march=i486 -mtune=generic.
The only difference is using smaller but slower "leave" instructions.

Discussed with: jhb, dim
MFC after: 29 days

11 years agoAdds 4K quirks for the some SSD's which all perform better when 4K
Eitan Adler [Sat, 20 Oct 2012 15:30:14 +0000 (15:30 +0000)]
Adds 4K quirks for the some SSD's which all perform better when 4K
aligned and only except 4K deletes (TRIM).

PR: kern/169974
Submitted by: Steven Hartland <steven.hartland@multiplay.co.uk>
Tested by: ak
Reviewed by: mav
Approved by: cperciva (implicit)
MFC after: 1 week

11 years agopkg_add is no more the default tool, make motd recommand using pkg install instead...
Baptiste Daroussin [Sat, 20 Oct 2012 14:54:49 +0000 (14:54 +0000)]
pkg_add is no more the default tool, make motd recommand using pkg install instead of pkg_add

11 years agoHide the unfortunate named sysctl kern.ipc.somaxconn from sysctl -a
Andre Oppermann [Sat, 20 Oct 2012 12:53:14 +0000 (12:53 +0000)]
Hide the unfortunate named sysctl kern.ipc.somaxconn from sysctl -a
output and replace it with a new visible sysctl kern.ipc.acceptqueue
of the same functionality.  It specifies the maximum length of the
accept queue on a listen socket.

The old kern.ipc.somaxconn remains available for reading and writing
for compatibility reasons so that existing programs, scripts and
configurations continue to work.  There no plans to ever remove the
orginal and now hidden kern.ipc.somaxconn.

11 years ago- Give PIL_PREEMPT the lowest priority just above low/stray interrupts.
Marius Strobl [Sat, 20 Oct 2012 12:07:48 +0000 (12:07 +0000)]
- Give PIL_PREEMPT the lowest priority just above low/stray interrupts.
  The reason for this is that the SPARC v9 architecture allows nested
  interrupts of higher priority/level than that of the current interrupt
  to occur (and we can't just entirely bypass this model, also, at least
  for tick interrupts, this also wouldn't be wise). However, when a
  preemption interrupt interrupts another interrupt of lower priority,
  f.e. PIL_ITHREAD, and that one in turn is nested by a third interrupt,
  f.e. PIL_TICK, with SCHED_ULE the execution of interrupts higher than
  PIL_PREEMPT may be migrated to another CPU. In particular, tl1_ret(),
  which is responsible for restoring the state of the CPU prior to entry
  to the interrupt based on the (also migrated) trap frame, then is run
  on a CPU which actually didn't receive the interrupt in question,
  causing an inappropriate processor interrupt level to be "restored".
  In turn, this causes interrupts of the first level, i.e. PIL_ITHREAD
  in the above scenario, to be blocked on the target of the migration
  until the correct PIL happens to be restored again on that CPU again.
  Making PIL_PREEMPT the lowest real priority, this effectively prevents
  this scenario from happening, as preemption interrupts no longer can
  interrupt any other interrupt besides stray ones (which is no issue).
  Thanks to attilio@ and especially mav@ for helping me to understand
  this problem at the 201208DevSummit.
- Give PIL_STOP (which is also used for IPI_STOP_HARD, given that there's
  no real equivalent to NMIs on SPARC v9) the highest possible priority
  just below the hardwired PIL_TICK, so it has a chance to interrupt
  more things.

MFC after: 1 week

11 years agoTidy up somaxconn (accept queue limit) and related functions
Andre Oppermann [Sat, 20 Oct 2012 10:51:32 +0000 (10:51 +0000)]
Tidy up somaxconn (accept queue limit) and related functions
and move it together into one place.

11 years agoMove uniq() prototype into extern.h.
Ed Schouten [Sat, 20 Oct 2012 10:34:55 +0000 (10:34 +0000)]
Move uniq() prototype into extern.h.

11 years agoMore -Wmissing-variable-declarations fixes.
Ed Schouten [Sat, 20 Oct 2012 10:33:15 +0000 (10:33 +0000)]
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.

11 years agoRemove redundant code.
Ed Schouten [Sat, 20 Oct 2012 10:20:06 +0000 (10:20 +0000)]
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

11 years agostrcmp(3) will suffice here, also follow the style of the remaining file more closely.
Ulrich Spörlein [Sat, 20 Oct 2012 10:16:55 +0000 (10:16 +0000)]
strcmp(3) will suffice here, also follow the style of the remaining file more closely.

Prodded by: ed

11 years agoApply local patches to mandoc and connect it to the build.
Ulrich Spörlein [Sat, 20 Oct 2012 10:06:38 +0000 (10:06 +0000)]
Apply local patches to mandoc and connect it to the build.

- adds a couple more library strings used in the tree
- changes some more to the current groff spelling
- changes page footer to match groff style

11 years agozfs: wait in arc_lowmem only if curproc == pageproc
Andriy Gapon [Sat, 20 Oct 2012 10:02:18 +0000 (10:02 +0000)]
zfs: wait in arc_lowmem only if curproc == pageproc

... otherwise the current thread might be holding ARC locks and thus run
into a deadlock.  This happens, for example, when a thread does memory
allocation in the ARC code and runs into KVA shortage.
Also, it really makes the most sense to wait in pageproc, so that the
results of ARC reclamation are seen before the page cache is acted upon.
In other cases where vm_lowmem is invoked, e.g. on KVA space shortage,
the callers perform multiple attempts (up to 8) and wait for rather
long intervals between them (up to 4 seconds), so ARC reclaim results
should become visible even without explicit waiting on the ARC thread.

Note that this is not a critical issue for typical ZFS usages where KVA
space should already be large enough.  On amd64 systems setting KVA size
to twice the physical memory size is known to mitigate KVA fragmentation
issues in practice.

Side note: perhaps vm_lowmem 'how' parameter should be used to
differentiate between causes of the event.

Reported by: Nikolay Denev <ndenev@gmail.com>
MFC after: 19 days

11 years agodocument acpi_cpu devd notification about _CST change
Andriy Gapon [Sat, 20 Oct 2012 09:40:34 +0000 (09:40 +0000)]
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

11 years ago- KTR_ENTRIES may be an arbitrary number, remove the sentence about
Kevin Lo [Sat, 20 Oct 2012 08:06:31 +0000 (08:06 +0000)]
- KTR_ENTRIES may be an arbitrary number, remove the sentence about
  power of two.
- Mention the run time mask is set to block any tracing by default.

Reviewed by: jhb

11 years agoDon't lose the 255'th disk behind the initiator.
John W. De Boskey [Fri, 19 Oct 2012 23:42:45 +0000 (23:42 +0000)]
Don't lose the 255'th disk behind the initiator.

Reviewed by: ken@
MFC after: 1 month

11 years agoAdd missing Extended Capability ID Numbers from PCIe 3.0.
Warner Losh [Fri, 19 Oct 2012 23:10:55 +0000 (23:10 +0000)]
Add missing Extended Capability ID Numbers from PCIe 3.0.

11 years agoIndent ecaps the same way we indent caps.
Warner Losh [Fri, 19 Oct 2012 22:48:22 +0000 (22:48 +0000)]
Indent ecaps the same way we indent caps.

MFC after: 3 days

11 years agoDocument the method used to compute expf. Taken from exp, with
Warner Losh [Fri, 19 Oct 2012 22:47:44 +0000 (22:47 +0000)]
Document the method used to compute expf.  Taken from exp, with
changes to reflect differences in computation between the two.

11 years agoDocument the methods used to compute logf. Taken and edited from the
Warner Losh [Fri, 19 Oct 2012 22:46:48 +0000 (22:46 +0000)]
Document the methods used to compute logf. Taken and edited from the
double version, with adaptations for the differences between it and
the float version.

11 years agoMerge mandoc from vendor into contrib and provide the necessary Makefile glue.
Ulrich Spörlein [Fri, 19 Oct 2012 22:21:01 +0000 (22:21 +0000)]
Merge mandoc from vendor into contrib and provide the necessary Makefile glue.

It's not yet connected to the build.

11 years agoIntegrate changes from LSI vendor driver 10.80.00.005 to FreeBSD.
Xin LI [Fri, 19 Oct 2012 22:07:40 +0000 (22:07 +0000)]
Integrate changes from LSI vendor driver 10.80.00.005 to FreeBSD.

PR: kern/172833
Submitted by: "Charles O'Donnell" <cao bus net>
MFC after: 1 week

11 years agoImprove upon the previous commit to fix the yacc rule.
Marcel Moolenaar [Fri, 19 Oct 2012 20:13:08 +0000 (20:13 +0000)]
Improve upon the previous commit to fix the yacc rule.
1.  Have the resulting C file depend on the resulting H
    file as it should be. Touch the C file to make sure
    the C file is newer than the H file to keep make
    happy.
2.  Apply the same fix to the other instance of .ORDER,
    missed in the previous commit.

11 years agoFix a bootstrapping problem where the first bmake (built by FreeBSD's
Marcel Moolenaar [Fri, 19 Oct 2012 19:56:17 +0000 (19:56 +0000)]
Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

11 years agoUse M_NOWAIT when calling malloc with a lock held.
Ed Maste [Fri, 19 Oct 2012 19:28:35 +0000 (19:28 +0000)]
Use M_NOWAIT when calling malloc with a lock held.

The check for a NULL return was already in place so I assume this was just
an oversight.

11 years agoWhen checking to see if a video output's _ADR matches an entry in the
John Baldwin [Fri, 19 Oct 2012 19:17:43 +0000 (19:17 +0000)]
When checking to see if a video output's _ADR matches an entry in the
parent adapter's _DOD list, only check the low 16 bits of both _ADR and
_DOD.  The language in the ACPI spec seems to indicate that the _ADR values
should exactly match the entries in _DOD.  However, I assume that the
masking added to _DOD values was added to work around some known busted
machines (the commit history doesn't indicate either way), and the ACPI
spec does require that the low 16 bits are unique for all video outputs,
so only check the low 16 bits should be fine.

This fixes recognition of video outputs that use the new standardized
device ID scheme in ACPI 3.0 that set bit 31 such as certain Dell laptops.

Tested by: Juergen Lock  nox  jelal kn-bremen de
MFC after: 3 days

11 years agoRemove trailing whitespace.
Joel Dahl [Fri, 19 Oct 2012 18:30:50 +0000 (18:30 +0000)]
Remove trailing whitespace.

11 years agoUpdate man page crossreferences to sandybridge xeon class
Sean Bruno [Fri, 19 Oct 2012 17:21:10 +0000 (17:21 +0000)]
Update man page crossreferences to sandybridge xeon class

MFC after: 2 weeks

11 years ago- Remove an unused header.
Marius Strobl [Fri, 19 Oct 2012 17:12:55 +0000 (17:12 +0000)]
- Remove an unused header.
- Don't waste a delay slot.

MFC after: 3 days

11 years agoFix kernel build with options ZFS after r240868.
Marius Strobl [Fri, 19 Oct 2012 17:03:50 +0000 (17:03 +0000)]
Fix kernel build with options ZFS after r240868.

11 years agoUpdate hwpmc to support the Xeon class of Sandybridge processors.
Sean Bruno [Fri, 19 Oct 2012 17:01:27 +0000 (17:01 +0000)]
Update hwpmc to support the Xeon class of Sandybridge processors.
(Model 0x2D     /* Per Intel document 253669-044US 08/2012. */)

Add manpage to document all the goodness that is available in this
processor model.

No support for uncore events at this time.

Submitted by: hiren panchasara <hiren.panchasara@gmail.com>
Reviewed by: jimharris@ fabient@
Obtained from: Yahoo! Inc.
MFC after:   2 weeks

11 years agoMore -Wmissing-variable-declarations fixes.
Ed Schouten [Fri, 19 Oct 2012 14:49:42 +0000 (14:49 +0000)]
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'.

11 years agoAdd missing const keywords.
Ed Schouten [Fri, 19 Oct 2012 14:29:03 +0000 (14:29 +0000)]
Add missing const keywords.

11 years ago- Update cachelimit after hashsize and bucketlimit were set.
Andrey Zonov [Fri, 19 Oct 2012 14:00:03 +0000 (14:00 +0000)]
- Update cachelimit after hashsize and bucketlimit were set.

Reported by: az
Reviewed by: melifaro
Approved by: kib (mentor)
MFC after: 1 week

11 years agoLet SCHED_ULE give affinity to the CPU the tick interrupt triggered on
Marius Strobl [Fri, 19 Oct 2012 13:32:37 +0000 (13:32 +0000)]
Let SCHED_ULE give affinity to the CPU the tick interrupt triggered on
when running tick_process(), similarly to what the x86 equivalents of
this function do, however employing the less racy sequence also used in
intr_event_handle().

MFC after: 3 days

11 years agoPrefer __containerof() over __member2struct().
Ed Schouten [Fri, 19 Oct 2012 13:26:40 +0000 (13:26 +0000)]
Prefer __containerof() over __member2struct().

The former works better with qualifiers, but also properly type checks
the input pointer.

11 years agoReplace our version of the pwcache(3) API with NetBSD's implementation.
Brooks Davis [Fri, 19 Oct 2012 12:44:22 +0000 (12:44 +0000)]
Replace our version of the pwcache(3) API with NetBSD's implementation.

This adds two features:
 * uid_from_user() and gid_from_group() as the reverse of user_from_uid()
   and groups_from_gid().
 * pwcache_userdb() and pwcache_groupdb() which allow alternative lookup
   functions to be used.  For example lookups from passwd and group
   databases in a non-standard location.

11 years agoCorrect the order of the MFU and MRU labels. I had reversed them.
John Baldwin [Fri, 19 Oct 2012 12:28:26 +0000 (12:28 +0000)]
Correct the order of the MFU and MRU labels.  I had reversed them.

Submitted by: Nikolay Denev  ndenev gmail
Pointy hat to: jhb
MFC after: 3 days

11 years agoMove socket UMA zone initialization functionality together into
Andre Oppermann [Fri, 19 Oct 2012 12:16:29 +0000 (12:16 +0000)]
Move socket UMA zone initialization functionality together into
one place.

11 years agoFix minor whitespace issues.
Joel Dahl [Fri, 19 Oct 2012 10:38:32 +0000 (10:38 +0000)]
Fix minor whitespace issues.

11 years agoMove UMA socket zone initialization from uipc_domain.c to uipc_socket.c
Andre Oppermann [Fri, 19 Oct 2012 10:15:32 +0000 (10:15 +0000)]
Move UMA socket zone initialization from uipc_domain.c to uipc_socket.c
into one place next to its other related functions to avoid confusion.

11 years agoUpdate to previous r241688 to use __func__ instead of spelled out function
Andre Oppermann [Fri, 19 Oct 2012 10:07:55 +0000 (10:07 +0000)]
Update to previous r241688 to use __func__ instead of spelled out function
name in log(9) message.

Suggested by: glebius

11 years agoRemove splimp() comment from sysinit table and attribute SI_SUB_PROTO_BEGIN
Andre Oppermann [Fri, 19 Oct 2012 10:04:43 +0000 (10:04 +0000)]
Remove splimp() comment from sysinit table and attribute SI_SUB_PROTO_BEGIN
and SI_SUB_PROTO_END to VNET related initializations.

MFC after: 3 days

11 years agoFix build.
Gleb Smirnoff [Fri, 19 Oct 2012 09:41:45 +0000 (09:41 +0000)]
Fix build.

11 years agoReplace deprecated M_DONTWAIT with M_NOWAIT.
Tim Kientzle [Fri, 19 Oct 2012 05:50:56 +0000 (05:50 +0000)]
Replace deprecated M_DONTWAIT with M_NOWAIT.

11 years agoFix warnings found by -Wmising-variable-declarations.
Ed Schouten [Fri, 19 Oct 2012 05:43:38 +0000 (05:43 +0000)]
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.

11 years agoThis is an import of code, mostly from Giuseppe Lettieri,
Luigi Rizzo [Fri, 19 Oct 2012 04:13:12 +0000 (04:13 +0000)]
This is an import of code, mostly from Giuseppe Lettieri,
that revises the netmap memory allocator so that the
various parameters (number and size of buffers, rings, descriptors)
can be modified at runtime through sysctl variables.
The changes become effective when no netmap clients are active.

The API is mostly unchanged, although the NIOCUNREGIF ioctl now
does not bring the interface back to normal mode: and you
need to close the file descriptor for that.
This change was necessary to track who is using the mapped region,
and since it is a simplification of the API there was no
incentive in trying to preserve NIOCUNREGIF.
We will remove the ioctl from the kernel next time we need
a real API change (and version bump).

Among other things, buffer allocation when opening devices is
now much faster: it used to take O(N^2) time, now it is linear.

Submitted by: Giuseppe Lettieri

11 years agoest(4) man page update to document the exposed sysctl r/o variables
Sean Bruno [Thu, 18 Oct 2012 22:22:01 +0000 (22:22 +0000)]
est(4) man page update to document the exposed sysctl r/o variables
available to the user.  Should be applicable to all branches and versions
where est(4) exists.

thanks to gjb for reviewing and suggesting nits

Reviewed by: gjb@
MFC after: 2 weeks

11 years agoExplicitly specify 'np' so that getty(8) does not simulate even parity on
Peter Jeremy [Thu, 18 Oct 2012 22:20:02 +0000 (22:20 +0000)]
Explicitly specify 'np' so that getty(8) does not simulate even parity on
local.9600.  Whilst the actual binary termios(4) definitions and preceeding
comments for local.9600 indicate that parity is disabled, getty(8)
internally simulates parity based on the presence or absence of the 'np'
flag.

PR: conf/76226
Submitted by: peter
Approved by: grog (co-mentor)
MFC after: 1 month

11 years agoIt seems that it is preferable to keep support for glabel also for
Attilio Rao [Thu, 18 Oct 2012 22:18:11 +0000 (22:18 +0000)]
It seems that it is preferable to keep support for glabel also for
filesystems that we don't support natively.
Revert part of r241636 to do so.

This patch is not targeted for MFC.

Requested by: gleb, jhb

11 years agoRemove unnecessary includes from sosend_copyin() and fix
Andre Oppermann [Thu, 18 Oct 2012 21:04:30 +0000 (21:04 +0000)]
Remove unnecessary includes from sosend_copyin() and fix
a couple of style issues.

11 years agoRemove double-wrapping of #ifdef ZERO_COPY_SOCKETS within
Andre Oppermann [Thu, 18 Oct 2012 20:22:17 +0000 (20:22 +0000)]
Remove double-wrapping of #ifdef ZERO_COPY_SOCKETS within
zero copy specialized sosend_copyin() helper function.

11 years agoRemove unneeded D_NEEDMINOR.
Ed Schouten [Thu, 18 Oct 2012 19:28:31 +0000 (19:28 +0000)]
Remove unneeded D_NEEDMINOR.

This is only needed when using clonelists. This got remove in r238693.

11 years agoMore-accurately replicate the help system from sysinstall(8). However, also
Devin Teske [Thu, 18 Oct 2012 18:43:54 +0000 (18:43 +0000)]
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)

11 years agoFix a bug where blank lines were not being counted (because awk's split()
Devin Teske [Thu, 18 Oct 2012 17:09:45 +0000 (17:09 +0000)]
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)

11 years agomake sure that socket's send and receive buffers are properly sized
Maksim Yevmenkin [Thu, 18 Oct 2012 16:34:00 +0000 (16:34 +0000)]
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

11 years agoDocument NetBSD 6.0
Sergey Kandaurov [Thu, 18 Oct 2012 15:52:00 +0000 (15:52 +0000)]
Document NetBSD 6.0

11 years agoTake advantage of if_baudrate_pf and calculate an effective baud rate on
John Baldwin [Thu, 18 Oct 2012 15:44:27 +0000 (15:44 +0000)]
Take advantage of if_baudrate_pf and calculate an effective baud rate on
all platforms (not just amd64) to compute an equivalent IB rate.

11 years agoUse if_initbaudrate().
John Baldwin [Thu, 18 Oct 2012 15:43:19 +0000 (15:43 +0000)]
Use if_initbaudrate().

11 years agoRemove WARNS=6 lines.
Ed Schouten [Thu, 18 Oct 2012 15:39:29 +0000 (15:39 +0000)]
Remove WARNS=6 lines.

WARNS=6 is already implied at this point.

11 years agoUse if_initbaudrate().
John Baldwin [Thu, 18 Oct 2012 15:14:13 +0000 (15:14 +0000)]
Use if_initbaudrate().