Gleb Smirnoff [Mon, 16 May 2005 18:50:26 +0000 (18:50 +0000)]
- Fix build with TRACE_MESSAGES on.
- Reformat code under TRACE_MESSAGES to make it more readable.
- Move linker hackery out of #ifdef.
- Break long lines in linker hackery block.
David E. O'Brien [Mon, 16 May 2005 18:17:38 +0000 (18:17 +0000)]
Hardcode username to 8 characters. This makes top(1) output sane when
there are users on the system (even if not running a single process)
with a login > 8 chars.
I'm not all that happy limiting the username width like this, but it
restores sanity to top(1) output.
Gleb Smirnoff [Mon, 16 May 2005 17:07:03 +0000 (17:07 +0000)]
- Extend interface of ng_getqblk(), so that malloc wait flags are
specified by caller.
- Change ng_send_item() interface - use 'flags' argument instead of
boolean 'queue'.
- Extend ng_send_fn(), ng_package_data() and ng_package_msg()
interface - add possibility to pass flags. Rename ng_send_fn() to
ng_send_fn1(). Create macro for ng_send_fn().
- Update all macros, that use ng_package_data() and ng_package_msg().
Bill Paul [Mon, 16 May 2005 15:29:21 +0000 (15:29 +0000)]
Correct some problems with workitem usage. NdisScheduleWorkItem() does
not use exactly the same workitem sturcture as ExQueueWorkItem() like
I originally thought it did.
Søren Schmidt [Mon, 16 May 2005 13:07:27 +0000 (13:07 +0000)]
Change the way ioctls are issue to ATA.
The most prominent part is that its now possible to issue ata_requests
directly to say acd0, instead of going through the cumbersome /dev/ata
device.
Warner Losh [Mon, 16 May 2005 05:37:32 +0000 (05:37 +0000)]
cleanup a danging reference to cleaning up /etc/fstab. Since we don't
support 4->6 upgrades, this is moot. Most 4.x installations even,
have things compatible with 5 at thsi point, but some don't, so I'll
leave it in the branch...
A second attempt to adjust option-parsing on a shell command, for the
benefit of scripts start out as: #!/bin/sh -- # -*- perl -*-
With this fix in place, we can commit a change to kern/imgact_shell.c
so FreeBSD will process the `#!' line in shell-scripts in a more
standard fashion.
Hajimu UMEMOTO [Sun, 15 May 2005 20:15:15 +0000 (20:15 +0000)]
- The ai_addrlen of a struct addrinfo used to be a size_t, per
RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and RFC
3493, it was changed to a socklen_t. And, the n_net of a
struct netent used to be an unsigned long integer. In XNS5,
and subsequently in POSIX-2001, it was changed to an uint32_t.
To accomodate for this while preserving ABI compatibility with
the old interface, we need to prepend or append 32 bits of
padding, depending on the (LP64) architecture's endianness.
- Correct 1st argument of getnetbyaddr() to uint32_t on 32
bit arch. Stay as is on 64 bit arch for ABI backward
compatibility for now.
Marcel Moolenaar [Sun, 15 May 2005 06:26:59 +0000 (06:26 +0000)]
o Add option -n. The -n option takes a count and breaks the line
after that many values have been printed. The line length is not
considered anymore.
o Add option -x. The -x option will cause the byte values to be
printed in hexadecimal instead of decimal.
o Bump WARNS to 6.
o Update the manpage accordingly.
Bill Paul [Sun, 15 May 2005 04:27:59 +0000 (04:27 +0000)]
Add support for NdisMEthIndicateReceive() and MiniportTransferData().
The Ralink RT2500 driver uses this API instead of NdisMIndicateReceivePacket().
Drivers use NdisMEthIndicateReceive() when they know they support
802.3 media and expect to hand their packets only protocols that want
to deal with that particular media type. With this API, the driver does
not manage its own NDIS_PACKET/NDIS_BUFFER structures. Instead, it
lets bound protocols have a peek at the data, and then they supply
an NDIS_PACKET/NDIS_BUFFER combo to the miniport driver, into which
it copies the packet data.
Drivers use NdisMIndicateReceivePacket() to allow their packets to
be read by any protocol, not just those bound to 802.3 media devices.
To make this work, we need an internal pool of NDIS_PACKETS for
receives. Currently, we check to see if the driver exports a
MiniportTransferData() method in its characteristics structure,
and only allocate the pool for drivers that have this method.
This should allow the RT2500 driver to work correctly, though I
still have to fix ndiscvt(8) to parse its .inf file properly.
Also, change kern_ndis.c:ndis_halt_nic() to reap timers before
acquiring NDIS_LOCK(), since the reaping process might entail sleeping
briefly (and we can't sleep with a lock held).
Darren Reed [Sun, 15 May 2005 03:34:17 +0000 (03:34 +0000)]
Enable IPFilter to correctly determine if BPF has been optioned into the
kernel it is being compiled against and subsequently enable using BPF for
packet matching in ipf rules.
Gleb Smirnoff [Sun, 15 May 2005 01:44:26 +0000 (01:44 +0000)]
- When carp interface is destroyed, and it affects global preemption
suppresion counter, decrease the latter. [1]
- Add sysctl to monitor preemption suppression.
Dima Dorfman [Sat, 14 May 2005 23:23:10 +0000 (23:23 +0000)]
Add an interface to the lchflags(2) syscall. The new -h option is
analogous to chmod(1)'s -h. It allows setting flags on symbolic links,
which *do* exist in 5.x+ despite a claim to the contrary in the
chflags(1) man page.
Fix the matchlen() function so that it handles the IPv4 (AF_INET)
case correctly. Until now it has been treating IPv4 addresses
as if they were IPv6 which could lead to corruption errors.
Xin LI [Sat, 14 May 2005 14:03:21 +0000 (14:03 +0000)]
Revert to old ttyname_r behavior that when _ioctl() returns 0 (SUCCEEDED),
return the buffer immediately. This will permit ssh and/or PAM logins
broken by previous commit.
The (potential) underlying problem is still under investigation.
Gleb Smirnoff [Sat, 14 May 2005 09:25:18 +0000 (09:25 +0000)]
Use uma(9) for allocating netgraph items:
- ng_getqblk() simply runs uma_zalloc().
- ng_free_item() simply frees.
- ngq_mtx is pushed down under NETGRAPH_DEBUG.
- NGQF_FREE is removed.
- Move timerreg.h to <arch>/include and split i8253 specific defines into
i8253reg.h, and add some defines to control a speaker.
- Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them.
- Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively.
- Use isa/isareg.h rather than <arch>/isa/isa.h.
Peter Grehan [Sat, 14 May 2005 02:11:45 +0000 (02:11 +0000)]
Remove incorrect configuration setting that limited the Kauai ATA controller
to be master-only. The slave ATAPI drive on the Mac-Mini is now recognised.
Paul Saab [Fri, 13 May 2005 18:02:02 +0000 (18:02 +0000)]
Fix for a bug where the "nexthole" sack hint is out of sync with the
real next hole to retransmit from the scoreboard, caused by a bug
which did not update the "nexthole" hint in one case in
tcp_sack_option().
Reported by: Daniel Eriksson
Submitted by: Mohan Srinivasan
Xin LI [Fri, 13 May 2005 16:27:30 +0000 (16:27 +0000)]
Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly
different from what has been offered in libc_r (the one spotted in the
original PR which is found in libthr has already been removed by David's
commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h):
- Use POSIX standard prototype for ttyname_r, which is,
int ttyname_r(int, char *, size_t);
Instead of:
char *ttyname_r(int, char *, size_t);
This is to conform IEEE Std 1003.1, 2004 Edition [1].
- Since we need to use standard errno for return code, include
errno.h in ttyname.c
- Update ttyname(3) implementation according to reflect the API
change.
- Document new ttyname_r(3) behavior
- Since we already make use of a thread local storage for
ttyname(3), remove the BUGS section.
- Remove conflicting ttyname_r related declarations found in libc_r.
Hopefully this change should not have changed the API/ABI, as the ttyname_r
symbol was never introduced before the last unistd.h change which happens a
couple of days before.
Hartmut Brandt [Fri, 13 May 2005 13:47:41 +0000 (13:47 +0000)]
Use the print_flags function to print the OP_ flags of a target.
Give the function one more argument to decide whether it should
print the flags like a C-expression or just space-delimited.
Gleb Smirnoff [Fri, 13 May 2005 11:44:37 +0000 (11:44 +0000)]
In div_output() explicitly set m->m_nextpkt to NULL. If divert socket
is not userland, but ng_ksocket, then m->m_nextpkt may be non-NULL. In
this case we would panic in sbappend.
Hartmut Brandt [Fri, 13 May 2005 06:31:45 +0000 (06:31 +0000)]
Make Shell_Init() static - it's only used here.
Make sure we don't end up with shellPath beeing non-zero, but shellName
beeing zero in the error case - back out cleanly from the error.
When executing a command for macro assignment in Cmd_Exec() stuff the
path of the shell into argv[0], not the name. This makes no difference
from the functionality point of view, but allows the regression tests to
determine whether make executes the correct shell.
Nate Lawson [Thu, 12 May 2005 22:35:08 +0000 (22:35 +0000)]
If there is a problem during probe, be sure to free up any resources
allocated for it. The normal exit case handles this correctly so we
use it as well for errors.
Juli Mallett [Thu, 12 May 2005 18:57:37 +0000 (18:57 +0000)]
Add a flag (-q) which prints no header for the file and which doesn't indent the
match text; it also doesn't warn() for files which can't be opened. Remove
global variables. Use bool. fopen(3) the files instead of freopen(3)ing stdin.