]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoUse vput() instead of vrele() in null_reclaim() since the lower vnode
ssouhlal [Fri, 2 Sep 2005 15:49:55 +0000 (15:49 +0000)]
Use vput() instead of vrele() in null_reclaim() since the lower vnode
is locked.

MFC after: 3 days

19 years ago*_mountfs() (if the filesystem mounts from a device) needs devvp to be
ssouhlal [Fri, 2 Sep 2005 15:27:23 +0000 (15:27 +0000)]
*_mountfs() (if the filesystem mounts from a device) needs devvp to be
locked, so lock it.

Glanced at by: phk
MFC after: 3 days

19 years ago- Do not allocate memory to entries in /var/rwho which have been down for
ssouhlal [Fri, 2 Sep 2005 14:58:26 +0000 (14:58 +0000)]
- Do not allocate memory to entries in /var/rwho which have been down for
  more than 4 days - waste of memory.

Obtained from: DragonFlyBSD (liamfoy)
MFC after: 3 days

19 years agoffs_mountfs() needs devvp to be locked, so lock it.
ssouhlal [Fri, 2 Sep 2005 13:52:55 +0000 (13:52 +0000)]
ffs_mountfs() needs devvp to be locked, so lock it.

Glanced at by: phk
Tested by: pjd
MFC after: 3 days

19 years agoDon't unbusy the devfs mount in vfs_mountroot_try() as it gets accessed
ssouhlal [Fri, 2 Sep 2005 13:37:54 +0000 (13:37 +0000)]
Don't unbusy the devfs mount in vfs_mountroot_try() as it gets accessed
and unbusied in devfs_fixup(), which assumes that the devfs mount is
still locked.

Granced at by: phk
MFC after: 3 days

19 years agoForced commit to set an MFC reminder
jcamou [Fri, 2 Sep 2005 11:09:18 +0000 (11:09 +0000)]
Forced commit to set an MFC reminder
forgotten in previous commit.

MFC after: 10 days

19 years agoStop generating the `register' keyword.
stefanf [Fri, 2 Sep 2005 10:32:05 +0000 (10:32 +0000)]
Stop generating the `register' keyword.

19 years agoDon't generate K&R C code. The -C flag is kept for backwards compatibility.
stefanf [Fri, 2 Sep 2005 10:23:26 +0000 (10:23 +0000)]
Don't generate K&R C code.  The -C flag is kept for backwards compatibility.
Also remove the SIG_PF macro, there is no need to cast closedown.

19 years agoUpdate URL and email address.
jcamou [Fri, 2 Sep 2005 06:30:41 +0000 (06:30 +0000)]
Update URL and email address.

Approved by: trhodes (mentor)
20 day timeout: mbr (did not reply, mentor approved commit)

19 years agoMFp4: kill bogus comment
imp [Fri, 2 Sep 2005 03:15:51 +0000 (03:15 +0000)]
MFp4: kill bogus comment

19 years agoFix typo in usage.
emax [Thu, 1 Sep 2005 22:45:25 +0000 (22:45 +0000)]
Fix typo in usage.

Submitted by: Jonatan B < onatan at gmail dot com >
MFC after: 3 days

19 years agoIn case of mac_check_vnode_rename_from() or vn_start_write() failure,
pjd [Thu, 1 Sep 2005 21:46:33 +0000 (21:46 +0000)]
In case of mac_check_vnode_rename_from() or vn_start_write() failure,
vn_finished_write() should not be called.

Reviewed by: ssouhlal
MFC after: 3 days

19 years agoAt some point in the past, we read the PROM by words. Now we read
imp [Thu, 1 Sep 2005 20:08:24 +0000 (20:08 +0000)]
At some point in the past, we read the PROM by words.  Now we read
PROM by bytes.  Adjust the extraction of the MAC address from this data
to reflect this change.

This gets the AX88x90 based PC Cards MAC address working again (my
UMAX Ethernet and Linksys EC2T cards now work).

MFC After: 3 days

19 years agoOnly write the dispatch table function prototypes to the header if the -h
stefanf [Thu, 1 Sep 2005 19:16:25 +0000 (19:16 +0000)]
Only write the dispatch table function prototypes to the header if the -h
flag was specified.  If all files are generated at once, those functions are
static and shouldn't appear in the header.

PR: 84450
Reviewed by: alfred

19 years agoFix a few small problems and bump the date.
scottl [Thu, 1 Sep 2005 19:14:41 +0000 (19:14 +0000)]
Fix a few small problems and bump the date.

Submitted by: ru

19 years agoTypo in comment.
jhb [Thu, 1 Sep 2005 16:41:42 +0000 (16:41 +0000)]
Typo in comment.

19 years agoImprove POSIX conformance:
stefanf [Thu, 1 Sep 2005 15:33:22 +0000 (15:33 +0000)]
Improve POSIX conformance:
- Don't pollute the namespace by including <sys/types.h>, <sys/time.h>,
  <sys/signal.h> and <limits.h>.  Use __MINSIGSTKSZ and __ULONG_MAX from
  <machine/_limits.h>, __sigset_t from <sys/_sigset.h> instead.
- Include <time.h> because POSIX says we have to.

PTHREAD_{DESTRUCTOR_ITERATIONS,KEYS_MAX,STACK_MIN,THREADS_MAX} should
eventually move to <limits.h> but are left here for now.

Discussed on: standards@, threads@

19 years agoInclude needed headers that were obtained through <pthread.h>. Sort headers
stefanf [Thu, 1 Sep 2005 15:21:23 +0000 (15:21 +0000)]
Include needed headers that were obtained through <pthread.h>.  Sort headers
while here.

19 years agoAdd support for setting GPT partition labels. The partitions to be
marcel [Thu, 1 Sep 2005 02:49:20 +0000 (02:49 +0000)]
Add support for setting GPT partition labels. The partitions to be
labeled are selected in the same way as with the remove command.
Update the manpage to have the selection options described for the
label command and referenced to it from the remove command.
The label can be specified on the command line with the -l option
or read from a file with the -f option. In both cases, the label
is assumed to be encoded in UTF-8.

PR: ia64/83124
MFC after: 1 week

19 years agoDot the i's: multiple devices can be specified, so the usage should
marcel [Thu, 1 Sep 2005 02:42:52 +0000 (02:42 +0000)]
Dot the i's: multiple devices can be specified, so the usage should
have ellipsis following the device.

19 years agoTreat resources that are 0xfffff.... as being 'unassigned'.
imp [Thu, 1 Sep 2005 02:42:34 +0000 (02:42 +0000)]
Treat resources that are 0xfffff.... as being 'unassigned'.

Reviewed by: jhb
Tested by: Mark Kirkwood
MFC After: 3 days

19 years agoAdd a comment before the statement that is responsible for the
marcel [Thu, 1 Sep 2005 01:15:22 +0000 (01:15 +0000)]
Add a comment before the statement that is responsible for the
removal of the GPT entry. There's a bit of code around that one
statement that it's good to have it stand out a bit more.

19 years agoAdded ENVIRONMENT section (PAGER, MANPATH, etc.).
garys [Thu, 1 Sep 2005 01:00:55 +0000 (01:00 +0000)]
Added ENVIRONMENT section (PAGER, MANPATH, etc.).

PR:             docs/84485
Submitted by:   garys
Approved by:    keramida
MFC after:      3 days

19 years ago- Use prototypes in headers.
stefanf [Wed, 31 Aug 2005 20:45:15 +0000 (20:45 +0000)]
- Use prototypes in headers.
- Include rpc_scan.h before rpc_util.h for the tok_kind enum.
- Nuke unused declarations.

19 years ago- Add md_mtx lock to protect ID number and list of devices.
pjd [Wed, 31 Aug 2005 19:45:11 +0000 (19:45 +0000)]
- Add md_mtx lock to protect ID number and list of devices.
- Always check mdnew() return value, as even in !autounit case
  kthread_create() can fail.

Those two changes fix serval panics provked by simple stress test.

Tested by: Kris The BugMagnet
MFC after: 3 days

19 years agoRename the variable `inline' to `inline_size'.
stefanf [Wed, 31 Aug 2005 19:44:40 +0000 (19:44 +0000)]
Rename the variable `inline' to `inline_size'.

19 years agoFix dangling callout problem in the Bluetooth L2CAP code that leads to
emax [Wed, 31 Aug 2005 18:13:23 +0000 (18:13 +0000)]
Fix dangling callout problem in the Bluetooth L2CAP code that leads to
panic. The panic happens when outgoing L2CAP connection descriptor is
deleted with the L2CAP command(s) pending in the queue. In this case when
the last L2CAP command is deleted (due to cleanup) and reference counter
for the L2CAP connection goes down to zero the auto disconnect timeout
is incorrectly set. pjd gets credit for tracking this down and committing
bandaid.

Reported by: Jonatan B <onatan at gmail dot com>
MFC after: 3 days

19 years ago- Only call txp_release_resources() once if attach fails.
jhb [Wed, 31 Aug 2005 18:09:54 +0000 (18:09 +0000)]
- Only call txp_release_resources() once if attach fails.
- Set errno to ENXIO instead of 0 in several attach failure cases.
- Setup the interrupt handler at the very end of txp_attach() after
  ether_ifattach().
- Various whitespace fixes in function prototypes.

19 years agoUse if_printf() and device_printf() for printf's and remove the unit number
jhb [Wed, 31 Aug 2005 18:03:18 +0000 (18:03 +0000)]
Use if_printf() and device_printf() for printf's and remove the unit number
from the softc.

MFC after: 3 days

19 years agoImproved descriptions of block size handling.
garys [Wed, 31 Aug 2005 17:58:38 +0000 (17:58 +0000)]
Improved descriptions of block size handling.

PR:             docs/84765
Submitted by:   garys
Approved by:    keramida
MFC after:      3 days

19 years agoUpdate for a few recently discovered Olicom token ring cards:
imp [Wed, 31 Aug 2005 17:00:48 +0000 (17:00 +0000)]
Update for a few recently discovered Olicom token ring cards:
OC3231 Token Ring + 28.8 modem
OC3232 Token Ring + 33.6 modem

19 years agoMore clarification on how bus_dmamap_sync works. Fix bogus text concerning
scottl [Wed, 31 Aug 2005 16:55:00 +0000 (16:55 +0000)]
More clarification on how bus_dmamap_sync works.  Fix bogus text concerning
bus_dmamem_alloc.

19 years agoAdd a short description of how a literal colon ':' can be inlined in the
keramida [Wed, 31 Aug 2005 15:02:11 +0000 (15:02 +0000)]
Add a short description of how a literal colon ':' can be inlined in the
value of capability databases, since it's not really obvious how a colon
can be escaped, and a pointer to the getcap(3) manpage for more details.

Triggered by: a question by Ceri on -questions

19 years agoAdd __BEGIN_DECLS/__END_DECLS so that this header can be included in C++
rodrigc [Wed, 31 Aug 2005 14:57:39 +0000 (14:57 +0000)]
Add __BEGIN_DECLS/__END_DECLS so that this header can be included in C++
programs.  Also, add include guards.

PR: bin/44277
Submitted by: Alex Zepeda <freebsd at blarf dot homeip dot net>
MFC after: 1 day

19 years agoUse VLAN_TAG_VALUE() not only to read a dot1q tag
yar [Wed, 31 Aug 2005 11:36:50 +0000 (11:36 +0000)]
Use VLAN_TAG_VALUE() not only to read a dot1q tag
value from an m_tag, but also to set it.  This reduces
complex code duplication and improves its readability.

Alas, we shouldn't rename the macro to VLAN_TAG_LVALUE()
globally because that would cause pain for kernel module
port maintainers and vendors using FreeBSD as their codebase.
Added a clarifying comment instead.

Discussed with: ru, glebius
X-MFC-After: 6.0-RELEASE (MFC is good just to reduce the diff)

19 years agonet.graph.ngqfreemax has been deprecated.
glebius [Wed, 31 Aug 2005 10:51:55 +0000 (10:51 +0000)]
net.graph.ngqfreemax has been deprecated.

19 years agoRemove getino(3) manpage. It doesn't document what is here, what is here should
jmallett [Wed, 31 Aug 2005 08:36:05 +0000 (08:36 +0000)]
Remove getino(3) manpage.  It doesn't document what is here, what is here should
not get documented, and what it does document isn't going to come to CVS any
time in the immediate future.

Patience of a saint: trhodes

19 years agoFix braino in last commit. Print nothing if ipfw(4) is not present.
glebius [Wed, 31 Aug 2005 08:31:14 +0000 (08:31 +0000)]
Fix braino in last commit. Print nothing if ipfw(4) is not present.

19 years agoDisconnect getino.3 and remove MLINK I added.
trhodes [Wed, 31 Aug 2005 07:44:45 +0000 (07:44 +0000)]
Disconnect getino.3 and remove MLINK I added.

Discussed with: jmallett

19 years agoDocument the -l and -u options of the show command.
marcel [Wed, 31 Aug 2005 05:56:21 +0000 (05:56 +0000)]
Document the -l and -u options of the show command.

19 years agoo Replace unicode16() by utf8_to_utf16().
marcel [Wed, 31 Aug 2005 05:40:41 +0000 (05:40 +0000)]
o  Replace unicode16() by utf8_to_utf16().
o  Introduce utf16_to_utf8().
o  Add option -l to the show command to display the GPT label instead
   of the friendly partition type.
o  Add option -u to the show command to suppress the friendly output
   and print th raw UUIDs instead.

19 years ago/* -> /*- for license.
marcel [Wed, 31 Aug 2005 01:47:19 +0000 (01:47 +0000)]
/* -> /*- for license.

19 years agoMove "systemv" into OLDTIMEZONES clause; "backward" is a prerequisite.
wollman [Wed, 31 Aug 2005 01:33:26 +0000 (01:33 +0000)]
Move "systemv" into OLDTIMEZONES clause; "backward" is a prerequisite.
("systemv" is even more backward than "backward" is!)

Obliquely pointed out by: jhay

19 years agoFDOPT_NORETRY is an option, and must be compared with fd->options,
rodrigc [Tue, 30 Aug 2005 23:12:18 +0000 (23:12 +0000)]
FDOPT_NORETRY is an option, and must be compared with fd->options,
not fd->flags.

PR: kern/85481
Submitted by: Lev Levinson <llevinson at inbox dot ru>
MFC after: 1 day

19 years agoDocument the following:
brueffer [Tue, 30 Aug 2005 22:25:22 +0000 (22:25 +0000)]
Document the following:

- VIA PadLock support + merge
- dc, my, pcn, sf MPSAFE + merge
- de, ed, ste MPSAFE
- de converted to busdma(9)
- el removed
- geli(8) committed + merge
- libmemstat(9) merge

MFC after: 3 days

19 years agoChanges and cleanups to m_sanity():
andre [Tue, 30 Aug 2005 21:31:42 +0000 (21:31 +0000)]
Changes and cleanups to m_sanity():

o for() instead of while() looping  over mbuf chain
o paren's around all flag checks
o more verbose function and purpose description
o some more style changes

Based on feedback from: sam

19 years agoUnbreak m_demote() and put back the 'all' flag. Without it we cannot
andre [Tue, 30 Aug 2005 21:14:30 +0000 (21:14 +0000)]
Unbreak m_demote() and put back the 'all' flag.  Without it we cannot
correctly test for m_nextpkt in an mbuf chain.

19 years agoVarious locking fixes and mark MPSAFE:
jhb [Tue, 30 Aug 2005 20:35:08 +0000 (20:35 +0000)]
Various locking fixes and mark MPSAFE:
- Add locked variants of start(), init(), ifmedia_upd(), and poll() and stop
  recursing on the driver lock.
- Add locking to ifmedia_upd() and ifmedia_sts().
- Use callout_*() instead of timeout/untimeout.
- Fix locking in ioctl().

Tested by: Bob Bishop rb at gid dot co dot uk
MFC after: 3 days

19 years agoo Remove the 'all' flag from m_demote(). Users can simply call it with
andre [Tue, 30 Aug 2005 20:07:49 +0000 (20:07 +0000)]
o Remove the 'all' flag from m_demote().  Users can simply call it with
  m_demote(m->m_next) if they wish to start at the second mbuf in chain.
o Test m_type with == instead of &.
o Check m_nextpkt against NULL instead of implicit 0.

Based on feedback from: sam

19 years agoPrevent division by zero errors in sc_mouse_move()
rodrigc [Tue, 30 Aug 2005 18:58:17 +0000 (18:58 +0000)]
Prevent division by zero errors in sc_mouse_move()
by explicitly setting sc->font_width, in the same
places where sc->font_size is set, instead of
relying on the default initialized value of 0 for sc->font_width.

PR: kern/84836
Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru>
MFC after: 2 days

19 years agoIntroduce a new helper function check_search() derived for res_hnok to
brooks [Tue, 30 Aug 2005 18:20:46 +0000 (18:20 +0000)]
Introduce a new helper function check_search() derived for res_hnok to
check the domain-name parameter according to the rules for "search"
strings as documented in resolv.conf(5).  Specifically, the string must
be no more than 256 bytes long and contain no more than six valid domain
names separated by white space.

The previous unchecked values could result in a mangled resolv.conf
file which could effectively deny access to local sites.  This is not
a security issue as rogue dhcp servers could already do this without
sending invalid strings.

Reviewed by: cperciva
MFC After: 3 days

19 years agoWhen using files as backing stores for devices, and the user has requested the
csjp [Tue, 30 Aug 2005 16:45:32 +0000 (16:45 +0000)]
When using files as backing stores for devices, and the user has requested the
device be created read+write, check to see if the backing store is read only
through the use of the access(2) system call. If this check fails returning
EACCES, EPERM or EROFS then gracefully downgrade the access to read only. Also
print a warning message to stderr, informing the user that the access mode
they requested is not available.

This behavior used to be handled by md(4) but was changed in revision 1.154

Discussed with: pjd, phk, Dario Freni <saturnero at freesbie dot org>
Reviewed by: phk

19 years agoUse the correct mbuf type for MGET().
andre [Tue, 30 Aug 2005 16:35:27 +0000 (16:35 +0000)]
Use the correct mbuf type for MGET().

19 years agoPunctuation corrections.
schweikh [Tue, 30 Aug 2005 16:33:39 +0000 (16:33 +0000)]
Punctuation corrections.

19 years agoUse the correct mbuf type for MGET().
andre [Tue, 30 Aug 2005 16:28:46 +0000 (16:28 +0000)]
Use the correct mbuf type for MGET().

19 years agoTest the mbuf flags against the correct constant. The previous version
andre [Tue, 30 Aug 2005 16:21:51 +0000 (16:21 +0000)]
Test the mbuf flags against the correct constant.  The previous version
worked as intended but only by chance.  MT_HEADER == M_PKTHDR == 0x2.

19 years agoRemove a stale manpage.
scottl [Tue, 30 Aug 2005 16:14:25 +0000 (16:14 +0000)]
Remove a stale manpage.

19 years agoscript to set ifs parameters based on distance; derived from program
sam [Tue, 30 Aug 2005 16:03:15 +0000 (16:03 +0000)]
script to set ifs parameters based on distance; derived from program
of the same name by Gunter Burchardt

MFC after: 3 days

19 years agoo correct alignment of 802.11 addresses passed to ether_ntoa to fix
sam [Tue, 30 Aug 2005 15:59:49 +0000 (15:59 +0000)]
o correct alignment of 802.11 addresses passed to ether_ntoa to fix
  segfaults on amd64
o while here correct printf formats for size_t args

Identified by: Pascal Hofstee
MFC after: 3 days

19 years agoProperly set ic_curchan before calling back to device driver to do channel
avatar [Tue, 30 Aug 2005 14:27:47 +0000 (14:27 +0000)]
Properly set ic_curchan before calling back to device driver to do channel
switching(ifconfig devX channel Y).  This fix should make channel changing
works again in monitor mode.

Submitted by: sam
X-MFC-With: other ic_curchan changes

19 years agoFix fallout from revision 1.77, mark outgoing packets with M_VLANTAG flag.
glebius [Tue, 30 Aug 2005 14:14:08 +0000 (14:14 +0000)]
Fix fallout from revision 1.77, mark outgoing packets with M_VLANTAG flag.

PR: kern/80646
Reviewed by: yar
MFC after: 3 days

19 years agoInclude option-argument names in the list in the DESCRIPTION section.
tjr [Tue, 30 Aug 2005 12:48:28 +0000 (12:48 +0000)]
Include option-argument names in the list in the DESCRIPTION section.
Remove a non-bug from the BUGS section.

19 years agoAllocate a thread's tcb last so it is easier to handle failures to
deischen [Tue, 30 Aug 2005 12:42:00 +0000 (12:42 +0000)]
Allocate a thread's tcb last so it is easier to handle failures to
malloc() siginfo.

PR: 85468

19 years agoRemove undocumented historic support for treating "-" as an option
tjr [Tue, 30 Aug 2005 12:32:18 +0000 (12:32 +0000)]
Remove undocumented historic support for treating "-" as an option
instead of a file operand; this is not compatible with POSIX.

19 years agoLock down PPTP node, since it has many data structures, that won't survive
glebius [Tue, 30 Aug 2005 09:51:54 +0000 (09:51 +0000)]
Lock down PPTP node, since it has many data structures, that won't survive
parallel ng_pptp_rcvdata():

- Add a per-node mutex.
- Acquire mutex during all ng_pptp_rcvdata() method.
- Make callouts protected by mutex. Now callouts count as
  netgraph writers, but there are plans to allow reader callouts
  for nodes, that have internal locking.
- Acquire mutex in ng_pptp_reset(), which can be triggered
  by a message or node shutdown.

PR: kern/80035
Tested by: Deomid Ryabkov <myself rojer.pp.ru>
Reviewed by: Deomid Ryabkov <myself rojer.pp.ru>

19 years agoAdd ng_callout_ini_mtx() macro.
glebius [Tue, 30 Aug 2005 09:44:54 +0000 (09:44 +0000)]
Add ng_callout_ini_mtx() macro.

19 years agos/PDC2061/PDC20621
joel [Tue, 30 Aug 2005 07:03:03 +0000 (07:03 +0000)]
s/PDC2061/PDC20621

Approved by: brueffer (mentor)

19 years agoThis script was helpful during development, but has no reason to
marcel [Tue, 30 Aug 2005 06:20:20 +0000 (06:20 +0000)]
This script was helpful during development, but has no reason to
be kept alive. Removal is long overdue as it is.

19 years agoDon't print the total number of partitions removed now that we print
marcel [Tue, 30 Aug 2005 06:16:31 +0000 (06:16 +0000)]
Don't print the total number of partitions removed now that we print
the name of the partitions that we remove. A summary is unnecessary
and even makes parsing of the output more difficult.

MFC after: 1 week

19 years agoAdd back dropped if_media.h include
imp [Tue, 30 Aug 2005 05:24:53 +0000 (05:24 +0000)]
Add back dropped if_media.h include

19 years agoEliminate cpufreq levels for two cases that are less than optimal:
njl [Tue, 30 Aug 2005 04:45:32 +0000 (04:45 +0000)]
Eliminate cpufreq levels for two cases that are less than optimal:

1. Walk the absolute list in reverse to prefer duplicated levels that have
a lower absolute setting, i.e. 800 Mhz/50% is better than 1600 Mhz/25% even
though both have the same actual frequency.  This also removes the need to
check for already-modified levels since by definition, those will be added
later in the sorted list.

2. Compare the absolute settings for derived levels and don't use the new
level if it's higher.  For example, a level of 800 Mhz/75% is preferable to
1600 Mhz/25% even though the latter has a lower total frequency.

This work is based on a patch from the submitter but reworked by myself.

Submitted by: Tijl Coosemans (tijl/ulyssis.org)

19 years agoBe sure to execute sendmail_precmd() to check sendmail.cf conflicts and
gshapiro [Tue, 30 Aug 2005 03:41:59 +0000 (03:41 +0000)]
Be sure to execute sendmail_precmd() to check sendmail.cf conflicts and
rebuild the aliases file if necessary.

PR: conf/72910
Submitted by: matteo@
MFC after: 3 days

19 years agoExtend utility to allow recovering single file from the deffective
sobomax [Mon, 29 Aug 2005 23:08:01 +0000 (23:08 +0000)]
Extend utility to allow recovering single file from the deffective
media.

MFC after:      2 weeks

19 years agoWrap a line due to a new sentence.
jcamou [Mon, 29 Aug 2005 21:28:12 +0000 (21:28 +0000)]
Wrap a line due to a new sentence.

Noticed by: simon
Approved by: trhodes (mentor)

19 years agoAdded a sentence to explain what "span" means.
garys [Mon, 29 Aug 2005 20:41:58 +0000 (20:41 +0000)]
Added a sentence to explain what "span" means.

PR:             docs/84850
Submitted by:   garys
MFC after:      3 days
Approved by:    keramida

19 years agoAdd m_copymdata(struct mbuf *m, struct mbuf *n, int off, int len,
andre [Mon, 29 Aug 2005 20:15:33 +0000 (20:15 +0000)]
Add m_copymdata(struct mbuf *m, struct mbuf *n, int off, int len,
 int prep, int how).

Copies the data portion of mbuf (chain) n starting from offset off
for length len to mbuf (chain) m.  Depending on prep the copied
data will be appended or prepended.  The function ensures that the
mbuf (chain) m will be fully writeable by making real (not refcnt)
copies of mbuf clusters.  For the prepending the function returns
a pointer to the new start of mbuf chain m and leaves as much
leading space as possible in the new first mbuf.

Reviewed by: glebius

19 years agoCorrect previous commit.
scottl [Mon, 29 Aug 2005 20:06:02 +0000 (20:06 +0000)]
Correct previous commit.

19 years agoAdd m_sanity(struct mbuf *m, int sanitize) to do some heavy sanity
andre [Mon, 29 Aug 2005 19:58:56 +0000 (19:58 +0000)]
Add m_sanity(struct mbuf *m, int sanitize) to do some heavy sanity
checking on mbuf's and mbuf chains.  Set sanitize to 1 to garble
illegal things and have them blow up later when used/accessed.

m_sanity()'s main purpose is for KASSERT()'s and debugging of non-
kosher mbuf manipulation (of which we have a number of).

Reviewed by: glebius

19 years agoAdd m_demote(struct mbuf *m, int all) to clean up mbuf (chain) from
andre [Mon, 29 Aug 2005 19:45:39 +0000 (19:45 +0000)]
Add m_demote(struct mbuf *m, int all) to clean up mbuf (chain) from
any tags and packet headers.  If "all" is set then the first mbuf
in the chain will be cleaned too.

This function is used before an mbuf, that arrived as packet with
m->flags & M_PKTHDR, is appended to an mbuf chain using m->m_next
(not m->m_nextpkt).

Reviewed by: glebius

19 years agoBetter comment
imp [Mon, 29 Aug 2005 18:45:21 +0000 (18:45 +0000)]
Better comment

19 years agoIn ata_mode2str() properly list -1 as UNSUPPORTED.
sos [Mon, 29 Aug 2005 18:19:06 +0000 (18:19 +0000)]
In ata_mode2str() properly list -1 as UNSUPPORTED.

19 years agoMerge tzdata200m from vendor branch.
wollman [Mon, 29 Aug 2005 17:04:47 +0000 (17:04 +0000)]
Merge tzdata200m from vendor branch.

19 years agoFix another instance of old info re: miibus
imp [Mon, 29 Aug 2005 17:03:31 +0000 (17:03 +0000)]
Fix another instance of old info re: miibus

19 years agoFix obsolete comment.
imp [Mon, 29 Aug 2005 16:48:28 +0000 (16:48 +0000)]
Fix obsolete comment.

MFC After: 2 days

19 years agoEliminate bogus seatbelt in wi_cmd. This may have been appropriate
imp [Mon, 29 Aug 2005 15:46:41 +0000 (15:46 +0000)]
Eliminate bogus seatbelt in wi_cmd.  This may have been appropriate
for the spl-era locking, but now that we can have multiple, concurrent
interrupts for multiple wi devices, having a global check to make sure
at most one of them was in wi_cmd no longer makes sense.

MFC After: 2 decifortnight

19 years agoUnbreak stand-alone build of the de(4) module.
yar [Mon, 29 Aug 2005 15:18:04 +0000 (15:18 +0000)]
Unbreak stand-alone build of the de(4) module.

19 years agoHandle failure to malloc() part of the thread structure.
deischen [Mon, 29 Aug 2005 13:49:18 +0000 (13:49 +0000)]
Handle failure to malloc() part of the thread structure.

PR: 83457

19 years agoDon't attempt to initialize the rtld lock if it can't be malloc()'d.
deischen [Mon, 29 Aug 2005 13:47:42 +0000 (13:47 +0000)]
Don't attempt to initialize the rtld lock if it can't be malloc()'d.

PR: 83452

19 years agoPlug item leak in case when not all hooks are connected.
glebius [Mon, 29 Aug 2005 13:47:08 +0000 (13:47 +0000)]
Plug item leak in case when not all hooks are connected.

Found by: David Vos <david.vos gmail.com>

19 years agoUse KTR to log allocations and destructions of bios.
pjd [Mon, 29 Aug 2005 11:39:24 +0000 (11:39 +0000)]
Use KTR to log allocations and destructions of bios.
This should hopefully allow to track down "duplicate free of g_bio" panics.

19 years agoAdd 'depth' argument to CTRSTACK() macro, which allows to reduce number
pjd [Mon, 29 Aug 2005 11:34:08 +0000 (11:34 +0000)]
Add 'depth' argument to CTRSTACK() macro, which allows to reduce number
of ktr slots used. If 'depth' is equal to 0, the whole stack will be
logged, just like before.

19 years agoAdd a missing dev_relthread() call.
phk [Mon, 29 Aug 2005 11:14:18 +0000 (11:14 +0000)]
Add a missing dev_relthread() call.

Remove unused variable.

Spotted by: Hans Petter Selasky <hselasky@c2i.net>

19 years ago- Document the fact that the real length of listen queue is 1.5 more
glebius [Mon, 29 Aug 2005 10:23:46 +0000 (10:23 +0000)]
- Document the fact that the real length of listen queue is 1.5 more
  than the value of backlog argument.
- Document the fact that a subsequent listen(2) calls on the listening
  socket change the backlog argument.
- Note that current listen queue lengths can be queried using netstat(1).

Submitted by: Igor Sysoev <is rambler-co.ru>
Wording by: gnn

19 years agoFix unhandled malloc errors.
philip [Mon, 29 Aug 2005 10:08:04 +0000 (10:08 +0000)]
Fix unhandled malloc errors.

PR: bin/83467
Submitted by: Dan Lukes <dan -at- obluda.cz>
Prodded by: glebius
MFC after: 3 days

19 years agoFix support for the VIA 6421 controller.
sos [Mon, 29 Aug 2005 09:01:57 +0000 (09:01 +0000)]
Fix support for the VIA 6421 controller.

19 years agoo Discuss the ways to escape an alias.
jcamou [Mon, 29 Aug 2005 06:47:43 +0000 (06:47 +0000)]
o Discuss the ways to escape an alias.
o Fix the alias syntax lines.
o Refer to the Aliases subsection.

PR: docs/84914
Submitted by: garys
Approved by: trhodes (mentor)
MFC after: 3 days

19 years agoGlobal Village appears to be using 0x018c as its vendor ID, but this
imp [Mon, 29 Aug 2005 05:46:05 +0000 (05:46 +0000)]
Global Village appears to be using 0x018c as its vendor ID, but this
doesn't appear in the official lists, so make a note of that.

19 years agoSimplify names.
imp [Mon, 29 Aug 2005 00:05:04 +0000 (00:05 +0000)]
Simplify names.

19 years agoFinish conversion to bus space and make ed MP safe.
imp [Sun, 28 Aug 2005 23:56:25 +0000 (23:56 +0000)]
Finish conversion to bus space and make ed MP safe.

o Lock ed
o Fix extra newline in probe messages
o Eliminate gone.
o Make detach less-racy.
o Eliminate spl*
o Switch from timeout/untimeout to callout interface.
o Read/write card memory using bus_space calls.
o generalize readmem so that we don't need ifs in the code.
o Fix memory stuff to be consistant.
o Remove OLDCARD compat stuff.
o Mark interrupt as MPSAFE.

# sic, hpp not tested at all
# ISA and PCI attachments lightly tested

19 years agoFix a typo in vop_rename_pre() where we ended up using vholdl()
ssouhlal [Sun, 28 Aug 2005 23:00:11 +0000 (23:00 +0000)]
Fix a typo in vop_rename_pre() where we ended up using vholdl()
instead of vhold(), even though the vnode interlock is unlocked.

MFC after: 3 days