]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agog_vfs_open: allow only one mount per device vnode
avg [Sat, 3 Apr 2010 08:53:53 +0000 (08:53 +0000)]
g_vfs_open: allow only one mount per device vnode

In other words, deny multiple read-only mounts of the same device.
Shared read-only mounts should theoretically be possible, but,
unfortunately, can not be implemented correctly using current
buffer cache code/interface and results in an eventual system crash.
Also, using nullfs seems to be a more efficient way to achieve the same
goal.

This gets us back to where we were before GEOM and where other BSDs are.

Submitted by: pjd (idea for checking for shared mounting)
Discussed with: phk, pjd
Silence from: fs@, geom@
MFC after: 2 weeks

14 years agovn_stat: take into account va_blocksize when setting st_blksize
avg [Sat, 3 Apr 2010 08:39:00 +0000 (08:39 +0000)]
vn_stat: take into account va_blocksize when setting st_blksize

As currently st_blksize is always PAGE_SIZE, it is playing safe to not
use any smaller value.  For some cases this might not be optimal, but
at least nothing should get broken.

Generally I don't expect this commit to change much for the following
reasons (in case of VREG, VDIR):
- application I/O and physical I/O are sufficiently decoupled by
  filesystem code, buffer cache code, cluster and read-ahead logic
- not all applications use st_blksize as a hint, some use f_iosize, some
  use fixed block sizes

I expect writes to the middle of files on ZFS to benefit the most from
this change.

Silence from: fs@
MFC after: 2 weeks

14 years agoffs_mount: remove redundant assignment of geom consumer to devvp.v_bufobj
avg [Sat, 3 Apr 2010 08:25:04 +0000 (08:25 +0000)]
ffs_mount: remove redundant assignment of geom consumer to devvp.v_bufobj

The assignment is already done in g_vfs_open.
Redundant assignment is harmless, but can become a problem if g_vfs_open
logic is changed.

MFC after: 1 week

14 years agoKeep the list of default keywords sorted so that paranoid folks like me
yar [Sat, 3 Apr 2010 00:47:48 +0000 (00:47 +0000)]
Keep the list of default keywords sorted so that paranoid folks like me
don't try to find a hidden meaning in the strange order.  The list used
to be sorted in rev. 1.1 from 4.4BSD but the order was broken as soon as
in rev. 1.2 by a single-character fix.

MFC after: 3 days

14 years agoMerge ACPICA 20100331 (and four additional upstream patches).
jkim [Fri, 2 Apr 2010 23:04:31 +0000 (23:04 +0000)]
Merge ACPICA 20100331 (and four additional upstream patches).

14 years agoWith r205496 in place we should ensure that nargs and nreturns are always
marius [Fri, 2 Apr 2010 21:48:27 +0000 (21:48 +0000)]
With r205496 in place we should ensure that nargs and nreturns are always
set to sane values as they no longer default to 0, otherwise some OFW
implementation might copy in or out arguments not based on what the actual
function takes but what ever stack garbage nargs and nreturns supply.

Reviewed by: nwhitehorn

14 years agoNullify our periph pointer in dacleanup to try and catch
mjacob [Fri, 2 Apr 2010 20:08:44 +0000 (20:08 +0000)]
Nullify our periph pointer in dacleanup to try and catch
race conditions in callbacks/downcalls.

14 years agoFix a logic error in ipsec code that extracts
eri [Fri, 2 Apr 2010 18:15:23 +0000 (18:15 +0000)]
Fix a logic error in ipsec code that extracts
information from the packets.

Reviewed by: bz, mlaier
Approved by: mlaier(mentor)
MFC after: 1 month

14 years agoIncrease response queue size to avoid starvation, add a counter
np [Fri, 2 Apr 2010 17:50:52 +0000 (17:50 +0000)]
Increase response queue size to avoid starvation, add a counter
to track it when it does occur.

14 years agoindent.pro: replace a bunch of -T types with -ta introduced in r205989
avg [Fri, 2 Apr 2010 16:09:55 +0000 (16:09 +0000)]
indent.pro: replace a bunch of -T types with -ta introduced in r205989

Suggested by: bde, Hans Petter Selasky
MFC after: 10 days

14 years agoadd example indent.pro file believed to produce code with minimal differences from KNF
avg [Fri, 2 Apr 2010 16:06:46 +0000 (16:06 +0000)]
add example indent.pro file believed to produce code with minimal differences from KNF

This file is what bde uses!
With addition of some types from queue(3) by hps.
Please note that the output will not be KNF and currently it's not
possible to achieve correct KNF with any combination of options.
indent(1) needs to be made smarter.

Some issues:
o indent produces a space between a queue type macro and opening
  parenthesis
o indent produces a tab before __packed and __aligned
o indent produce a space after #define

bde also notes difference in the following options between this profile
and profile in /usr/src/admin/style of 4.4BSD:
-cdb -ei -ip8 -nsob

Also, NetBSD uses -di0 instead of -di8.

Location for the profile is suggested by jh.

Submitted by: Hans Petter Selasky (parts)
Obtained from: bde :-)
MFC after: 10 days
X-ToDo: make indent able to produce proper (perfect) KNF
X-Perhaps-ToDo: make KNF default output

14 years agomountmsdosfs: reject too high value of bytes per cluster
avg [Fri, 2 Apr 2010 15:22:23 +0000 (15:22 +0000)]
mountmsdosfs: reject too high value of bytes per cluster

Bytes per cluster are calcuated as bytes per sector times sectors per
cluster.  Too high value can overflow an internal variable with type
that can hold only values in valid range.  Trying to use a wider type
results in an attempt to read more than MAXBSIZE at once, a panic.
Unfortunately, it is FreeBSD newfs_msdos that  produces filesystems
with invalid parameters for certain types of media.

Reported by: Fabian Keil <freebsd-listen@fabiankeil.de>,
Paul B. Mahol <onemda@gmail.com>
Discussed with: bde, kib
MFC after: 1 week
X-ToDo: fix newfs_msdos

14 years agobo_bsize: revert r205860 and take an alternative approch in getblk
avg [Fri, 2 Apr 2010 15:12:31 +0000 (15:12 +0000)]
bo_bsize: revert r205860 and take an alternative approch in getblk

In r205860 I missed the fact that there is code that strongly assumes
that devvp bo_bsize is equal to underlying provider's sectorsize.
In those places it is hard to obtain the sectorsize in an alternative
way if devvp bo_bsize is set to something else.
So, I am reverting bo_bsize assigment in g_vfs_open.
Instead, in getblk I use DEV_BSIZE block size for b_offset calculation
if vp is a disk vp as reported by vn_isdisk.  This should coinside with
vp being a devvp.

Reported by: Mykola Dzham <i@levsha.me>
Tested by: Mykola Dzham <i@levsha.me>
Pointyhat to: avg
MFC after: 2 weeks
X-ToDo: convert bread(devvp) in all fs to use bo_bsize-d blocks

14 years agoProperly initialize the timestamp when using ac -w.
ed [Fri, 2 Apr 2010 14:30:56 +0000 (14:30 +0000)]
Properly initialize the timestamp when using ac -w.

When using ac -w, we must use the last timestamp to terminate the log
file. I accidentally removed this when I ported the code to use utmpx.

Reported by: avg

14 years agoSupply default implementation of VOP_RENAME() that does neccessary
kib [Fri, 2 Apr 2010 14:03:43 +0000 (14:03 +0000)]
Supply default implementation of VOP_RENAME() that does neccessary
unlocks and unreferences for argument vnodes, as expected by
kern_renameat(9), and returns EOPNOTSUPP. This fixes locks and
reference leaks when rename is attempted on fs that does not
implement rename.

PR: kern/107439
Based on submission by: Mikolaj Golub <to.my.trociny gmail com>
Tested by: Mikolaj Golub
MFC after: 1 week

14 years agoAdd function vop_rename_fail(9) that performs needed cleanup for locks
kib [Fri, 2 Apr 2010 14:03:01 +0000 (14:03 +0000)]
Add function vop_rename_fail(9) that performs needed cleanup for locks
and references of the VOP_RENAME(9) arguments. Use vop_rename_fail()
in deadfs_rename().

Tested by: Mikolaj Golub
MFC after: 1 week

14 years agoImprove "top" header by:
fabient [Fri, 2 Apr 2010 13:34:28 +0000 (13:34 +0000)]
Improve "top" header by:
- Display sample received per PMCs (or merged PMCs).
- Display percentage vs all samples

14 years ago- Support for uncore counting events: one fixed PMC with the uncore
fabient [Fri, 2 Apr 2010 13:23:49 +0000 (13:23 +0000)]
- Support for uncore counting events: one fixed PMC with the uncore
  domain clock, 8 programmable PMC.
- Westmere based CPU (Xeon 5600, Corei7 980X) support.
- New man pages with events list for core and uncore.
- Updated Corei7 events with Intel 253669-033US December 2009 doc.
  There is some removed events in the documentation, they have been
  kept in the code but documented in the man page as obsolete.
- Offcore response events can be setup with rsp token.

Sponsored by: NETASQ

14 years agoChange how getent utmpx works.
ed [Fri, 2 Apr 2010 11:05:59 +0000 (11:05 +0000)]
Change how getent utmpx works.

- Always require active, log or lastlogin to be provided.
- Allow the user to provide custom filenames.

14 years ago- Try do deal gracefully with correctable ECC errors.
marius [Fri, 2 Apr 2010 10:36:40 +0000 (10:36 +0000)]
- Try do deal gracefully with correctable ECC errors.
- Improve the reporting of unhandled kernel and user traps.

14 years agoWITH_CTF can now be specified in src.conf (not recommended, there
netchild [Fri, 2 Apr 2010 06:55:31 +0000 (06:55 +0000)]
WITH_CTF can now be specified in src.conf (not recommended, there
are some problems with static executables), make.conf (would also
affect ports which do not use GNU make and do not override the
compile targets) or in the kernel config (via "makeoptions
WITH_CTF=yes").

Additional (related) changes:
 - propagate WITH_CTF to module builds
 - do not add -g to the linker flags, it's a noop there anyway
   (at least according to the man page of ld)
 - do not add -g to CFLAGS unconditionally
   we need to have a look if it is really needed (IMO not) or if there
   is a way to add it only when WITH_CTF is used

Note: ctfconvert / ctfmerge lines will not appear in the build output,
to protect the innocent (those which do not build with WITH_CTF would
see the shell-test and may think WITH_CTF is used).

Reviewed by: imp, jhb, scottl (earlier version)
Discussed on: arch@

14 years agoRe-apply r205683 with some modifications:
netchild [Fri, 2 Apr 2010 06:50:28 +0000 (06:50 +0000)]
Re-apply r205683 with some modifications:
  Fix some bogus values in linprocfs.

  Submitted by: Petr Salinger <Petr.Salinger@seznam.cz>
  Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter)
  PR: 144584

Reviewed by / discussed with: kib, des, jhb, submitter

14 years agoFor the experimental NFS server, add a call to free the lookup
rmacklem [Fri, 2 Apr 2010 02:19:28 +0000 (02:19 +0000)]
For the experimental NFS server, add a call to free the lookup
path buffer for one case where it was missing when doing mkdir.
This could have conceivably resulted in a leak of a buffer, but
a leak was never observed during testing, so I suspect it would
have occurred rarely, if ever, in practice.

MFC after: 2 weeks

14 years agoAdd SAVENAME to the cn_flags for all cases in the experimental
rmacklem [Fri, 2 Apr 2010 01:53:48 +0000 (01:53 +0000)]
Add SAVENAME to the cn_flags for all cases in the experimental
NFS server for the CREATE cn_nameiop where SAVESTART isn't set.
I was not aware that this needed to be done by the caller until
recently.

Tested by: lampa AT fit.vutbr.cz (link case)
Submitted by: lampa AT fit.vutbr.cz (link case)
MFC after: 2 weeks

14 years agoRemove _LARGEFILE64_SOURCE==1 case which is supposed to be always false
delphij [Thu, 1 Apr 2010 22:52:09 +0000 (22:52 +0000)]
Remove _LARGEFILE64_SOURCE==1 case which is supposed to be always false
on FreeBSD.

Pointed out by: dougb

14 years agoFor now, hardcode FreeBSD configuration that will never change on zlib.h:
delphij [Thu, 1 Apr 2010 21:21:45 +0000 (21:21 +0000)]
For now, hardcode FreeBSD configuration that will never change on zlib.h:

unifdef -D_FILE_OFFSET_BITS=64 -U_LFS64_LARGEFILE -U_LARGEFILE64_SOURCE

14 years agoSpecify the parameter in the format_k2 prototype.
brucec [Thu, 1 Apr 2010 21:20:19 +0000 (21:20 +0000)]
Specify the parameter in the format_k2 prototype.
This fixes top on ARM, which assumes that format_k2 takes an int.

Approved by: rrs (mentor)

14 years agoOops! Wrong copy-paste in r206053.
mav [Thu, 1 Apr 2010 19:05:43 +0000 (19:05 +0000)]
Oops! Wrong copy-paste in r206053.

14 years agoFill extended ATA command registers in cPRD to support 48bit commands.
mav [Thu, 1 Apr 2010 18:17:53 +0000 (18:17 +0000)]
Fill extended ATA command registers in cPRD to support 48bit commands.

14 years agoWe don't need to note that mkproto is missing anymore. It is
imp [Thu, 1 Apr 2010 17:04:37 +0000 (17:04 +0000)]
We don't need to note that mkproto is missing anymore.  It is
definitely OBE in a number of ways, and likely should have been
removed in 2000, not 2010.

14 years agoIOCPARM_MAX defines maximum size of a structure that can be passed
pjd [Thu, 1 Apr 2010 16:21:35 +0000 (16:21 +0000)]
IOCPARM_MAX defines maximum size of a structure that can be passed
directly to ioctl(2). Because of how ioctl command is build using _IO*()
macros we have only 13 bits to encode structure size. So the structure
can be up to 8kB-1.

Currently we define IOCPARM_MAX as PAGE_SIZE.

This is IMHO wrong for three main reasons:

1. It is confusing on archs with page size larger than 8kB (not really
   sure if we support such archs (sparc64?)), as even if PAGE_SIZE is
   bigger than 8kB, we won't be able to encode anything larger in ioctl
   command.

2. It is a waste. Why the structure can be only 4kB on most archs if we
   have 13 bits dedicated for that, not 12?

3. It shouldn't depend on architecture and page size. My ioctl command
   can work on one arch, but can't on the other?

Increase IOCPARM_MAX to 8kB and make it independed of PAGE_SIZE and
architecture it is compiled for. This allows to use all the bits on all the
archs for size. Note that this doesn't mean we will copy more on every ioctl(2)
call. No. We still copyin(9)/copyout(9) only exact number of bytes encoded in
ioctl command.

Practical use for this change is ZFS. zfs_cmd_t structure used for ZFS
ioctls is larger than 4kB.

Silence on: arch@
MFC after: 1 month

14 years agoRemove alignment constraints.
mav [Thu, 1 Apr 2010 16:20:36 +0000 (16:20 +0000)]
Remove alignment constraints.

14 years agoRemove alignment constraints.
mav [Thu, 1 Apr 2010 16:18:16 +0000 (16:18 +0000)]
Remove alignment constraints.

14 years agoRegenerate manual pages for OpenSSL 0.9.8n.
simon [Thu, 1 Apr 2010 15:37:38 +0000 (15:37 +0000)]
Regenerate manual pages for OpenSSL 0.9.8n.

14 years ago- Make it slightly simpler to update OpenSSL version information
simon [Thu, 1 Apr 2010 15:35:29 +0000 (15:35 +0000)]
- Make it slightly simpler to update OpenSSL version information
  for regenerating OpenSSL manual pages.
- Explicitly set the OpenSSL release date so manual pages contain
  the date OpenSSL was released and not just the date OpenSSL was
  imported into the FreeBSD base system.
- Update for Makefile for OpenSSL 0.9.8n.

14 years agoMerge OpenSSL 0.9.8n into head.
simon [Thu, 1 Apr 2010 15:19:51 +0000 (15:19 +0000)]
Merge OpenSSL 0.9.8n into head.

This fixes CVE-2010-0740 which only affected -CURRENT (OpenSSL 0.9.8m)
but not -STABLE branches.

I have not yet been able to find out if CVE-2010-0433 impacts FreeBSD.
This will be investigated further.

Security: CVE-2010-0433, CVE-2010-0740
Security: http://www.openssl.org/news/secadv_20100324.txt

14 years agoVarious fixes.
flz [Thu, 1 Apr 2010 14:27:29 +0000 (14:27 +0000)]
Various fixes.

- Replace hardcoded INDEX version. [1]
- Fix a buffer overlap. [2]
- Remove empty package when fetching fails and -K is used. [3]
- Remove useless chmod2() after mkdtemp(3). [4]
- Replace mkdir(1) call with mkdir(2). [5]
- Get rid of some vsystem() calls.
- Switch from lstat(2) to open(2) in fexists().
- Try rename(2) in move_file() first.
- Bump PKG_INSTALL_VERSION to 20100401.

PR: bin/145101 [1], bin/139492 [2], bin/144919 [3]
bin/144920 [4], bin/144921 [5]
Submitted by: gcooper [1,2,3,4,5]

14 years agoForgot to initialize the debug variable.
des [Thu, 1 Apr 2010 13:16:32 +0000 (13:16 +0000)]
Forgot to initialize the debug variable.

MFC after: 2 weeks

14 years agoAdd -k to the recommended fingerd(8) command line.
des [Thu, 1 Apr 2010 13:13:09 +0000 (13:13 +0000)]
Add -k to the recommended fingerd(8) command line.

MFC after: 2 weeks

14 years agoAdd a debugging option (-d)
des [Thu, 1 Apr 2010 13:11:39 +0000 (13:11 +0000)]
Add a debugging option (-d)
Add a -k option which fingerd(8) passes through to finger(1).

MFC after: 2 weeks

14 years ago- Add my birthday to the calendar
decke [Thu, 1 Apr 2010 12:26:29 +0000 (12:26 +0000)]
- Add my birthday to the calendar

Approved by: miwi (mentor), beat (co-mentor)

14 years ago- Add myself to the ports committer list
decke [Thu, 1 Apr 2010 12:18:44 +0000 (12:18 +0000)]
- Add myself to the ports committer list

Approved by: miwi (mentor), beat (co-mentor)

14 years agoFix the gap between mute and lowest possible volume. The es1370 mixer
joel [Thu, 1 Apr 2010 11:30:46 +0000 (11:30 +0000)]
Fix the gap between mute and lowest possible volume. The es1370 mixer
volumes were incorrectly calculated.

I've tested this with one of my es1370 cards and I can confirm that it
works.

PR: 98167
Submitted by: Joseph Terner <jtsn@gmx.de>
Approved by: kib

14 years agoRemove alignment constraints.
mav [Thu, 1 Apr 2010 10:41:01 +0000 (10:41 +0000)]
Remove alignment constraints.

14 years agoAdd a couple missing basic mode page codes.
mjacob [Thu, 1 Apr 2010 01:49:43 +0000 (01:49 +0000)]
Add a couple missing basic mode page codes.

MFC after: 1 week

14 years agoThe ALQ should not be considered drained until it has been made inactive.
lstewart [Thu, 1 Apr 2010 01:27:10 +0000 (01:27 +0000)]
The ALQ should not be considered drained until it has been made inactive.

Sponsored by: FreeBSD Foundation
Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch)
Approved by: kmacy (mentor)
MFC after: 1 month

14 years agoAccording to SLEEP(9), msleep() is deprecated in favour of mtx_sleep().
lstewart [Thu, 1 Apr 2010 01:23:36 +0000 (01:23 +0000)]
According to SLEEP(9), msleep() is deprecated in favour of mtx_sleep().

Sponsored by: FreeBSD Foundation
Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch)
Approved by: kmacy (mentor)
MFC after: 1 month

14 years ago- Factor code to destroy an ALQ out of alq_close() into a private alq_destroy().
lstewart [Thu, 1 Apr 2010 01:16:00 +0000 (01:16 +0000)]
- Factor code to destroy an ALQ out of alq_close() into a private alq_destroy().

- Use the new alq_destroy() to properly handle a failure case in alq_open().

Sponsored by: FreeBSD Foundation
Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch)
Approved by: kmacy (mentor)
MFC after: 1 month

14 years agoThe POLL code was missed in the queue conversion,
jfv [Wed, 31 Mar 2010 23:24:42 +0000 (23:24 +0000)]
The POLL code was missed in the queue conversion,
change the argument type to igb_rxeof() to the
correct type. Note, any users of POLLING must
be sure and set the number of queues to 1 for
things to work correctly.

14 years agoAdd definition of IPv6 mobility header's protocol number, as assigned by
delphij [Wed, 31 Mar 2010 23:02:25 +0000 (23:02 +0000)]
Add definition of IPv6 mobility header's protocol number, as assigned by
IANA and defined in RFC 3775.

Obtained from: KAME

14 years agoRemove some more alignment constraints.
mav [Wed, 31 Mar 2010 22:47:55 +0000 (22:47 +0000)]
Remove some more alignment constraints.

14 years agoUse device_get_nameunit(9) rather than device_get_name(9) so one can
marius [Wed, 31 Mar 2010 22:32:56 +0000 (22:32 +0000)]
Use device_get_nameunit(9) rather than device_get_name(9) so one can
identify the reporting bridge in machines with multiple PCI domains.

14 years agoDon't re-implement device_get_nameunit(9).
marius [Wed, 31 Mar 2010 22:27:33 +0000 (22:27 +0000)]
Don't re-implement device_get_nameunit(9).

14 years ago- Take advantage of the INTCLR_* macros.
marius [Wed, 31 Mar 2010 22:19:00 +0000 (22:19 +0000)]
- Take advantage of the INTCLR_* macros.
- Right-justify the backslashes as per style(9).

14 years agoMake ng_ksocket fulfill lower protocol stack layers alignment requirements
mav [Wed, 31 Mar 2010 22:16:05 +0000 (22:16 +0000)]
Make ng_ksocket fulfill lower protocol stack layers alignment requirements
on platforms with strict alignment constraints.
This fixes kernel panics on arm and probably other architectures.

PR: sparc64/80410

14 years agoMake ng_l2tp irrelevant to data alignment.
mav [Wed, 31 Mar 2010 22:11:06 +0000 (22:11 +0000)]
Make ng_l2tp irrelevant to data alignment.

14 years agoUpdate to 1.2.4.1 (beta).
delphij [Wed, 31 Mar 2010 20:55:13 +0000 (20:55 +0000)]
Update to 1.2.4.1 (beta).

14 years agoHook the identification LEDs of igb(4), lem(4) and em(4) devices up with
marius [Wed, 31 Mar 2010 20:43:24 +0000 (20:43 +0000)]
Hook the identification LEDs of igb(4), lem(4) and em(4) devices up with
led(4) so they can be lit or f.e. made blink via `echo f2 > /dev/led/em0`
for localization purposes.

Approved by: jfv
MFC afer: 1 week (after r205869)

14 years agoMake ng_ppp fulfill upper protocol stack layers alignment requirements
mav [Wed, 31 Mar 2010 20:37:44 +0000 (20:37 +0000)]
Make ng_ppp fulfill upper protocol stack layers alignment requirements
on platforms with strict alignment constraints.
This fixes kernel panics on arm and probably other architectures.

PR: sparc64/80410

14 years agong_gif depends on gif.
mav [Wed, 31 Mar 2010 20:15:20 +0000 (20:15 +0000)]
ng_gif depends on gif.

14 years agoIf there is multiple PMCs for the same interrupt ignore new post.
fabient [Wed, 31 Mar 2010 20:00:44 +0000 (20:00 +0000)]
If there is multiple PMCs for the same interrupt ignore new post.
This will indirectly fix a bug where the thread will be pinned
forever if the assert is not compiled.

MFC after: 3days

14 years agoAdd prototype for libc internal interfaces.
delphij [Wed, 31 Mar 2010 18:37:00 +0000 (18:37 +0000)]
Add prototype for libc internal interfaces.

14 years agoAdd prototypes for libc private interfaces.
delphij [Wed, 31 Mar 2010 18:36:04 +0000 (18:36 +0000)]
Add prototypes for libc private interfaces.

While I'm there, apply __unused whenever appropriate.

Reviewed by: md5(1)

14 years agoSync fortunes with other *BSDs
uqs [Wed, 31 Mar 2010 18:21:25 +0000 (18:21 +0000)]
Sync fortunes with other *BSDs

- Spelling errors
- Typographical fixes
- Consistent attributions
- Use Jr. more consistently
- Capitalization of dictionary-like entries
- Sorting using tools/do_sort
- Remove duplicate fortunes
- Style according to the Notes file
- Reflect correct default fortune name in Notes
- Remove some no longer needed spelling hints
- Drop latin1 characters (sorry MÃ¥rten)

This is a partial sync against the DragonflyBSD sources, where a lot of
fixes from Free, Net and OpenBSD were merged previously. Only about 50%
of the changes originate from there, the rest was done by dougb and
yours truly.

Partial review by: wilko (earlier version), ed (dito)
In collaboration with: dougb
Approved by: ed (co-mentor)

14 years agoTwo fixes:
imp [Wed, 31 Mar 2010 18:18:37 +0000 (18:18 +0000)]
Two fixes:

(1) We don't need a custom install_kernel.  We can install without
symbols by adding INSTALL_NODEBUG (which likely should be
WITHOUT_KERNEL_SYMBOLS_FILE, or something shorter) to CONF_INSTALL
(2) for make buildenv stage, use NANO_MAKE_CONF_BUILD rather than the
non-existant NANO_MAKE_CONF.

MFC after: 7 days

14 years agoFor unhandled actions in xpt_action_default, remember to call
mjacob [Wed, 31 Mar 2010 17:47:57 +0000 (17:47 +0000)]
For unhandled actions in xpt_action_default, remember to call
xpt_done for queued requests. This solves the problem of
indefinite hangs for unspecified transports when XPT_SCAN_BUS
is called.

A few minor cosmetics elsewhere.

MFC after: 1 week

14 years agoMake -r mean exactly the same thing as -E for increased compatibility
imp [Wed, 31 Mar 2010 17:40:13 +0000 (17:40 +0000)]
Make -r mean exactly the same thing as -E for increased compatibility
with GNU sed.

MFC after: 7 days

14 years agoindent(1): add a new option, -ta, to treat all *_t identifiers as types
avg [Wed, 31 Mar 2010 17:05:30 +0000 (17:05 +0000)]
indent(1): add a new option, -ta, to treat all *_t identifiers as types

Submitted by: Hans Petter Selasky
Discussed with: bde
MFC after: 10 days

14 years agoindent(1): correctly handle case/label at the very start of a function
avg [Wed, 31 Mar 2010 16:55:47 +0000 (16:55 +0000)]
indent(1): correctly handle case/label at the very start of a function

Obtained from: NetBSD (rev. 1.11 of indent.c)
MFC after: 1 week

14 years agoFix poll handler declaration.
jfv [Wed, 31 Mar 2010 16:42:22 +0000 (16:42 +0000)]
Fix poll handler declaration.

14 years agoConstify vap argument of ieee80211_{note,discard}* functions.
rpaulo [Wed, 31 Mar 2010 16:07:36 +0000 (16:07 +0000)]
Constify vap argument of ieee80211_{note,discard}* functions.

MFC after: 1 week

14 years agoStop hard coding i386 as the arch for the build. Instead, default to the
imp [Wed, 31 Mar 2010 14:42:07 +0000 (14:42 +0000)]
Stop hard coding i386 as the arch for the build.  Instead, default to the
processor we're running on.  Also, supply amd64 version of create_diskimage
that's the same as i386's.

# didn't fix the confusion between using the processor for this and using
# the machine (which would be more appropriate).  NANO_ARCH smashes the two
# together right now.

MFC after: 7 days

14 years agoDocument DEBUG_FLAGS in a more visible place, in the build(7) manpage
keramida [Wed, 31 Mar 2010 12:52:19 +0000 (12:52 +0000)]
Document DEBUG_FLAGS in a more visible place, in the build(7) manpage

Noticed by:     Alexander Best <alexbestms.at.wwu.de>
Reviewed by:    jhb
MFC after:      1 week

14 years agoInclude opt_ata.h, as some structures here depending on ATA_CAM option.
mav [Wed, 31 Mar 2010 07:20:10 +0000 (07:20 +0000)]
Include opt_ata.h, as some structures here depending on ATA_CAM option.
This fixes ATA_CAM with atamvsata and probably some other drivers.

14 years agoAdd support for ALQ(9) to be compiled and loaded as a kernel module.
lstewart [Wed, 31 Mar 2010 03:58:57 +0000 (03:58 +0000)]
Add support for ALQ(9) to be compiled and loaded as a kernel module.

Sponsored by: FreeBSD Foundation
Reviewed by: dwmalone, jeff, rpaulo, rwatson
Approved by: kmacy (mentor)
MFC after: 1 month

14 years agofix bug in previous commit related to rule deletion
luigi [Wed, 31 Mar 2010 02:20:22 +0000 (02:20 +0000)]
fix bug in previous commit related to rule deletion
(stable/8 just fixed moments ago)

14 years agoBe like stdlib.h and bring in a wchar_t definition and use it to prototype
jmallett [Wed, 31 Mar 2010 02:12:24 +0000 (02:12 +0000)]
Be like stdlib.h and bring in a wchar_t definition and use it to prototype
wcstoimax and wcstoumax, rather than spelling it __wchar_t.  This is necessary
to use these functions in C++ where wchar_t is different to __wchar_t and is
a built-in type.

It may be better to use __wchar_t here and to simply define __wchar_t as being
wchar_t in C++ mode rather than to bring in wchar_t, but this is less invasive
and follows our existing practice, and restores wchar_t usage in this file to
what it was before r1.8.

14 years agoMultiple fixes related to queue set sizing and resources:
np [Wed, 31 Mar 2010 00:27:49 +0000 (00:27 +0000)]
Multiple fixes related to queue set sizing and resources:

- Only the tunnelq (TXQ_ETH) requires a buf_ring, an ifq, and the watchdog/timer
  callouts.  Do not allocate these for the other tx queues.

- Use 16k jumbo clusters only on offload capable cards by default.

- Do not allocate a full tx ring for the offload queue if the card is not
  offload capable.

- Slightly better freelist size calculation.

- Fix nmbjumbo4 typo, remove unneeded global variables.

MFC after: 3 days

14 years agoFix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size.
np [Wed, 31 Mar 2010 00:26:35 +0000 (00:26 +0000)]
Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size.

14 years agoFix tx drop statistics.
np [Wed, 31 Mar 2010 00:26:02 +0000 (00:26 +0000)]
Fix tx drop statistics.

MFC after: 3 days

14 years agoFix build with "nooptions INET"
np [Wed, 31 Mar 2010 00:24:44 +0000 (00:24 +0000)]
Fix build with "nooptions INET"

Requested by: bz
MFC after: 3 days

14 years agoDo not attempt to retrieve interrupt information before it is available.
np [Wed, 31 Mar 2010 00:22:58 +0000 (00:22 +0000)]
Do not attempt to retrieve interrupt information before it is available.

MFC after: 3 days

14 years agoImproved PHY EDC settings.
np [Wed, 31 Mar 2010 00:21:56 +0000 (00:21 +0000)]
Improved PHY EDC settings.

MFC after: 3 days

14 years agoRefresh the firmware version immediately after it is upgraded (or downgraded).
np [Wed, 31 Mar 2010 00:19:39 +0000 (00:19 +0000)]
Refresh the firmware version immediately after it is upgraded (or downgraded).

MFC after: 3 days

14 years agoMerge OpenBSD revisions 1.4 through 1.9, mostly style cleanups.
delphij [Tue, 30 Mar 2010 23:14:35 +0000 (23:14 +0000)]
Merge OpenBSD revisions 1.4 through 1.9, mostly style cleanups.

Obtained from: OpenBSD
MFC after: 3 month

14 years agoThis patch should fix handling of byte range locks locally
rmacklem [Tue, 30 Mar 2010 23:11:50 +0000 (23:11 +0000)]
This patch should fix handling of byte range locks locally
on the server for the experimental nfs server. When enabled
by setting vfs.newnfs.locallocks_enable to non-zero, the
experimental nfs server will now acquire byte range locks
on the file on behalf of NFSv4 clients, such that lock
conflicts between the NFSv4 clients and processes running
locally on the server, will be recognized and handled correctly.

MFC after: 2 weeks

14 years agoRemove unused files.
delphij [Tue, 30 Mar 2010 23:10:56 +0000 (23:10 +0000)]
Remove unused files.

14 years agoSync with OpenBSD:
delphij [Tue, 30 Mar 2010 21:54:25 +0000 (21:54 +0000)]
Sync with OpenBSD:
 - avoid coredump when there's only one token on a line;
 - Use calloc();
 - Remove a line inherited from example mdoc.

Obtained from: OpenBSD
MFC after: 1 month

14 years agoFor where possible, make the dates of the Tasmanian holidays properly
edwin [Tue, 30 Mar 2010 21:11:16 +0000 (21:11 +0000)]
For where possible, make the dates of the Tasmanian holidays properly
variable. The leftover ones are the Thursday before the Fourth
Saturday of October (Oct/SatFourth-2) which is not possible yet.

14 years agonit: xpt_bus_deregister has to be called with the sim lock held.
mjacob [Tue, 30 Mar 2010 20:39:57 +0000 (20:39 +0000)]
nit: xpt_bus_deregister has to be called with the sim lock held.

MFC after: 1 month

14 years agofix my clobber of the copyright date :)
jfv [Tue, 30 Mar 2010 19:54:29 +0000 (19:54 +0000)]
fix my clobber of the copyright date :)

14 years agoUse CACHE_LINE_SIZE alignment for 'struct pcpu' rather than hardcoding 128.
jhb [Tue, 30 Mar 2010 19:41:38 +0000 (19:41 +0000)]
Use CACHE_LINE_SIZE alignment for 'struct pcpu' rather than hardcoding 128.

Reviewed by: jeff

14 years agoThanks to Michael Tuexen for adding SCTP support for 82599,
jfv [Tue, 30 Mar 2010 19:09:18 +0000 (19:09 +0000)]
Thanks to Michael Tuexen for adding SCTP support for 82599,
also for finding a one character bug that kept TSO from working.

Sometimes with direct attach cables a failure can occur in init,
the old method of calling detach was broken, there is no way to
return an error to the system from init, so I have changed it to
return failure thru the ioctl.

And, have fixed the ALTQ code changes of Max Laier, sorry Max :)

14 years agoUse panic() (which the environment is required to provide to libstand) to
jhb [Tue, 30 Mar 2010 19:07:41 +0000 (19:07 +0000)]
Use panic() (which the environment is required to provide to libstand) to
implement assert() instead of relying on a non-required exit().  The exit()
invocation also did not match the semantics of the exit() routine that
current boot environments happen to require.

PR: kern/144749
Discussed with: bde
MFC after: 1 week

14 years agoDefer freeing a kevent list until after dropping kqueue locks.
jhb [Tue, 30 Mar 2010 18:31:55 +0000 (18:31 +0000)]
Defer freeing a kevent list until after dropping kqueue locks.

LOR: 185
Submitted by: Matthew Fleming @ Isilon
MFC after: 1 week

14 years agoVarious and sundry style, whitespace, and comment fixes.
jhb [Tue, 30 Mar 2010 18:29:19 +0000 (18:29 +0000)]
Various and sundry style, whitespace, and comment fixes.

Submitted by: bde (mostly)

14 years agoFix lint build problem.
jfv [Tue, 30 Mar 2010 17:05:24 +0000 (17:05 +0000)]
Fix lint build problem.

14 years ago- Handle calloc() allocation failures.
ru [Tue, 30 Mar 2010 13:46:40 +0000 (13:46 +0000)]
- Handle calloc() allocation failures.
- Fixed a comment.
- 2 -> EXIT_FAILURE in some places.
- errx() -> err() where appropriate.

PR: 144644
Submitted by: Garrett Cooper

14 years agoo Make sockstat -6 output more readable for long ipv6
maxim [Tue, 30 Mar 2010 09:58:21 +0000 (09:58 +0000)]
o Make sockstat -6 output more readable for long ipv6
addresses (most of them apart from ::1): put a whitespace
between local and remote address:port pairs.

PR: bin/145194
Submitted by: Fedor Dikarev
MFC after: 2 weeks

14 years agoo Remove a duplicate reference to -f flag in the SYNOPSYS section.
maxim [Tue, 30 Mar 2010 09:22:33 +0000 (09:22 +0000)]
o Remove a duplicate reference to -f flag in the SYNOPSYS section.
o Improve wording.

PR: docs/144407
Submitted by: gcooper
MFC after: 1 week