]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFixes a firmware bug that in some devices (e.g. Netgear WG111T or
weongyo [Tue, 19 Jan 2010 01:04:44 +0000 (01:04 +0000)]
Fixes a firmware bug that in some devices (e.g. Netgear WG111T or
TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the
firmware.

Pointed by: Steven Friedrich <freebsd at insightbb.com>
Reviewed by: sam

14 years agoMFV of tzdata2010a:
edwin [Mon, 18 Jan 2010 23:34:23 +0000 (23:34 +0000)]
MFV of tzdata2010a:

Administrative only: Fix AT fields for Asia/Dhaka

14 years agoReally disable wtmp logging when chrooting.
ed [Mon, 18 Jan 2010 23:28:25 +0000 (23:28 +0000)]
Really disable wtmp logging when chrooting.

Also perform a small cleanup to ftpd_logwtmp(). Just use a NULL
parameter for the username to indicate a logout, instead of an empty
string.

Reported by: Alexey Shuvaev <shuvaev physik uni-wuerzburg de>

14 years agoInclude unistd.h for read(), write() and stdlib.h for exit().
wkoszek [Mon, 18 Jan 2010 23:13:22 +0000 (23:13 +0000)]
Include unistd.h for read(), write() and stdlib.h for exit().
Bump WARNS to 5 while being here.

14 years agoSmall cleanup while being here:
wkoszek [Mon, 18 Jan 2010 23:09:07 +0000 (23:09 +0000)]
Small cleanup while being here:
- sort includes
- remove usage(), since it seems to come from older version
  of the KLD
- remove unnecessary variable
- mark argc/argv as unused

Bring WARNS = 5 to the Makefile.

14 years agoInclude stdlib.h for exit(3) and unistd.h for syscall(2). This makes
wkoszek [Mon, 18 Jan 2010 23:04:38 +0000 (23:04 +0000)]
Include stdlib.h for exit(3) and unistd.h for syscall(2). This makes
this program to compile cleanly.

14 years agoSmall fix for making this KLD to compile.
wkoszek [Mon, 18 Jan 2010 22:59:53 +0000 (22:59 +0000)]
Small fix for making this KLD to compile.

14 years agoLet us to use our libusb(3) in Linuxolator.
wkoszek [Mon, 18 Jan 2010 22:46:06 +0000 (22:46 +0000)]
Let us to use our libusb(3) in Linuxolator.

With this change, Linux binaries can work with our libusb(3) when
it's compiled against our header files on GNU/Linux system -- this
solves the problem with differences between /dev layouts.

With ported libusb(3), I am able to use my USB JTAG cable with Linux
binaries that support it.

Reviewed by: thompsa

14 years agoUndo r169961, removing WITH_GCC3, added as a temporary workaround three
trasz [Mon, 18 Jan 2010 21:56:08 +0000 (21:56 +0000)]
Undo r169961, removing WITH_GCC3, added as a temporary workaround three
years ago.

14 years agoDeclare a new EVENTHANDLER called iflladdr_event which signals that the L2
thompsa [Mon, 18 Jan 2010 20:34:00 +0000 (20:34 +0000)]
Declare a new EVENTHANDLER called iflladdr_event which signals that the L2
address on an interface has changed. This lets stacked interfaces such as
vlan(4) detect that their lower interface has changed and adjust things in
order to keep working. Previously this situation broke at least vlan(4) and
lagg(4) configurations.

The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the
risk of a loop.

PR: kern/142927
Submitted by: Nikolay Denev

14 years agoAdd epic(4) also here.
marius [Mon, 18 Jan 2010 20:25:29 +0000 (20:25 +0000)]
Add epic(4) also here.

MFC after: 3 days

14 years agoAlso output stripeoffset for consumer even if stripesize is zero, while
delphij [Mon, 18 Jan 2010 19:39:55 +0000 (19:39 +0000)]
Also output stripeoffset for consumer even if stripesize is zero, while
stripeoffset is non-zero.

Pointed out by: mav

14 years agofix a comment typo
avg [Mon, 18 Jan 2010 19:10:14 +0000 (19:10 +0000)]
fix a comment typo

MFC after: 3 days

14 years agoRevert parts of r202283:
lulf [Mon, 18 Jan 2010 19:09:16 +0000 (19:09 +0000)]
Revert parts of r202283:
- Return EOPNOTSUPP before EROFS to be consistent with other filesystems.
- Fix setting of the nodump flag for users without PRIV_VFS_SYSFLAGS privilege.

Submitted by: jh@

14 years agoRemove a dead initialization.
ed [Mon, 18 Jan 2010 18:58:03 +0000 (18:58 +0000)]
Remove a dead initialization.

Spotted by: scan-build (uqs)

14 years agoUpdate the example named.conf file to answer locally for the newly
dougb [Mon, 18 Jan 2010 18:37:47 +0000 (18:37 +0000)]
Update the example named.conf file to answer locally for the newly
released IPv4 documentation ranges (http://tools.ietf.org/html/rfc5737)
and catch up to the IPv6 documentation range and domain names that 5737
also references.

14 years agoAdd a warning if we're inw'ing from an odd address. This could happen
imp [Mon, 18 Jan 2010 17:53:44 +0000 (17:53 +0000)]
Add a warning if we're inw'ing from an odd address.  This could happen
due to a bug and might be the real basis for the cardbus workaround
hack.

14 years agoFix indentation nit.
imp [Mon, 18 Jan 2010 17:52:57 +0000 (17:52 +0000)]
Fix indentation nit.

14 years agoAllow the CTAGS to be set to something other than "gtags" or "ctags",
ru [Mon, 18 Jan 2010 15:58:02 +0000 (15:58 +0000)]
Allow the CTAGS to be set to something other than "gtags" or "ctags",
but assume it supports a ctags(1)-compatible syntax.

PR: 46676
Submitted by: Lyndon Nerenberg
MFC after: 3 days

14 years agoIf CTAGS is not set or set to something other than "ctags" or "gtags",
ru [Mon, 18 Jan 2010 15:41:55 +0000 (15:41 +0000)]
If CTAGS is not set or set to something other than "ctags" or "gtags",
"cleandepend" was not removing the .depend file; fixed.

PR: 126747
MFC after: 3 days

14 years agoPrint sizes up to INT64_MAX in md_prthumanval().
jh [Mon, 18 Jan 2010 14:07:41 +0000 (14:07 +0000)]
Print sizes up to INT64_MAX in md_prthumanval().

PR: bin/125365
Approved by: trasz (mentor)
MFC after: 2 weeks

14 years agoDouble checking my commit I found that comment saying that
ache [Mon, 18 Jan 2010 13:44:44 +0000 (13:44 +0000)]
Double checking my commit I found that comment saying that
POSIX 2008 and XSI 7require strcoll() for opendir() is not true.
I can't find such requirement in POSIX 2008 and XSI 7.

So, back out that part of my commit, returning old strcmp(), and remove
this misleading comment.

14 years agoacpi_ec: remove redundant acpi_disabled check in probe method
avg [Mon, 18 Jan 2010 11:33:58 +0000 (11:33 +0000)]
acpi_ec: remove redundant acpi_disabled check in probe method

MFC after: 4 days

14 years agoLet pam_lastlog use random ut_id's.
ed [Mon, 18 Jan 2010 11:29:51 +0000 (11:29 +0000)]
Let pam_lastlog use random ut_id's.

By using random values for ut_id, not based on the TTY name, it is
possible to run for example login(1) multiple times on the same TTY,
without overwriting any previous records.

The output of w(1) will then be as follows:

| 12:26PM  up 2 days,  2:31, 5 users, load averages: 0.01, 0.03, 0.03
| USER       TTY      FROM                      LOGIN@  IDLE WHAT
| ed         pts/2    mekker.80386.nl          12:26PM     - w
| root       pts/2    -                        12:26PM     - w
| root       pts/2    -                        12:26PM     - w
| root       pts/2    -                        12:26PM     - w

Approved by: des

14 years agoAlso let getent(1) print values of ut_pid.
ed [Mon, 18 Jan 2010 10:50:25 +0000 (10:50 +0000)]
Also let getent(1) print values of ut_pid.

14 years agoacpi_ec: clean up 'private' ivar when freeing memory to which it points
avg [Mon, 18 Jan 2010 10:30:11 +0000 (10:30 +0000)]
acpi_ec: clean up 'private' ivar when freeing memory to which it points

This is not only a prudent thing to do, but also makes sure that probe
method is not confused by non-NULL 'private', if the previous attach
attempt fails for any reason.

PR: kern/142561
Tested by: Alex Goncharov <alex-goncharov@comcast.net>
MFC after: 4 days

14 years agopreserve errno when processing error cases.
davidxu [Mon, 18 Jan 2010 10:29:04 +0000 (10:29 +0000)]
preserve errno when processing error cases.

14 years agoa) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires.
ache [Mon, 18 Jan 2010 10:17:51 +0000 (10:17 +0000)]
a) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires.
   It also matches now how our 'ls' works for years.

b) Remove comment expressed 2 fears:
 1) One just simple describe how strcoll() works in _any_ context,
 not for directories only. Are we plan to remove strcoll() from everything
 just because it is little more complex than strcmp()? I doubt, and
 directories give nothing different here. Moreover, strcoll() used
 in 'ls' for years and nobody complaints yet.

 2) Plain wrong statement about undefined strcoll() behaviour. strcoll()
 always gives predictable results, falling back to strcmp() on any
 trouble, see strcoll(3).

No objections from -current list discussion.

14 years agoAdd command-line option -dev to set the default value of the currdev
marcel [Mon, 18 Jan 2010 06:48:24 +0000 (06:48 +0000)]
Add command-line option -dev to set the default value of the currdev
variable. This is to be used by the EFI boot manager.

While here, re-factor the code a little bit and bump the version to
2.1.

14 years ago- Allow clock subsystem to be compiled without the apic support [0]
attilio [Sun, 17 Jan 2010 23:23:35 +0000 (23:23 +0000)]
- Allow clock subsystem to be compiled without the apic support [0]
- ATPIC, on pc98 is never defined somewhere, differently from i386.
  Turn its compilation to be conditional as i386 does. [1]

[0] Reported by: nyan
[1] Submitted by: nyan

14 years agoRaise WARNS for various tools where possible.
ed [Sun, 17 Jan 2010 21:56:27 +0000 (21:56 +0000)]
Raise WARNS for various tools where possible.

Submitted by: Marius NĂ¼nnerich <marius@nuenneri.ch>

14 years agoMute some (hidden) warnings about old-style function definitions.
ed [Sun, 17 Jan 2010 21:53:41 +0000 (21:53 +0000)]
Mute some (hidden) warnings about old-style function definitions.

Submitted by: Marius NĂ¼nnerich <marius nuenneri ch>

14 years agoPerform several small cleanups to the utmpx code.
ed [Sun, 17 Jan 2010 21:40:05 +0000 (21:40 +0000)]
Perform several small cleanups to the utmpx code.

- Massively reduce BSS usage. Let futx_to_utx() dynamically allocate the
  structure. There is only a very small amount of applications out there
  that needs to use the utmpx database. Wasting 1 KB on unused
  structures makes little sense.

- Just let getutxid() search for matching ut_id's for any *PROCESS-type.
  This makes the code a bit more future-proof.

- Fix a POSIX-mistake: when reading POSIX and the OpenSolaris
  implementation, getutxline() must return USER_PROCESS and
  LOGIN_PROCESS records whose ut_lines match. When reading POSIX, it
  seems LOGIN_PROCESS should not use ut_line at the first place. I have
  reported this issue.

14 years agoWhen a vnode-backed vm object is referenced, it increments the vnode
kib [Sun, 17 Jan 2010 21:26:14 +0000 (21:26 +0000)]
When a vnode-backed vm object is referenced, it increments the vnode
reference count, and decrements it on dereference. If referenced object
is deallocated, object type is reset to OBJT_DEAD. Consequently, all
vnode references that are owned by object references are never released.
vunref() the vnode in vm object deallocation code for OBJT_VNODE
appropriate number of times to prevent leak.

Add an assertion to the vm_pageout() to make sure that we never get
reference on the vnode but then do not execute code to release it.

In collaboration with: pho
Reviewed by: alc
MFC after: 3 weeks

14 years agoAdd new function vunref(9) that decrements vnode use count (and hold
kib [Sun, 17 Jan 2010 21:24:27 +0000 (21:24 +0000)]
Add new function vunref(9) that decrements vnode use count (and hold
count) while vnode is exclusively locked.

The code for vput(9), vrele(9) and vunref(9) is merged.

In collaboration with: pho
Reviewed by: alc
MFC after: 3 weeks

14 years agoAdd forgotten break; keyword to getutxid().
ed [Sun, 17 Jan 2010 21:00:29 +0000 (21:00 +0000)]
Add forgotten break; keyword to getutxid().

We should not fall through to the ut_id comparison. Only ut_type should
be compared when using OLD_TIME, NEW_TIME, BOOT_TIME or SHUTDOWN_TIME.

14 years agoGet rid of a lot of duplicated code for NR-SACK handle.
tuexen [Sun, 17 Jan 2010 21:00:28 +0000 (21:00 +0000)]
Get rid of a lot of duplicated code for NR-SACK handle.
Generalize the SACK to code handle also NR-SACKs.

14 years agoBug fix: If the allocation of a socket failed and we
rrs [Sun, 17 Jan 2010 19:47:59 +0000 (19:47 +0000)]
Bug fix: If the allocation of a socket failed and we
freed the inpcb, it was possible to not set the
proper flags on the pcb (i.e. the socket is not there).
This is HIGHLY unlikely since no one else should be
able to find the socket.. but for consistency we
do the proper loop thing to make sure that we
mark the socket as gone on the PCB.

14 years agoUnbreak builds with _FREEFALL_CONFIG=yes, by forcing a lower WARNS
marcel [Sun, 17 Jan 2010 19:47:42 +0000 (19:47 +0000)]
Unbreak builds with _FREEFALL_CONFIG=yes, by forcing a lower WARNS
level in that case.

14 years agoPulls out another leaked windows ifdef that somehow
rrs [Sun, 17 Jan 2010 19:40:21 +0000 (19:40 +0000)]
Pulls out another leaked windows ifdef that somehow
made its way through the scrubber.

14 years agoThis change syncs up the socketAPI stream-reset
rrs [Sun, 17 Jan 2010 19:35:38 +0000 (19:35 +0000)]
This change syncs up the socketAPI stream-reset
values to match those in linux and the I-D
just released to the IETF.

14 years agoSmall fixes.
brueffer [Sun, 17 Jan 2010 19:33:32 +0000 (19:33 +0000)]
Small fixes.

14 years agoMore leaked ifdefs for APPLE and its mobility stuff.
rrs [Sun, 17 Jan 2010 19:24:30 +0000 (19:24 +0000)]
More leaked ifdefs for APPLE and its mobility stuff.

14 years agoRemove another set of "leaked" ifdefs that somehow found
rrs [Sun, 17 Jan 2010 19:21:50 +0000 (19:21 +0000)]
Remove another set of "leaked" ifdefs that somehow found
their way into FreeBSD.

14 years agoRemove strange APPLE define that leaked
rrs [Sun, 17 Jan 2010 19:17:16 +0000 (19:17 +0000)]
Remove strange APPLE define that leaked
through the scrubber scripts. Scripts are
now fixed so this won't happen again.

14 years agoFix a regression that was introduced in r191882.
ed [Sun, 17 Jan 2010 17:52:35 +0000 (17:52 +0000)]
Fix a regression that was introduced in r191882.

I changed login_tty() to only work when the application is not a session
leader yet. This works fine for applications in the base system, but it
turns out various applications call this function after daemonizing,
which means they already use their own session.

If setsid() fails, just call tcsetsid() on the current session.
tcsetsid() will already perform proper security checks.

Reported by: Oliver Lehmann
MFC after: 1 week

14 years agoSimplify ttyslot(3).
ed [Sun, 17 Jan 2010 15:43:14 +0000 (15:43 +0000)]
Simplify ttyslot(3).

After comparing how other systems deal with utmp/utmpx, I noticed many
systems don't even care about ttyslot(3) anymore, since utmpx doesn't
use TTY slots anyway. We don't provide any tools to access old utmp
files anymore, so there is no use in letting applications write to a
proper offset within the utmp file.

Just let ttyslot(3) always return 0, which seems to be the default
behaviour on operating systems like Linux as well.

14 years agoGarbage collect references to the no longer implemented tcp_fasttimo().
bz [Sun, 17 Jan 2010 13:07:52 +0000 (13:07 +0000)]
Garbage collect references to the no longer implemented tcp_fasttimo().

Discussed with: rwatson
MFC after: 5 days

14 years agoAdd ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control
bz [Sun, 17 Jan 2010 12:57:11 +0000 (12:57 +0000)]
Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control
whether to use source address selection (default) or the primary
jail address for unbound outgoing connections.

This is intended to be used by people upgrading from single-IP
jails to multi-IP jails but not having to change firewall rules,
application ACLs, ... but to force their connections (unless
otherwise changed) to the primry jail IP they had been used for
years, as well as for people prefering to implement similar policies.

Note that for IPv6, if configured incorrectly, this might lead to
scope violations, which single-IPv6 jails could as well, as by the
design of jails. [1]

Reviewed by: jamie, hrs (ipv6 part)
Pointed out by: hrs [1]
MFC After: 2 weeks
Asked for by: Jase Thew (bazerka beardz.net)

14 years agoImplement an "-x" option to cp(1), for compatibility with Linux and
gavin [Sun, 17 Jan 2010 09:37:31 +0000 (09:37 +0000)]
Implement an "-x" option to cp(1), for compatibility with Linux and
feature parity with du(1) and similar:  When set, cp(1) will not traverse
mount points.

Initial patch by:       Graham J Lee   leeg teaching.physics.ox.ac.uk

PR: bin/88056
Initial patch by: Graham J Lee   leeg teaching.physics.ox.ac.uk
Approved by: ed (mentor)
MFC after: 1 month

14 years agoRemove the rules using 'me6'. Now, 'me' matches both any IPv6 address
ume [Sun, 17 Jan 2010 08:41:07 +0000 (08:41 +0000)]
Remove the rules using 'me6'.  Now, 'me' matches both any IPv6 address
and any IPv4 address configured on an interface in the system.

Reviewed by: David Horn <dhorn2000__at__gmail.com>, luigi, qingli
MFC after: 2 weeks

14 years agoChange 'me' to match any IPv6 address configured on an interface in
ume [Sun, 17 Jan 2010 08:39:48 +0000 (08:39 +0000)]
Change 'me' to match any IPv6 address configured on an interface in
the system as well as any IPv4 address.

Reviewed by: David Horn <dhorn2000__at__gmail.com>, luigi, qingli
MFC after: 2 weeks

14 years agoCorrect a typo (when we talk about offset, it should
delphij [Sun, 17 Jan 2010 08:12:28 +0000 (08:12 +0000)]
Correct a typo (when we talk about offset, it should
be offset, not size).

Submitted by: pluknet at gmail com

14 years agoStripe offset may be usable even without stripe size known,
delphij [Sun, 17 Jan 2010 08:10:37 +0000 (08:10 +0000)]
Stripe offset may be usable even without stripe size known,
so give the output when either is non-zero.

Suggested by: mav

14 years agoExpose stripe offset and stripe size through libgeom and geom(8) userland
delphij [Sun, 17 Jan 2010 06:20:30 +0000 (06:20 +0000)]
Expose stripe offset and stripe size through libgeom and geom(8) userland
utilities.

Reviewed by: pjd, mav (earlier version)

14 years agoUpdate the sparc64 hardware list regarding machines that will be supported
marius [Sat, 16 Jan 2010 20:51:33 +0000 (20:51 +0000)]
Update the sparc64 hardware list regarding machines that will be supported
by 7.3-RELEASE.

Approved by: blackend
MFC after: 3 days

14 years agoUpdate files to remove when MK_ZFS=no.
antoine [Sat, 16 Jan 2010 20:42:50 +0000 (20:42 +0000)]
Update files to remove when MK_ZFS=no.

14 years agoUpdate files to remove when MK_CDDL=no.
antoine [Sat, 16 Jan 2010 20:40:12 +0000 (20:40 +0000)]
Update files to remove when MK_CDDL=no.

14 years agoAdd files to remove when MK_CALENDAR=no.
antoine [Sat, 16 Jan 2010 20:36:27 +0000 (20:36 +0000)]
Add files to remove when MK_CALENDAR=no.

14 years agoGet rid of support of an old version of the SCTP-AUTH draft.
tuexen [Sat, 16 Jan 2010 20:04:17 +0000 (20:04 +0000)]
Get rid of support of an old version of the SCTP-AUTH draft.
Get rid of unused MD5 code.

MFC after: 1 week

14 years agoDo not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf
antoine [Sat, 16 Jan 2010 17:08:22 +0000 (17:08 +0000)]
Do not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf

Submitted by: bf
MFC after: 2 weeks

14 years agoUnexpose the old uname(3) function.
ed [Sat, 16 Jan 2010 17:05:27 +0000 (17:05 +0000)]
Unexpose the old uname(3) function.

Nowadays uname(3) is an inline function around __xuname(3). Prevent
linkage of new binaries against this compatibility function, similar to
what I did with ttyslot(3).

14 years agoFix HISTORY section to detail the history of the driver, not the man page.
gavin [Sat, 16 Jan 2010 14:33:22 +0000 (14:33 +0000)]
Fix HISTORY section to detail the history of the driver, not the man page.

Approved by: ed (mentor, implicit)

14 years agoFix loader.conf(5) Xref
gavin [Sat, 16 Jan 2010 14:32:02 +0000 (14:32 +0000)]
Fix loader.conf(5) Xref

Approved by: ed (mentor, implicit)

14 years agoXref sysctl(3)
gavin [Sat, 16 Jan 2010 14:31:01 +0000 (14:31 +0000)]
Xref sysctl(3)

Approved by: ed (mentor)

14 years agoregen
antoine [Sat, 16 Jan 2010 12:27:15 +0000 (12:27 +0000)]
regen

MFC after: 2 weeks

14 years agoUnbreak the build for pc98. Specify the newly introduced, for ia32,
attilio [Sat, 16 Jan 2010 12:24:12 +0000 (12:24 +0000)]
Unbreak the build for pc98. Specify the newly introduced, for ia32,
DEV_ATPIC also for pc98.

Pointy hat to: me

14 years agoUnbreak world WITHOUT_NETGRAPH.
antoine [Sat, 16 Jan 2010 12:20:26 +0000 (12:20 +0000)]
Unbreak world WITHOUT_NETGRAPH.

PR: 137487
Submitted by: bf (previous version)
No objections: net@
MFC after: 2 weeks

14 years agoAdd gmountver, disk mount verification GEOM class.
trasz [Sat, 16 Jan 2010 09:52:49 +0000 (09:52 +0000)]
Add gmountver, disk mount verification GEOM class.

Note that due to e.g. write throttling ('wdrain'), it can stall all the disk
I/O instead of just the device it's configured for.  Using it for removable
media is therefore not a good idea.

Reviewed by: pjd (earlier version)

14 years agoAmazingly we've been freeing a handle and using that which it refers to
mjacob [Fri, 15 Jan 2010 20:08:08 +0000 (20:08 +0000)]
Amazingly we've been freeing a handle and using that which it refers to
for years. Bad!

MFC after: 1 week

14 years agoManpage for the siba(4) Sonic Inc. Silicon Backplane driver.
brueffer [Fri, 15 Jan 2010 19:34:40 +0000 (19:34 +0000)]
Manpage for the siba(4) Sonic Inc. Silicon Backplane driver.

Submitted by: weongyo

14 years agoDon't free mbuf chains when bge(4) fails to collapse the mbuf
yongari [Fri, 15 Jan 2010 17:55:18 +0000 (17:55 +0000)]
Don't free mbuf chains when bge(4) fails to collapse the mbuf
chains. This part of code is to enhance performance so failing the
collapsing should not free TX frames. Otherwise bge(4) will
unnecessarily drop frames which in turn can freeze the network
connection.

Reported by: Igor Sysoev (is <> rambler-co dot ru)
Tested by: Igor Sysoev (is <> rambler-co dot ru)

14 years agoHandling all the three clocks (hardclock, softclock, profclock) with the
attilio [Fri, 15 Jan 2010 16:04:30 +0000 (16:04 +0000)]
Handling all the three clocks (hardclock, softclock, profclock) with the
LAPIC may lead to aliasing for softclock and profclock because frequencies
are sized in order to fit mainly hardclock.
atrtc used to take care of the softclock and profclock and it does still
do, if the LAPIC can't handle the clocks properly.

Revert the change when the LAPIC started taking charge of all three of
them and let atrtc handle softclock and profclock if not explicitly
requested. Such request can be made setting != 0 the new tunable
machdep.lapic_allclocks or if the new device ATPIC is not present
within the i386 kernel config (atrtc is linked to atpic presence).

Diagnosed by: Sandvine Incorporated
Reviewed by: jhb, emaste
Sponsored by: Sandvine Incorporated
MFC: 3 weeks

14 years agoUse the newly brought %U macro.
ru [Fri, 15 Jan 2010 16:01:22 +0000 (16:01 +0000)]
Use the newly brought %U macro.

14 years agoWhitespace change to be able to provide the correct commit log for r202364:
netchild [Fri, 15 Jan 2010 15:38:31 +0000 (15:38 +0000)]
Whitespace change to be able to provide the correct commit log for r202364:
---snip---
Add video clipping support but with the caveats below.

Background info:

Video clipping allows the user to provide either a series of clip rectangles
or a clip bitmap to the driver and have the driver mask the video according
to the clipping specs provided.

Adding support for clipping to the FreeBSD Linux emulator is problematic
because it seems that this feature is not supported by many drivers and
therefore it is ignored by many applications. Unfortunately, when not
using it, rather than passing in a null clipping list, some apps leave the
clipping fields uninitialized, casuing random values to be passed in. In
the case where the driver does not use the clipping info, this is not a
problem (although it is bad form). But the Linux emulator does not know
which drivers will use this and which won't, so the Linux emulator must
try to handle this clip list, and deal gracefully with cases where the
values seem to be uninitialized.

Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields
in the video_window structure: the integer clipcount and the pointer clips.

How the linuxulator handles this from this commit on:

    * if (clipcount == VIDEO_CLIP_BITMAP)
      The clips variable is a void * pointer to a 128*625 byte
      (1024*625 bit) memory area containing a bitmap of the clipping area.
      The pointer in the video_window structure is copied, but no
      video_clip structures are copied.
    * if (clipcount > 0 && clipcount <= 16384)
      The clips variable is pointer to a list of video_clip structures. Up
      to clipcount structures are copied and passed to the driver.
      The upper limit of 16384 was imposed here so that user code that does
      not properly initialize clipcount falls through below and no attempt
      is made to copy an uninitialized list. This value was found by
      examining Linux drivers that support the clip list.
    * else
      The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or
      positive (> 16384).
      All these cases are treated as invalid data. Both the clipcount field
      and clips pointer are forced to zero/NULL and passed to the driver.

It should be noted that, at the time of developing this V4L emulator code,
the pwc(4) V4L driver does not support clipping.

Submitted by: J.R. Oldroyd <fbsd@opal.com>
MFC after: 1 month
---snip---

14 years agoPull up vendor changes.
ru [Fri, 15 Jan 2010 15:10:29 +0000 (15:10 +0000)]
Pull up vendor changes.

14 years agoThis is v4l support for the linuxulator. This allows to access FreeBSD
netchild [Fri, 15 Jan 2010 14:58:19 +0000 (14:58 +0000)]
This is v4l support for the linuxulator. This allows to access FreeBSD
native devices which support the v4l API from processes running within
the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd driver.

Not tested is firmware upload, framebuffer stuff and video tuner stuff
due to lack of hardware.
The clipping part (VIDIOCSWIN) needs a little bit of further work (partly
in progress, but can not be tested due to lack of a suitable device).

The submitter tested this sucessfully with Skype and flash apps on amd64 and
i386 with the multimedia/pwcbsd driver.

Submitted by: J.R. Oldroyd <fbsd@opal.com>

14 years agoMoved the doc-str-Lb-libulog string definition to where it belongs.
ru [Fri, 15 Jan 2010 14:05:06 +0000 (14:05 +0000)]
Moved the doc-str-Lb-libulog string definition to where it belongs.

14 years agoPull up vendor changes. The following local changes made obsolete:
ru [Fri, 15 Jan 2010 13:59:50 +0000 (13:59 +0000)]
Pull up vendor changes.  The following local changes made obsolete:

- Addition of several FreeBSD versions.
- r192561 that attempted to fix UTF-8 issues.

14 years agoDo not free the dmamap if it is still busy.
cognet [Fri, 15 Jan 2010 12:39:48 +0000 (12:39 +0000)]
Do not free the dmamap if it is still busy.

Submitted by: Mark Tinguely
MFC after: 3 days

14 years agoOnly allocate the space we need before calling kern_getgroups instead
brooks [Fri, 15 Jan 2010 07:18:46 +0000 (07:18 +0000)]
Only allocate the space we need before calling kern_getgroups instead
of allocating what ever the user asks for up to "ngroups_max + 1".  On
systems with large values of kern.ngroups this will be more efficient.

The now redundant check that the array is large enough in
kern_getgroups() is deliberate to allow this change to be merged to
stable/8 without breaking potential third party consumers of the API.

Reported by: bde
MFC after: 28 days

14 years agoSince all other comparisons involving ngroups_max use
brooks [Fri, 15 Jan 2010 07:05:00 +0000 (07:05 +0000)]
Since all other comparisons involving ngroups_max use
"ngroups_max + 1", use ">= ngroups_max+1" instead of the equivalent
"> ngroups_max" to reduce confusion.

14 years agoOops, deleted one line too many. Add back the null case for IGNORE_MOTD
dougb [Fri, 15 Jan 2010 04:09:22 +0000 (04:09 +0000)]
Oops, deleted one line too many. Add back the null case for IGNORE_MOTD

14 years agoNow that we've officially arrived at FreeBSD 9, remove the IGNORE_MOTD
dougb [Fri, 15 Jan 2010 03:56:48 +0000 (03:56 +0000)]
Now that we've officially arrived at FreeBSD 9, remove the IGNORE_MOTD
compat shim as advertised. This change should not be MFC'ed.

14 years agoAlso call sem_module_init in sem_close to initialize mutex
davidxu [Fri, 15 Jan 2010 01:19:58 +0000 (01:19 +0000)]
Also call sem_module_init in sem_close to initialize mutex
with some attributes.

14 years agoIn 'make delete-old', use 'exec' to redirect an fd persistently.
jilles [Thu, 14 Jan 2010 23:27:23 +0000 (23:27 +0000)]
In 'make delete-old', use 'exec' to redirect an fd persistently.

That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in
r199953, the latter also persisted, provided that fd 3 was not open before.
With newer sh or fd 3 open, it would not delete orphaned catpages.

MFC after: 2 weeks

14 years agoAdd manpages for ipwfw(4) and iwifw(4), based on iwnfw(4).
brueffer [Thu, 14 Jan 2010 22:21:43 +0000 (22:21 +0000)]
Add manpages for ipwfw(4) and iwifw(4), based on iwnfw(4).

MFC after: 2 weeks

14 years agoFix a typo: accouting -> accounting.
ed [Thu, 14 Jan 2010 22:21:20 +0000 (22:21 +0000)]
Fix a typo: accouting -> accounting.

14 years agoFix a few whitespace issues and comment typos that I found while reading
joel [Thu, 14 Jan 2010 22:04:08 +0000 (22:04 +0000)]
Fix a few whitespace issues and comment typos that I found while reading
through this file.

14 years agoAdd wtmpcvt(1).
ed [Thu, 14 Jan 2010 20:58:45 +0000 (20:58 +0000)]
Add wtmpcvt(1).

This utility allows users to convert their wtmp databases to the new
format. It makes no sense for users to keep their wtmp log files if they
are unable to view them.

It basically copies ut_line into ut_id as well. This makes it possible
for last(1) and ac(8) to match login records with their corresponding
logout record.

14 years agoFix bugs introduced in previous commit: off-by-one in add_meshconf() and
rpaulo [Thu, 14 Jan 2010 19:23:41 +0000 (19:23 +0000)]
Fix bugs introduced in previous commit: off-by-one in add_meshconf() and
big-endian bug on verify_meshconf()

14 years agoAdd check for fiber mode for BCM5714 PHY. This PHY supports both
yongari [Thu, 14 Jan 2010 19:14:24 +0000 (19:14 +0000)]
Add check for fiber mode for BCM5714 PHY. This PHY supports both
copper and fiber interfaces over GMII so an explicit check is
necessary to know whether it was configured for fiber interface.
This change make BCM5715S work.

Tested by: olli
MFC after: 1 week

14 years agoFor controllers that has dual mode PHY(copper or fiber) interfaces
yongari [Thu, 14 Jan 2010 19:08:43 +0000 (19:08 +0000)]
For controllers that has dual mode PHY(copper or fiber) interfaces
over GMII, make sure to enable GMII. With this change brgphy(4) is
used to handle the dual mode PHY. Since we still don't have a sane
way to pass PHY specific information to mii(4) layer special
handling is needed in brgphy(4) to determine which mode of PHY was
configured in parent interface.
This change make BCM5715S work.

Tested by: olli
Obtained from: OpenBSD
MFC after: 1 week

14 years agoBuild iwi(4) and iwifw(4) modules on amd64 as well.
brueffer [Thu, 14 Jan 2010 16:49:22 +0000 (16:49 +0000)]
Build iwi(4) and iwifw(4) modules on amd64 as well.

PR: 113117
Submitted by: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
MFC after: 1 week

14 years agoReject invalid CIDR widths rather than silently stopping at the first
emaste [Thu, 14 Jan 2010 15:27:18 +0000 (15:27 +0000)]
Reject invalid CIDR widths rather than silently stopping at the first
non-digit character.

Due to an issue with rc(8) in a test configuration, ifconfig was being
invoked with the address used again as the width - for example,

  ifconfig vlan0 10.0.0.1/10.0.0.1

Prior to this change, that address/width would be interpreted as
10.0.0.1/10.

14 years agoRemove ttyslot from Symbol.map anyway.
ed [Thu, 14 Jan 2010 15:20:46 +0000 (15:20 +0000)]
Remove ttyslot from Symbol.map anyway.

Requested by: kan

14 years agoUnbreak pututxline() on 32-bit architectures.
ed [Thu, 14 Jan 2010 15:20:09 +0000 (15:20 +0000)]
Unbreak pututxline() on 32-bit architectures.

I forgot to cast the size_t's back to off_t before negating them,
causing all sorts of artifacts where the log files would grow to 2^32 -
197 bytes.

Reported by: ume

14 years agoUpdate the ident for the XENHVM kernel config to match the filename.
jhb [Thu, 14 Jan 2010 15:07:18 +0000 (15:07 +0000)]
Update the ident for the XENHVM kernel config to match the filename.

MFC after: 1 week

14 years ago- Note that if_xname, if_dname, and if_dunit are usually initialized via
jhb [Thu, 14 Jan 2010 14:43:16 +0000 (14:43 +0000)]
- Note that if_xname, if_dname, and if_dunit are usually initialized via
  if_initname().
- Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE)
  with references to IFF_DRV_(RUNNING|OACTIVE).
- Complete truncated sentence in the description of if_transmit by copying
  from the description in if_qflush.
- Add missing line breaks for translators.

Reviewed by: brooks (1)
MFC after: 3 days

14 years ago- Update required headers for namei() to add <sys/fcntl.h> and remove
jhb [Thu, 14 Jan 2010 14:36:39 +0000 (14:36 +0000)]
- Update required headers for namei() to add <sys/fcntl.h> and remove
  <sys/proc.h>.
- Add RETURN VALUES and ERROR sections for namei()'s error return values.
- Add a missing link to NDHASGIANT.9.

PR: docs/142815, docs/142816
Submitted by: Lachlan Kang (1, 2)
MFC after: 3 days