Commit Graph

151259 Commits

Author SHA1 Message Date
Attilio Rao
a2bef3670a MFC r206421:
Default the machdep.lapic_allclocks to be enabled in order to cope with
broken atrtc.
Now if you want more correct stats on profhz and stathz it may be
disabled by setting to 0.

Sponsored by:	Sandvine Incorporated
2010-04-24 00:49:19 +00:00
Jilles Tjoelker
1f7026c763 MFC r197848: Clarify quoting of word in ${v=word} in sh(1). 2010-04-23 19:26:03 +00:00
Jilles Tjoelker
8b0241c2d4 MFC r206711: fnmatch: Fix bad FNM_PERIOD disabling
if an asterisk has been seen.

Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD)

PR:		116074
2010-04-23 18:01:19 +00:00
Jilles Tjoelker
0dcf6cffeb MFC r206710: Add some tests for fnmatch(3). 2010-04-23 17:52:36 +00:00
Matt Jacob
a956023126 This is an MFC of 205847, 204071 and 196580
------
Change how multipath labels are created and managed. This makes it easier
to support various storage boxes which really aren't active-active.

We only write the label on the *first* provider. For all other providers
we just "add" the disk. This also allows for an "add" verb.

A usage implication is that you should specificy the currently active
storage path as the first provider.

Note that this does not add RDAC-like functionality, but better allows for
autovolumefailover configurations (additional checkins elsewhere will support
this).

------------------------------------------------------------------------

- Style fixes.
- Prefer strlcpy() over strncpy().

------------------------------------------------------------------------

There's no need for checking result of M_WAITOK allocation.
2010-04-23 16:49:18 +00:00
Matt Jacob
2ef84ecad4 This is an MFC of 205412.
Add 'rotate' and 'getactive' verbs to provide some control and information
about what the currently active path is.
2010-04-23 16:26:10 +00:00
Matt Jacob
c18d4b44cc This is an MFS of 205412.
Add 'rotate' and 'getactive' verbs to provide some control and information
about what the currently active path is.
2010-04-23 16:20:45 +00:00
Andriy Gapon
dec2030982 MFC r206996: indent.pro example: actually install the sample file 2010-04-23 15:24:56 +00:00
Rick Macklem
bf129106d7 MFC: r206690
Add mutex lock calls to 2 cases in the experimental NFS client's
renew thread where they were missing.
2010-04-23 00:34:59 +00:00
Rick Macklem
4a9c979c0f MFC: r206688
The experimental NFS client was not filling in recovery credentials
for opens done locally in the client when a delegation for the file
was held. This could cause the client to crash in crsetgroups() when
recovering from a server crash/reboot. This patch fills in the
recovery credentials for this case, in order to avoid the client crash.
Also, add KASSERT()s to the credential copy functions, to catch any
other cases where the credentials aren't filled in correctly.
2010-04-23 00:12:23 +00:00
Nathan Whitehorn
12545f55c3 MFC r206842:
Fix brokenness in top on big-endian 32-bit systems introduced when
changing format_k2 to take a long long. Because itoa is defined as a K&R
C function, without prototyping its arguments, format_k2 passed a 64-bit
value, but itoa() received only the first word, showing '0' in all memory
fields.
2010-04-22 14:11:59 +00:00
Andriy Gapon
45ebe396a8 MFC r206687: indent(1): don't treat bare '_t' as a type name with -ta 2010-04-22 13:16:18 +00:00
Andriy Gapon
a53cbf9286 MFC r206650: g_io_check: respond to zero pp->mediasize with ENXIO 2010-04-22 12:24:59 +00:00
Andriy Gapon
e5465d9c0c MFC r206648,206651: scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set
d_sectorsize and d_mediasize

PR:		kern/138789
2010-04-22 11:46:42 +00:00
Pyun YongHyeon
93a3952553 MFC r206563:
Add Agere ET1011 PHY which is found on Belkin F5D5055 USB
  controller. Unlike Agere ET1011C, Agere ET1011 does not seem to
  need special DSP programming to workaround silicon bug.
2010-04-22 01:39:45 +00:00
Xin LI
36f19e9247 Remove a file that is not supposed to be part of -STABLE branch. 2010-04-22 00:29:36 +00:00
Xin LI
b36b15fd88 MFC: netcat 4.7. 2010-04-22 00:28:49 +00:00
Bjoern A. Zeeb
b6a02e249f MFC r206488:
Take a reference to make sure that the interface cannot go away during
  if_clone_destroy() in case parallel threads try to.

PR:		kern/116837
Submitted by:	Mikolaj Golub (to.my.trociny gmail.com)
2010-04-21 20:00:13 +00:00
Bjoern A. Zeeb
984c5c6804 MFC r206486:
Check that the interface is on the list of cloned interfaces before trying
  to remove it to avoid panics in case of two threads trying to remove it in
  parallel.

PR:	      kern/116837
Submitted by: Takahiro Kurosawa (takahiro.kurosawa gmail.com) (orig version)
2010-04-21 19:55:43 +00:00
Bjoern A. Zeeb
feb3a5f7df MFC r206481:
Plug reference leaks in the link-layer code ("new-arp") that previously
  prevented the link-layer entry from being freed.

  In both in.c and in6.c (though that code path seems to be basically dead)
  plug a reference leak in case of a pending callout being drained.

  In if_ether.c consistently add a reference before resetting the callout
  and in case we canceled a pending one remove the reference for that.
  In the final case in arptimer, before freeing the expired entry, remove
  the reference again and explicitly call callout_stop() to clear the active
  flag.

  In nd6.c:nd6_free() we are only ever called from the callout function and
  thus need to remove the reference there as well before calling into
  llentry_free().

  In if_llatbl.c when freeing the entire tables make sure that in case we
  cancel a pending callout to remove the reference as well.

  Reviewed by:          qingli (earlier version)
  MFC after:            10 days
  Problem observed, patch tested by: simon on ipv6gw.f.o,
                        Christian Kratzer (ck cksoft.de),
                        Evgenii Davidov (dado korolev-net.ru)
PR:			kern/144564
Configurations still affected:	with options FLOWTABLE
2010-04-21 19:51:22 +00:00
Bjoern A. Zeeb
1ed532bb3d MFC r206470:
In if_detach_internal() we cannot hold the af_data lock over the
  dom_ifdetach() calls as they might sleep for callout_drain().
  Do as we do in if_attachdomain1() [r121470] and handle
  if_afdata_initialized earlier and call dom_ifdetach() unlocked.

  Discussed with:       rwatson
2010-04-21 19:48:40 +00:00
Bjoern A. Zeeb
b0cf9f5f20 MFC r206469:
In if_detach_internal() only try to do the detach run if if_attachdomain1()
  has actually succeeded to initialize and attach.  There is a theoretical
  possibility to drop out early in if_attachdomain1() leaving the array
  uninitialized if we cannot get the lock.

  Discussed with:       rwatson
2010-04-21 19:47:19 +00:00
Bjoern A. Zeeb
407b19379c MFC r205345:
Split eventhandler_register() into an internal part and a wrapper function
  that provides the allocated and setup eventhandler entry.

  Add a new wrapper for VIMAGE that allocates extra space to hold the
  callback function and argument in addition to an extra wrapper function.
  While the wrapper function goes as normal callback function the
  argument points to the extra space allocated holding the original func
  and arg that the wrapper function can then call.

  Provide an iterator function for the virtual network stack (vnet) that
  will call the callback function for each network stack.

  Provide a new set of macros for VNET that in the non-VIMAGE case will
  just call eventhandler_register() while in the VIMAGE case it will use
  vimage_eventhandler_register() passing in the extra iterator function
  but will only register once rather than per-vnet.
  We need a special macro in case we are interested in the tag returned
  as we must check for curvnet and can neither simply assign the
  return value, nor not change it in the non-vnet0 case without that.

  Discussed with:       jhb
  Reviewed by:  zec (earlier version), jhb
2010-04-21 19:45:41 +00:00
Konstantin Belousov
c36c99a99d MFC r206549:
Align the declaration for sa_sigaction with POSIX.

MFC r206649:
Still reference struct __sigaction with clarification when this form
of argument declaration is needed.

MFC r206802:
Revert r206649. Simplify the presented declaration of struct sigaction.
2010-04-21 11:09:13 +00:00
Dag-Erling Smørgrav
124981e16f MFH OpenSSH 5.4p1 2010-04-21 06:33:10 +00:00
Maxim Konovalov
6cf6ace6cd MFC r205874: make sockstat -6 output more readable for long ipv6
addresses.
2010-04-21 05:39:51 +00:00
Maxim Konovalov
9e0142f045 MFC r205873: remove duplication, improve wording. 2010-04-21 05:38:16 +00:00
Maxim Konovalov
f81dc89a9d MFC r205672: fix typo. 2010-04-21 05:36:53 +00:00
Maxim Konovalov
79d7271eb5 MFC r205671: trim leading w/space. 2010-04-21 05:35:06 +00:00
Weongyo Jeong
f3b73f10b5 remove svn:mergeinfo properties committed during my MFCs. 2010-04-21 00:26:41 +00:00
Weongyo Jeong
06c84dc09b MFC r205141:
enables S/W beacon miss handler.

  Reported by:	imp
2010-04-21 00:23:23 +00:00
Weongyo Jeong
87ecd62c3d MFC r205003:
Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug
  and non-debug cases

MFC r204992:
  fixes a compile error if INVARIANTS is disabled.

  Pointy hat to: me
  Submitted by: Michael Butler <imb at protected-networks dot net>

MFC r204983:
  Fix build breakage introduced in r204922.

MFC r204923:
  uses KOBJMETHOD_END macro to indicate the end of method table.

  Submitted by: yongari

MFC r204922:
  o uses bus accessor macros to read values from ivar so no more values
    are referenced directly from ivar pointer.  It's to do like what other
    buses do. [1]
  o changes exported prototypes.  It doesn't use struct siba_* structures
    anymore that instead of it it uses only device_t.
  o removes duplicate code and debug messages.
  o style(9)

  Pointed out by:        imp [1]
2010-04-21 00:22:16 +00:00
Weongyo Jeong
947d8d8758 MFC r204662:
Hook up the bwn driver.

  Pointed by: nwhitehorn
2010-04-21 00:15:58 +00:00
Weongyo Jeong
489d21bb61 MFC r204657:
fixes an attached-at-boot issue that bwn(4) using device_identify
  interface didn't be attached automatically at boot time so changes a
  approach to attach children based on leveraging some newbus niceties.

  Submitted by: nwhitehorn
2010-04-21 00:13:44 +00:00
Weongyo Jeong
dcad5dbe15 MFC r204542:
calculates the integer square root if a positive integer X is larger
  than 256 instead of using sqrt_table.

  Reported by: Joe Marcus Clarke <marcus at freebsd dot org>
2010-04-21 00:06:39 +00:00
Weongyo Jeong
b0b1f91e38 MFC r204437:
fixes a bug to load firmware images for LP PHY. For LP PHY always,
  `lp_' string is contained in its full image names.
2010-04-21 00:05:22 +00:00
Weongyo Jeong
95def843ce MFC r204436:
supports the adhoc demo mode that it's tested on modified aircrack-ng
  suite and worked.

  Submitted by:	Paul B Mahol <onemda at gmail dot com>
2010-04-21 00:02:48 +00:00
Weongyo Jeong
be58dd8584 MFC r204385:
don't need to check BWN_RX_PHYST0_SHORTPRMBL flag because it's already
  handled in later.

  Reported from: imp, nwhitehorn
2010-04-21 00:01:38 +00:00
Weongyo Jeong
9460e81292 MFC r204343:
Updates what firmware module should be used for LP (low power) PHY
  users and bumps date.
2010-04-20 23:59:02 +00:00
Xin LI
2c221f6f88 MFC assembler version of match functions for amd64 and i386(*).
This gives approximately 15% improvement on compression case.

(*) i386 assembler version is enabled ONLY when MACHINE_CPU have
'i686' which is not default on FreeBSD/i386.  One can specify
for instance CPUTYPE=pentium4 in /etc/make.conf to get this
feature.
2010-04-20 22:57:05 +00:00
Weongyo Jeong
499ba4648d MFC r204328:
Add bwn(4) driver.
2010-04-20 22:55:07 +00:00
Jilles Tjoelker
f08f4ed374 MFC r203576,r203677: sh: Don't stat() $MAIL/$MAILPATH if not interactive.
These may be NFS mounted, and we should not touch them unless we are going
to do something useful with the information.
2010-04-20 22:52:28 +00:00
Xin LI
a6cd5bcfbf MFC r205472:
Enable mmap for minigzip(1).
2010-04-20 22:52:13 +00:00
Xin LI
a9de89ae43 MFC r206387:
Diff reduction against NetBSD and add myself to AUTHORS section of the
manual page as I wrote the unpack functionality.  No actual executable
code change verified with md5(1).
2010-04-20 22:47:24 +00:00
Jilles Tjoelker
7e140e7e32 MFC r200943: sh: Remove setting variables from dotcmd/exportcmd.
It is already done by evalcommand(), unless special-ness has been removed,
in which case variable assignments should not persist. (These are currently
always special builtins, but this may change later: command builtin,
command substitution.)

This also fixes a memory leak when calling . with variable assignments.

Example:
  valgrind --leak-check=full sh -c 'x=1 . /dev/null; x=2'
2010-04-20 22:32:34 +00:00
Jilles Tjoelker
631680bf1c MFC r199282: sh: Allow a newline before "in" in a for command,
as required by POSIX.
2010-04-20 22:20:31 +00:00
Weongyo Jeong
8fefa76ddf MFC r203945:
adds bwn(4) driver man page which missed to be merged.

MFC r204327:
  Connect bwn.4 to the build.
2010-04-20 22:00:56 +00:00
Weongyo Jeong
56ffe55185 MFC r204326:
Add bwn(4) driver to the build.
2010-04-20 21:55:44 +00:00
Weongyo Jeong
460ea5b2fd MFC r204257:
o adds sysctl variables to show device statistics.
  o records RTS success/fail statistics.

  Pointed by:   imp
2010-04-20 21:52:54 +00:00
Weongyo Jeong
f60b07631b MFC r204256:
fixes a compile error; invalid type argument of '->'.
2010-04-20 21:51:45 +00:00