cjc [Thu, 29 Nov 2001 09:44:33 +0000 (09:44 +0000)]
Duh. Back out most of my previous commit. It was mostly covered in the
STANDARDS section of the page. Add one remark there about inet_pton(3)
only understanding decimal values (in contrast to inet_aton(3) and
friends who are happy with 0ac.020.25 for 172.16.0.25).
gshapiro [Thu, 29 Nov 2001 03:17:12 +0000 (03:17 +0000)]
rename() can't guarantee "to" always exists if it didn't exist in the first
place -- for example, rename("existing", "newfile"); on a read-only file
system.
luigi [Thu, 29 Nov 2001 03:16:23 +0000 (03:16 +0000)]
Implement a more efficient way to assign addresses: read /etc/hosts
only once into an array of shell variables, and then scan the array
to find entries matching the MAC address.
Associative arrays would really be handy here...
ache [Thu, 29 Nov 2001 03:03:55 +0000 (03:03 +0000)]
Back out national digits support, POSIX explicetely disallows it:
The definition of character class digit requires that only ten characters
-the ones defining digits- can be specified; alternate digits (for
example, Hindi or Kanji) cannot be specified here. However, the encoding
may vary if an implementation supports more than one encoding.
The definition of character class xdigit requires that the characters
included in character class digit are included here also and allows for
different symbols for the hexadecimal digits 10 through 15.
cjc [Thu, 29 Nov 2001 00:56:45 +0000 (00:56 +0000)]
After the long explanaition of how the inet_* functions interpret
Internet addresses, point out that inet_pton(3) only understands
dotted quads with decimal values.
rwatson [Wed, 28 Nov 2001 21:22:05 +0000 (21:22 +0000)]
o Cache req->td->td_proc->p_ucred->cr_prison in pr to improve
readability.
o Conditionalize only the SYSCTL definitions for the regression
tree, not the variables itself, decreasing the number of #ifdef
REGRESSIONs scattered in kern_mib.c, and making the code more
readable.
bde [Wed, 28 Nov 2001 19:52:25 +0000 (19:52 +0000)]
Fixed namespace pollution and/or breakage of K&R and C90 support related to
the following functions in the following commits:
- atoll() in revs 1.23-1.25
- llabs() and lldiv() in revs 1.22
- strtoq() and strtouq() in revs 1.18
C99 functions must not be declared in C90/POSIX.1-1990 sections, and
"long long" must not be exposed to compilers that don't support it.
Fixed style bugs (mainly misindentation and disorder) related the
following functions in the following commits:
- atoll() in revs 1.23-1.25
- getprogname() in rev.1.21
- sranddev() in revs 1.19-1.20
- strtoq() and strtouq() in rev.1.13
- user_from_uid() in rev.1.1
Breakage of K&R and C90 support used to be avoided by conditializing the
"long long"s for strtoq() and strtouq() on __STRICT_ANSI__, but the
conditionals should have gone away in rev.1.13 when the "long long"s went
away (the problem was moved to the places that declare quad_t and u_quad_t).
archie [Wed, 28 Nov 2001 19:39:58 +0000 (19:39 +0000)]
When a socket is not connected, allow the peer "struct sockaddr"
to be included in the meta information that is associated with
incoming and outgoing packets.
bde [Wed, 28 Nov 2001 19:02:01 +0000 (19:02 +0000)]
Fixed namespace pollution in previous commit. The C99 function
sterror_r() must not be declared in the C90/POSIX.1-1990 section.
Put it in the nonstandard section for now.
arr [Wed, 28 Nov 2001 17:29:04 +0000 (17:29 +0000)]
- Change parameters of signal handlers in order to be correct (they are
handed a integer, not void).
- No need to set flags to zero when they already will be.
- It was also noted the manner in which the signal handling has changed
might possibly generate some problems (hangs possibly) -- these, while
remaining in the code, will be fixed shortly (within a day).
luigi [Wed, 28 Nov 2001 16:10:37 +0000 (16:10 +0000)]
Remove the need for an expensive m_devget on the i386, which does not
have alignment problems.
On small boxes (e.g. the net4501 from Soekris, featuring a 486/133)
this provides huge performance benefits: the peak forwarding rate
with avg.sized packets goes up by 50-70% because of this change
alone. Faster CPUs might benefit less from this change, but in any
case the CPU has better things to do than waste time on useless
memory-to-memory copies.
Several drivers (for Tulip-like cards) might benefit from a similar
change.
Right now the new behaviour is controlled by a sysctl variable,
hw.sis_quick which defaults to 1 (on), you can set it to 0 to
reintroduce the old behaviour (and compare the results). The
variable is only there to show how much you can gain with this
change, it will go away soon.
Also, slightly simplify the code to initialize the ring buffers,
and remove a couple of dangerous printf's which could trigger on
any packet in case of mbuf shortage.
tobez [Wed, 28 Nov 2001 10:55:02 +0000 (10:55 +0000)]
Do not write warning messages on stderr - a caller is expected to check
the return code and errno instead. Those warnings did not do any good
for daemonized users of initgroups(3), and confused cvs clients that
communicated with non-root cvs pserver.
The committed fix differs from the one suggested in the PR, and was
submitted by ru.
PR: 15421
Approved by: markm
Discussed on: -stable, -current at various times
imp [Wed, 28 Nov 2001 08:33:12 +0000 (08:33 +0000)]
Merge from NetBSD:
1.147 (my changes to sync to FreeBSD's file)
1.148 Buffalo AirStation CFtytpe WLAN Card (ichiro)
1.149 IBM SCSI PCMCIA (yamt)
1.150 <restore 1.148 lost in 1.149> (enami)
gad [Wed, 28 Nov 2001 04:30:47 +0000 (04:30 +0000)]
My recent changes to add the ctl_renametf routine assumed that print job
control-files will always start with 'cfA*'. It turns out that some
implementations of lpd (such as solaris) may send a control file which
starts with 'cfB*', or really 'cf<anyLetter>*'. Although such filenames
are very odd, we did used to accept them. This changes ctl_renametf to
work correctly with them, and fixes up 'lpc clean' to match.
rwatson [Tue, 27 Nov 2001 20:47:38 +0000 (20:47 +0000)]
Update diskless.8 to refer to 'device md' instead of 'options MFS'; in
-CURRENT, md devices with FFS on top are used in the diskless boot process
instead of MFS.
dd [Tue, 27 Nov 2001 20:32:47 +0000 (20:32 +0000)]
ipfw_modevent(): Don't use an unnatural block to define a variable
(fcp) that's already defined in the outer block and isn't used
anywhere else. This silences -Wunused.
dd [Tue, 27 Nov 2001 20:02:18 +0000 (20:02 +0000)]
Make the default kernel prefix "kernel:" instead of the boot file,
with the old behavior available via the -o option (it might still be
useful if one has many kernels and cares which messages came from
which). If the boot file is not used as the prefix, it is still
logged once at startup.
This change is prompted by the fact that the boot file is now much
longer ("/boot/kernel/kernel" vs. "/kernel"), which significanlty
bloats the syslogd output.
dd [Tue, 27 Nov 2001 19:58:09 +0000 (19:58 +0000)]
In icmp_reflect(): If the packet was not addressed to us and was
received on an interface without an IP address, try to find a
non-loopback AF_INET address to use. If that fails, drop it.
Previously, we used the address at the top of the in_ifaddrhead list,
which didn't make much sense, and would cause a panic if there were no
AF_INET addresses configured on the system.
dd [Tue, 27 Nov 2001 19:56:28 +0000 (19:56 +0000)]
Implement a "kill" DDB command which is an interface to psignal() that
respects locks. Before SMPng, one was able to call psignal()
using the "call" command, but this is no longer possible because it
does not respect locks by itself. This is very useful when one has
gotten their machine into a state where it is impossible to spawn
ps/kill or su to root.
In this case, respecting locks essentially means trying to aquire the
proc lock before calling psignal(). We can't block in the debugger,
so if trylock fails, the operation fails. This also means that we
can't use pfind(), since that will attempt to lock the process for us.
sheldonh [Tue, 27 Nov 2001 19:39:07 +0000 (19:39 +0000)]
Fix the example of suggested default settings. It stated that settings
were only of benefit to large filesystems, which recent research
suggests is not the case, and which the original author of the text
no longer endorses.
jedgar [Tue, 27 Nov 2001 18:58:56 +0000 (18:58 +0000)]
Make extattrctl WARNS?=2-safe:
o remove extraneous extern's
o prototype functions
o combine multiple return (0)'s into a single return (0) at the
end of main()
sheldonh [Tue, 27 Nov 2001 17:01:17 +0000 (17:01 +0000)]
Correct the example introduced in rev 1.29, which suggested a block:frag
size ratio other than 8:1. Currently, we only recommend an 8:1
ratio, because the impact of others ratios has not been adequately
investigated.
Also, do not recommend the use of the -c option in the example, since
newfs now automatically calculates the best cyl:cylgrp ratio.
This change was discussed with the author of rev 1.29.
luigi [Tue, 27 Nov 2001 16:29:11 +0000 (16:29 +0000)]
Fix a bug in the driver -- under load, the receive unit could become
idle and the driver would not detect the event, requiring userland
to cycle the interface to bring it up again.
The fix consists in adding SIS_IMR_RX_IDLE to the interrupt mask and
add a command in sis_intr() to restart the receiver when this happens.
While at it, make the test of status bits more efficient.
des [Tue, 27 Nov 2001 15:36:21 +0000 (15:36 +0000)]
Due to incorrect include ordering, <dlfcn.h> did not get included, so
RTLD_NOW got incorrectly defined to 1 (which is RTLD_LAZY in FreeBSD).
In addition, the comment about FreeBSD requiring SHLIB_SYM_PREFIX to
be "_" is incorrect.
Submitted by: tobez (except for the bit about the incorrect comment)
des [Tue, 27 Nov 2001 13:26:27 +0000 (13:26 +0000)]
Add support for a last-close handler.
Revert the module version bumps; they're quite pointless as long as the
only pseudofs consumer is linprocfs, which is in the tree.