jh [Fri, 22 Jan 2010 08:51:58 +0000 (08:51 +0000)]
Make mdconfig(8) WARNS=6 clean:
- Constify geom_config_get() name argument.
- Add void keyword for usage().
- Initialize mdunit to NULL.
- Don't call md_prthumanval() at all if length is NULL.
jh [Fri, 22 Jan 2010 08:45:12 +0000 (08:45 +0000)]
Truncate read request rather than returning EIO if the request is
larger than MAXPHYS + 1. This fixes a problem with cat(1) when it
uses a large I/O buffer.
Reported by: Fernando Apesteguía
Suggested by: jilles
Reviewed by: des
Approved by: trasz (mentor)
ed [Fri, 22 Jan 2010 04:53:08 +0000 (04:53 +0000)]
Remove comments about breaking the specification.
I've discussed this issue with the Austin Group and it will be fixed in
future revisions of the specification. The issue was that ut_line fields
weren't supposed to be valid for LOGIN_PROCESS entries, while
getutxline() would try to match these records anyway.
They also agreed on our way of implementing pututxline() without
getutxid() (which other operating systems also do), but unfortunately
they disagreed with our way of replacing DEAD_PROCESS entries, which is
a pity. The current specification allows the utmpx database to become
infinitely big over time.
See also: http://austingroupbugs.net/view.php?id=213#c378
rmacklem [Thu, 21 Jan 2010 20:57:25 +0000 (20:57 +0000)]
Add a timeout for the negative name cache entries in the NFS client.
This avoids a bogus negative name cache entry from persisting forever
when another client creates an entry with the same name within the
same NFS server time of day clock tick. The mount option negnametimeo
can be used to override the default timeout interval on a
per-mount-point basis. Setting negnametimeo to 0 disables negative
name caching for the mount point.
I also fixed one obvious typo where args.timeo should be
args.maxgrouplist.
ed [Thu, 21 Jan 2010 16:56:27 +0000 (16:56 +0000)]
Remove libulog from the bootstrap again.
libulog now only provides functions that are used by various packages
from the ports tree, namely the libutempter ones. There is no reason to
link it into the crunch/fixit binaries anymore.
nwhitehorn [Thu, 21 Jan 2010 03:49:18 +0000 (03:49 +0000)]
Fix a bug when printing attributes from multiple files: buflen could be
longer than the length of the current attribute if the buffer were reused
and previously longer, so bits of the previous, longer attribute would be
written. Fix this by using the actual attribute length.
neel [Thu, 21 Jan 2010 02:21:31 +0000 (02:21 +0000)]
Get rid of redundant setting of interrupt enable bit when restoring the status
register from the PCB.
Remove a couple of misleading comments while I am here. The comments are
misleading because they imply that interrupts will be enabled after the
status register is restored from the PCB. This is not the case because
the processor is at the exception level (SR_EXL is set).
gonzo [Thu, 21 Jan 2010 00:15:59 +0000 (00:15 +0000)]
- Remove unnecessary register writes in activate_device
and deactivate_device
- Save state before attaching driver and restore it when
detaching
- Clear CLK bit after last bit of byte has been sent over
the bus providing falling edge for last byte in transfer
- Fix several places where CS0 was always assumed
- Add $FreeBSD$ to ar71xxreg.h
gabor [Wed, 20 Jan 2010 21:30:52 +0000 (21:30 +0000)]
Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a good
compatibility level with the GNU counterparts and have shown to be mature
enough. For now, the GNU versions aren't removed from the tree, just detached
from the build.
Sponsored by: Google Summer of Code 2008
Portbuild run by: erwin
Approved by: delphij
davidch [Wed, 20 Jan 2010 20:33:10 +0000 (20:33 +0000)]
- Added a workaround for NC-SI management firmware that would allow
frames to be accepted while the driver is resetting the hardware.
This failure is generally observed when broadcast frames are received
during driver load and will generate "Unable to write CTX memory"
errors.
- Small changes to driver flags display.
jh [Wed, 20 Jan 2010 16:56:20 +0000 (16:56 +0000)]
- Change the type of nodes_max to u_int and use "%u" format string to
convert its value. [1]
- Set default tm_nodes_max to min(pages + 3, UINT32_MAX). It's more
reasonable than the old four nodes per page (with page size 4096) because
non-empty regular files always use at least one page. This fixes possible
overflow in the calculation. [2]
- Don't allow more than tm_nodes_max nodes allocated in tmpfs_alloc_node().
hrs [Wed, 20 Jan 2010 16:50:13 +0000 (16:50 +0000)]
Simply ignore unsupported protocols listed in /etc/netconfig and
abort only if no transport is available. This fixes
(INET && !INET6) and (!INET && INET6) case, for example.
rpaulo [Wed, 20 Jan 2010 14:29:55 +0000 (14:29 +0000)]
Make ata_getrev() an optional method by implementing ata_null_getrev().
This fixes a bogus '???' boot message on Cambria boards with a CompactFlash
card.
mav [Wed, 20 Jan 2010 13:31:12 +0000 (13:31 +0000)]
- Add -v argument to `camcontrol identify` command. It makes camcontrol
print full identify data block.
- Improve identify result view and add TRIM support.
kib [Wed, 20 Jan 2010 11:58:04 +0000 (11:58 +0000)]
When traced process is about to receive the signal, the process is
stopped and debugger may modify or drop the signal. After the changes to
keep process-targeted signals on the process sigqueue, another thread
may note the old signal on the queue and act before the thread removes
changed or dropped signal from the process queue. Since process is
traced, it usually gets stopped. Or, if the same signal is delivered
while process was stopped, the thread may erronously remove it,
intending to remove the original signal.
Remove the signal from the queue before notifying the debugger. Restore
the siginfo to the head of sigqueue when signal is allowed to be
delivered to the debugee, using newly introduced KSI_HEAD ksiginfo_t
flag. This preserves required order of delivery. Always restore the
unchanged signal on the curthread sigqueue, not to the process queue,
since the thread is about to get it anyway, because sigmask cannot be
changed.
Handle failure of reinserting the siginfo into the queue by falling
back to sq_kill method, calling sigqueue_add with NULL ksi.
If debugger changed the signal to be delivered, use sigqueue_add()
with NULL ksi instead of only setting sq_signals bit.
Reported by: Gardner Bell <gbell72 rogers com>
Analyzed and first version of fix by: Tijl Coosemans <tijl coosemans org>
PR: 142757
Reviewed by: davidxu
MFC after: 2 weeks
np [Wed, 20 Jan 2010 03:40:43 +0000 (03:40 +0000)]
Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6
layers with non-sleepable locks held. Don't (potentially) sleep in
those situations.
delphij [Wed, 20 Jan 2010 01:07:38 +0000 (01:07 +0000)]
Add a new option, -P, which reverts newsyslog(8) to the old behavior,
which stops to proceed further, as it is possible that processes which
fails to create PID file get screwed by rotation.
ed [Tue, 19 Jan 2010 23:07:12 +0000 (23:07 +0000)]
Revert r202447 by re-exposing the old uname(3) function.
It makes hardly any sense to expose a symbol which should only be
provided for binary compatibility, but it seems we don't have a lot of
choice here. There are many autoconf scripts out there that try to
create a binary that links against the old symbol to see whether
uname(3) is present. These scripts fail to detect uname(3) now.
It should be noted that the behaviour we implement is not against the
standards:
| The following shall be declared as a function and may also be defined
| as a macro:
|
| int uname(struct utsname *);
ed [Tue, 19 Jan 2010 19:53:05 +0000 (19:53 +0000)]
Make last(1) display the full log file.
I must have misread when I ported the original last(1) source code.
Instead of only processing the last 1024 entries, it reads them in in
chucks of 1024 entries at a time.
Unfortunately we cannot walk through the log file in reverse order,
which means we have to allocate a piece of memory to hold all the
entries. Call realloc() for each 128 entries we read.
fanf [Tue, 19 Jan 2010 18:13:54 +0000 (18:13 +0000)]
Add a -o outfile option, which can be used to specify an output file. The
file can safely be the same as the input file. Idea from IRIX unifdef(1).
This version fixes a bug in the NetBSD unifdef which refuses to
write to a -o outfile which does not exist.
ed [Tue, 19 Jan 2010 15:31:18 +0000 (15:31 +0000)]
Recommit r193732:
Remove __gnu89_inline.
Now that we use C99 almost everywhere, just use C99-style in the pmap
code. Since the pmap code is the only consumer of __gnu89_inline, remove
it from cdefs.h as well. Because the flag was only introduced 17 months
ago, I don't expect any problems.
Reviewed by: alc
It was backed out, because it prevented us from building kernels using a
7.x compiler. Now that most people use 8.x, there is nothing that holds
us back. Even if people run 7.x, they should be able to build a kernel
if they run `make kernel-toolchain' or `make buildworld' first.
thompsa [Tue, 19 Jan 2010 05:00:57 +0000 (05:00 +0000)]
Use the iflladdr_event event to keep the mac address on the vap in sync with
the parent wirless interface. If the user passed in a mac address or it was
autogenerated then flag this to avoid trashing it on update.
weongyo [Tue, 19 Jan 2010 01:11:27 +0000 (01:11 +0000)]
removes a hack to attach TRENDnet TEW-504UB/EU that I think this issue
is solved with r202607. Now idProduct of all uath(4) devices should be
decreased after loading the firmware.
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
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.
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.
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.
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.
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.
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
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
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).
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]
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.
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.
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.