tjr [Sat, 5 Jun 2004 02:18:28 +0000 (02:18 +0000)]
Change the types of vn_rdwr_inchunks()'s len and aresid arguments to
size_t and size_t *, respectively. Update callers for the new interface.
This is a better fix for overflows that occurred when dumping segments
larger than 2GB to core files.
kientzle [Fri, 4 Jun 2004 23:24:21 +0000 (23:24 +0000)]
Correct the layering violation in read_body_to_string. The previous
version called the higher-level archive_read_data and
archive_read_data_skip functions, which screwed up state management of
those functions. This bit of mis-design has existed for a long time,
but became a serious issue with the recent changes to the
archive_read_data APIs, which added more internal state to the
high-level archive_read_data function. Most common symptom was a
failure to correctly read 'L' entries (long filename) from GNU-style
archives, causing the message ": Can't open: No such file or
directory" with an empty filename.
Pointed out by: Numerous port build failures
Thanks to: Kris Kennaway
yar [Fri, 4 Jun 2004 16:57:18 +0000 (16:57 +0000)]
Implement support for controlling VLAN_HWTAGGING through ioctl(SIOCSIFCAP).
This includes not only toggling the flag in if_capenable, but also really
reconfiguring the hardware.
mux [Fri, 4 Jun 2004 16:42:33 +0000 (16:42 +0000)]
Make the emu10k1 pcm driver INTR_MPSAFE. The locking is modeled
exactly as done in the cmi driver. I am quite confident this is
safe since I'm runing this for more than two weeks now, on an SMP
box. A few people tested this patch for me successfully as well.
kientzle [Fri, 4 Jun 2004 10:27:23 +0000 (10:27 +0000)]
When we go to read the next tar header, if we get zero bytes, accept
that as end-of-archive. Otherwise, a short read at this point
generates an error. This accomodates broken tar writers (such as the
one apparently in use at AT&T Labs) that don't even write a single
end-of-archive block.
Note that both star and pdtar behave this way as well.
In contrast, gtar doesn't complain in either case, and as a
result, will generate no warning for a lot of trashed archives.
Pointed out by: shells/ksh93 port (Thanks to Kris Kennaway)
des [Fri, 4 Jun 2004 10:23:00 +0000 (10:23 +0000)]
Add a devclass level to the dev sysctl tree, in order to support per-
class variables in addition to per-device variables. In plain English,
this means that dev.foo0.bar is now called dev.foo.0.bar, and it is
possible to to have dev.foo.bar as well.
das [Fri, 4 Jun 2004 09:30:51 +0000 (09:30 +0000)]
Convert fsbtoblk() from a macro to a function. The redundant
instances of 64-bit arithmetic were costing 775 bytes, and the
inlining offered no benefit. Moreover, ambiguity as to the argument
types led to the introduction of a bug (see rev 1.56).
Also, remove some casts that are now clearly redundant.
phk [Fri, 4 Jun 2004 07:17:03 +0000 (07:17 +0000)]
Get rid of ttyregister(). All drivers now use ttymalloc() for struct
tty, so now we stand a chance of implementing refcounting and getting
rid of the damn things again.
tjr [Fri, 4 Jun 2004 06:30:16 +0000 (06:30 +0000)]
Write segments to core dump files in maximally-sized chunks that neither
exceed vn_rdwr_inchunks()'s INT_MAX length limitation nor span a block
boundary. This fixes dumping segments larger than 2GB.
wpaul [Fri, 4 Jun 2004 04:43:36 +0000 (04:43 +0000)]
Unbreak the Intel 2100 Centrino wireless driver (and probably others):
- In subr_ndis.c, my_strcasecmp() actually behaved like my_strncasecmp():
we really need it to behave like the former, not the latter. (It was
falsely matching "RadioEnable", which defaults to 1 with "RadioEnableHW"
which the driver creates itself and to 0, because we were using
strlen("RadioEnable") as the length to test. This caused the radio to
always be turned off. :( )
- In if_ndis.c, only set IEEE80211_CHAN_A for channels if we actually
set any IEEE80211_MODE_11A rates. (ieee80211_attach() will "helpfully"
add IEEE80211_MODE_11A to ic_modecaps for you if you initialize any
802.11a channels. This caused "ndis0: 11a rates:" to erroneously be
displayed during driver load.)
- Also in if_ndis.c, when using TESTSETRATE() to add in any missing 802.11b
rates, remember to OR the rates with IEEE80211_RATE_BASIC, otherwise
comparing against existing basic rates won't match. (1, 2, 5.5 and
11Mbps are basic rates, according to the 802.11b spec.) This erroneously
cause 11Mbps to be added to the 11b rate list twice.
rwatson [Fri, 4 Jun 2004 04:07:08 +0000 (04:07 +0000)]
Mark sun_noname as const since it's immutable. Update definitions
of functions that potentially accept &sun_noname (sbappendaddr(),
et al) to accept a const sockaddr pointer.
alc [Fri, 4 Jun 2004 04:03:26 +0000 (04:03 +0000)]
Move the definitions of SWAPBLK_NONE and SWAPBLK_MASK from vm_page.h to
blist.h, enabling the removal of numerous #includes from subr_blist.c.
(subr_blist.c and swap_pager.c are the only users of these definitions.)
kientzle [Fri, 4 Jun 2004 01:36:10 +0000 (01:36 +0000)]
Be more careful about the initial read (used for "tasting" the compression):
* Check for and return input errors
* Treat empty file (zero-length read) as a fatal error
kientzle [Fri, 4 Jun 2004 00:39:46 +0000 (00:39 +0000)]
Have /usr/bin/tar be a symlink to /usr/bin/gtar rather
than a hardlink. This will make it easier for people
to tell which system tar they're currently using.
kientzle [Thu, 3 Jun 2004 23:46:09 +0000 (23:46 +0000)]
Oops. Forced commit to document that the previous commit
also included a Makefile change: use a symlink
/usr/bin/tar -> /usr/bin/bsdtar rather than a hardlink so that
people can more easily tell which tar they're currently using.
gad [Thu, 3 Jun 2004 23:41:49 +0000 (23:41 +0000)]
Add a 'D' flag that can be specified on entries in newsyslog.conf.
If specified, the matching log files will have the NODUMP flag set
on them after they are created.
kientzle [Thu, 3 Jun 2004 23:29:47 +0000 (23:29 +0000)]
Refactor the extraction code somewhat. In particular,
push extract data down into archive_read_extract.c and out
of the library-global archive_private.h; push dir-specific
mode/time fixup down into dir restore function; now that the
fixup list is file-local, I can use somewhat more natural
naming.
Oh, yeah, update a bunch of comments to match current reality.
phk [Thu, 3 Jun 2004 22:36:24 +0000 (22:36 +0000)]
Add new bios_string() which will hunt for a string inside a given range
of the BIOS. This can be used for finding arbitrary magic in the BIOS
in order to recognize particular platforms.
brian [Thu, 3 Jun 2004 22:33:50 +0000 (22:33 +0000)]
Plug a file descriptor leak.
When sed is asked to inline-edit files, it forgets to close the temporary
file and runs out of descriptors for long command lines (assuming you reset
kern.maxfilesperproc to something sane that's less than the number of files
passed to sed).
gad [Thu, 3 Jun 2004 22:26:16 +0000 (22:26 +0000)]
Change standard processing to use the newer createlog() routine
that had been written some months ago for other processing. This
should get rid of a few subtle situations where an existing log
file would not exist (for a short time) while it is being rotated.
phk [Thu, 3 Jun 2004 21:14:53 +0000 (21:14 +0000)]
The NatSemi (now AMD) Geode SC1100 needs special treatment here and there
because it is an embedded gadget. Give it it's own value for the "cpu"
variable and add code to reset it lacking a keyboard controller.
jhb [Thu, 3 Jun 2004 20:07:44 +0000 (20:07 +0000)]
- Comment out NULL, NULL barrier for Unix domain sockets section as the
double NULL entries signal Witness to stop processing the array of
order entries meaning none of the spin locks are added resulting in
panics on boot.
- Add a missing NULL, NULL terminator to the Slip locks list to keep them
separate from the spin locks.
roam [Thu, 3 Jun 2004 10:13:26 +0000 (10:13 +0000)]
Fix the ordering in the description of the dlsym() lookup procedure to
reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded
objects (RTLD_GLOBAL) are searched before the local object's DAG's.
bmilekic [Thu, 3 Jun 2004 03:15:29 +0000 (03:15 +0000)]
Move the locking of the pcb into raw_output(). Organize code so
that m_prepend() is not called with possibility to wait while the
pcb lock is held. What still needs revisiting is whether the
ripcbinfo lock is really required here.
tjr [Thu, 3 Jun 2004 01:47:37 +0000 (01:47 +0000)]
Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().
mux [Wed, 2 Jun 2004 22:52:18 +0000 (22:52 +0000)]
Use the device sysctl tree instead of rolling our own. Some of the
sysctls were global (hw.fxp_rnr and hw.fxp_noflow), all of them are
now per-device. Sample output of "sysctl dev.fxp0" with this patch,
with the standard %foo nodes removed :
mux [Wed, 2 Jun 2004 22:43:35 +0000 (22:43 +0000)]
As discussed on arch@, flatten the device sysctl tree to make it
more convenient to deal with. The notion of hierarchy is however
preserved by adding a new %parent node.
naddy [Wed, 2 Jun 2004 21:34:14 +0000 (21:34 +0000)]
Add helper functions to calculate the standard ethernet CRC in
little/big endian fashion, so that network drivers can just reference
the standard implementation and don't have to bring their own.
kientzle [Wed, 2 Jun 2004 21:01:27 +0000 (21:01 +0000)]
Improve help handling:
* --help produces long help message on systems with getopt_long
* -h with no other options also produces long help message
(If a mode is specified, -h has its usual meaning.)
krion [Wed, 2 Jun 2004 20:15:34 +0000 (20:15 +0000)]
- Remove leading zero from document date [1]
- Remove entry which tells about periodical INDEX updates in
the CVS repository
- Add description for fetchindex target
scottl [Wed, 2 Jun 2004 18:15:48 +0000 (18:15 +0000)]
Collapse sync fib locking into normal i/o locking. The former didn't
protect the registers so it was trivially possible for a sync command and
i/o command to fight each other and confuse the controller. Make the
sync fib alloc/release functions inline and remove the somewhat worthless
AAC_SYNC_LOCK_FORCE flag. Thanks to Adil Katchi for helping me to track
this down in RELENG_4.