Hartmut Brandt [Mon, 28 Feb 2005 17:23:17 +0000 (17:23 +0000)]
VarParseLong: Move the initialisation of dynamic up which saves
an else clause. Move the assignment to the lengthPtr down to
just before the return statements.
Yaroslav Tykhiy [Mon, 28 Feb 2005 17:05:00 +0000 (17:05 +0000)]
Give a better advice on how to convert DOS text to UNIX text.
The former tip used `col -bx', which would not only discard
CR's, but also expand TAB's and remove BS'en. This effect is
not always wanted.
Robert Watson [Mon, 28 Feb 2005 14:04:09 +0000 (14:04 +0000)]
In bpf_setf(), protect against races between multiple user threads
attempting to change the BPF filter on a BPF descriptor at the same
time: retrieve the old filter pointer under the same locked region
as setting the new pointer.
Anton Berezin [Mon, 28 Feb 2005 12:46:53 +0000 (12:46 +0000)]
Increase usefulness of telnet(1) as a protocol tester. By prepending
"+" to the port number, disable option negotiation and allow
transferring of data with high bit set.
Robert Watson [Mon, 28 Feb 2005 12:35:52 +0000 (12:35 +0000)]
Update a comment describing bpf_iflist to indicate that the BPF interface
structures correspond to specific link layers, so the same network
interface may appear more than once.
Gleb Smirnoff [Mon, 28 Feb 2005 11:54:36 +0000 (11:54 +0000)]
Fix tcpdump(8) on carp(4) interface:
- Use our loop DLT type, not OpenBSD. [1]
- The fields that are converted to network byte order are not 32-bit
fields but 16-bit fields, so htons should be used in htonl. [1]
- Secondly, ip_input changes ip->ip_len into its value without
the ip-header length. So, restore the length to make bpf happy. [1]
- Use bpf_mtap2(), use temporary af1, since bpf_mtap2 doesn't
understand uint8_t af identifier.
Peter Grehan [Mon, 28 Feb 2005 08:47:51 +0000 (08:47 +0000)]
- switch pcpu to a struct declaration ala amd64. It may be more efficient to
cache-align this struct, but that's a topic for a far-in-the-future
commit.
- eliminate commented-out reference to a non-existent pcpu field.
Warner Losh [Mon, 28 Feb 2005 01:27:24 +0000 (01:27 +0000)]
There were two calls to cardbus_do_cis when cardbus_do_cis changed,
yet I only changed one of them. So when we loaded drivers, we'd fail
to allocate resources correct.
This pointed out that we were doing the wrong thing when we failed to
attach a child. We released all the resources and almost deleted the
child. Instead, we should keep the resources allocated so when/if a
driver is loaded, we can go w/o having to allocate them. We use
pci_cfg_save/restore to restore the BARs with these resources.
This seems to fix the problems that we were seeing that I thought
might have magically gone away in the last revision of cardbus.c (but
really didn't).
- Add md_provsize field to metadata, which will help with
shared-last-sector problem.
After this change, even if there is more than one provider with the same
last sector, the proper one will be chosen based on its size.
It still doesn't fix the 'c' partition problem (when da0s1 can be confused
with da0s1c) and situation when 'a' partition starts at offset 0
(then da0s1a can be confused with da0s1 and da0s1c). One can use '-h'
option there, when creating device or avoid sharing last sector.
Actually, when providers share the same last sector and their size is equal,
they provide exactly the same data, so the name (da0s1, da0s1a, da0s1c)
isn't important at all.
- Provide backward compatibility.
- Update copyright's year.
David E. O'Brien [Sun, 27 Feb 2005 22:31:35 +0000 (22:31 +0000)]
MFi386: rev 1.3:
- Add debug.watchdog tunable, so we can specify watchdog CPU from loader
which will help to debug hangs on boot.
- Remove 'U' from debug.watchdog sysctl definition, so if we set it to '-1'
it really shows '-1'.
- Fix comment.
- Add GEOM_LIBRARY_PATH environment variable which allows to specify an
alternative to /lib/geom/ path where shared libraries are stored.
- Improve debugging.
Hajimu UMEMOTO [Sun, 27 Feb 2005 18:57:10 +0000 (18:57 +0000)]
icmp6_notify_error uses IP6_EXTHDR_CHECK, which in turn calls
m_pullup. icmp6_notify_error continued to use the old pointer,
which after the m_pullup is not suitable as a packet header any
longer (see m_move_pkthdr).
and this is what causes the kernel panic in sbappendaddr later on.
Xin LI [Sun, 27 Feb 2005 17:45:55 +0000 (17:45 +0000)]
Change the spin lock logic to a reasonable one. We should spin when
the lock is held by other thread, but not when nobody owns it. According
to deischen@, this part of code will never be hit in our threads
library, since it does not use locks without wait/wakeup functions.
Spotted by: mingyanguo via ChinaUnix.net forum
Reviewed by: deischen
Remove filtering on major device number. These are assigned randomly
these days so filtering on them makes no sense other than as a foot-shooting
device.
Xin LI [Sun, 27 Feb 2005 17:16:16 +0000 (17:16 +0000)]
Remove the check about whether MALLOC_EXTRA_SANITY is defined,
surrounding the undef'ing it. It does not seem necessary to
undef some symbol that is not exist, and gcc does not complain
about whether a symbol is exist before #undef'ing it out.
Spotted by: mingyanguo via ChinaUnix.net forum
Reviewed by: phk
Alexey Zelkin [Sun, 27 Feb 2005 16:26:49 +0000 (16:26 +0000)]
Bring in NetBSD's improvements and cleanups to NLS subsystem, making
it type and endian clean and removing of stdio dependency from NLS
functions (catalog files now are processed via mmap())
Also following changes were done (against NetBSD version):
. If mmap() failed, set errno to EINVAL and do not try to munmap() file
Alexey Zelkin [Sun, 27 Feb 2005 16:23:14 +0000 (16:23 +0000)]
Bring in NetBSD's improvements and cleanups to NLS subsystem, making
it type and endian clean.
Also following changes were done:
. Remove of outdated support for generating of include files for
NLS catalogs being generated.
. Integrate my old code optimizations
. ANSI'fy prototypes
. Remove duplicate defines, and cleanup includes
. Remove first (unused) argument from error() function
. Const'ify (gencat now WARNS=8 clean)
. Convert corrupt() and nomem() functions to macros
. Add *temporary* note what '-new' command line argument is
deprecated now (instead of exiting with error message)
WARNING: format of generated .cat files is changed!
XXX: re-add support for *updating* of .cat files, NetBSD has this
functionality disabled
Alexey Zelkin [Sun, 27 Feb 2005 16:20:53 +0000 (16:20 +0000)]
Bring in NetBSD's improvements and cleanups to NLS subsystem, making
it type and endian clean and removing of stdio dependency from NLS
functions (catalog files now are processed via mmap()).
Also following changes were done (against NetBSD version):
. ANSI'fy prototypes
. Mention FreeBSD in comments
. Pull in sys/types.h instead of sys/_types.h since some types used here
are defined in sys/types.h
Marius Strobl [Sun, 27 Feb 2005 15:23:58 +0000 (15:23 +0000)]
The zs(4) driver is superseded by uart(4) and broken in -CURRENT. Remove
it from the sparc64 kernel config files and delete its fhc(4) and sbus(4)
front-end.
Maxime Henrion [Sun, 27 Feb 2005 15:12:50 +0000 (15:12 +0000)]
Fix a stupid bogon from myself, sc->revision wasn't initialized when
testing it to know whether we should enable the 82503 serial mode...
Move code to the right location and disallow the use of the 82503
serial mode if the sc->revision field is 0 again. This makes fxp(4)
work correctly with ATMEL 350 93C46 cards (3 port 82559 based with a
82555 PHY), as well as with the older ATMEL 220 93C46 (same flavour)
and with the even older 10Mbps-only 82557 cards with the 82503 serial
interface.
Tested by: Andre Albsmeier <andrer@albsmeier.net>, krion
MFC after: 2 weeks
Alexey Zelkin [Sun, 27 Feb 2005 15:11:09 +0000 (15:11 +0000)]
. Static'ize functions exported via function reference variables only.
. Replace inclusion of sys/param.h to sys/cdefs.h and sys/types.h where
appropriate.
. move _*_init() prototypes to mblocal.h, and remove these prototypes
from .c files
. use _none_init() in __setrunelocale() instead of duplicating code
. move __mb* variables from table.c to none.c allowing us to not to
export _none_*() externs, and appropriately remove them from mblocal.h
Alexey Zelkin [Sun, 27 Feb 2005 14:51:27 +0000 (14:51 +0000)]
Replace usage of strerror()/strcpy() with strerror_r() here, reducing
number of required operations to get error message and avoiding of strerror's
buffer clobbering.
Ruslan Ermilov [Sun, 27 Feb 2005 14:05:38 +0000 (14:05 +0000)]
Zero out the entire "struct __collate_st_chain_pri", or garbage
appears in LC_COLLATE files (due to alignment). An alternative
would be to bump STR_LEN to 16.
(This is in preparation to make LC_COLLATE files architecture
independent.)
Doug Rabson [Sun, 27 Feb 2005 12:55:40 +0000 (12:55 +0000)]
Attempt to free any static TLS space used by a shared library when it
is unloaded. This allows applications which load and unload libraries
like libGL.so.1 several times to work properly.
Ruslan Ermilov [Sun, 27 Feb 2005 12:11:35 +0000 (12:11 +0000)]
Added the convenience "distribution" target which calls the
target of the same name from src/etc/Makefile with a proper
environment, suitable to be used during upgrades and cross-
builds.