Commit graph

144424 commits

Author SHA1 Message Date
Tim Kientzle 9feaf24750 Write timestamps with exactly 9 digits after the period.
This ensures that the value written is both compatible with
older mtree versions (which expect the value after the period
to be an integer count of nanoseconds after the whole second)
and is a correct floating-point value.

Leave the parsing code unchanged so it will continue to read
older files.
2009-01-31 05:17:28 +00:00
Bjoern A. Zeeb 351c4745f1 Remove 4 entirely unsued ip6 variables.
Leave then in struct vinet6 to not break the ABI with kernel modules
but mark them for removal so we can do it in one batch when the time
is right.

MFC after:	1 month
2009-01-30 23:40:24 +00:00
Maksim Yevmenkin 7718ced0ea Add btpand(8) daemon from NetBSD. This daemon provides support for
Bluetooth Network Access Point (NAP), Group Ad-hoc Network (GN) and
Personal Area Network User (PANU) profiles.

Obtained from:	NetBSD
MFC after:	1 month
2009-01-30 22:23:21 +00:00
Jamie Gritton 46f09b7712 Committo ergo sum.
Approved by:	bz
2009-01-30 22:00:31 +00:00
Bjoern A. Zeeb 89d185188a Use NULL rather than 0 when comparing pointers.
MFC after:	2 weeks
2009-01-30 20:17:08 +00:00
Giorgos Keramidas 7e7c1896a0 Sometimes, depending on the bpf filter rules used in $PATTERN,
the example script of the manpage feeds awk(1) with values larger
than UINT32_MAX.  Then awk prints a negative value, and this
messes up $BPFPROG.  Trying to load the resulting bpf byte codes
with ngctl then fails.

For example, the output for PATTERN="udp and dst net 255.255.0.0/16"
should be (all in one line):

    bpf_prog_len=10
    bpf_prog=[
      { code=40 jt=0 jf=0 k=12 }
      { code=21 jt=7 jf=0 k=34525 }
      { code=21 jt=0 jf=6 k=2048 }
      { code=48 jt=0 jf=0 k=23 }
      { code=21 jt=0 jf=4 k=17 }
      { code=32 jt=0 jf=0 k=30 }
      { code=84 jt=0 jf=0 k=4294901760 }
      { code=21 jt=0 jf=1 k=4294901760 }
      { code=6 jt=0 jf=0 k=8192 }
      { code=6 jt=0 jf=0 k=0 }
    ]

The two k=4294901760 values are displayed as k=-2147483648 by awk.

Replace the awk script of the manpage example with a slower but
safer version, that doesn't really attempt to convert the byte
code printed by tcpdump from string to number and back.

PR:		docs/123255
Submitted by:	Eugenio Maffione, eugenio.maffione at telecomitalia.it
MFC after:	3 days
2009-01-30 19:33:04 +00:00
David E. O'Brien 111a52201c Add the '-C' "check clean" flag. If the FS is marked clean, skip file
system checking.  However, if the file system is not clean, perform a
full fsck.

Reviewed by:	delphij
Obtained from:	Juniper Networks
2009-01-30 18:33:05 +00:00
Giorgos Keramidas 74f13fb3b6 Bump .Dd for r187609 2009-01-30 16:23:57 +00:00
Warner Losh e9b777e9cc Unbreak make -s. There's about a 10% performance improvement with -s
in many environments.  The recent --- blah --- reintroduction has
killed.  That output makes almost no sense when all the other output
is silenced.
2009-01-30 16:12:32 +00:00
Gabor Kovesdan 2699f8569c - Remove non-existing reference
- Fix trailing comma

PR:             docs/85118
Submitted by:   vs
MFC after:      3 days
2009-01-30 15:43:55 +00:00
Gabor Kovesdan e468313d79 - Remove superfluous comment
PR:             docs/129400
Submitted by:   Gavin Atkinson <gavin@freebsd.org>
2009-01-30 15:28:56 +00:00
Gabor Kovesdan aa1c2a80b4 - Remove superfluous comment
PR:             docs/129400
Submitted by:   Gavin Atkinson <gavin@freebsd.org>
2009-01-30 15:28:35 +00:00
Gabor Kovesdan d3e084d2cf - Remove superfluous comment
PR:		docs/129400
Submitted by:	Gavin Atkinson <gavin@freebsd.org>
2009-01-30 15:27:04 +00:00
Gabor Kovesdan 7bb456075e - Rename adding_user(8) to adding_user(7). There's no adding_user utility,
but the man page describes conceptual information about the process of
  adding a user, thus it should belong to section 7.
- Remove HISTORY and BUGS sections because of the aforementioned reason.

PR:		docs/130151
Submitted by:	Marian Cerny <jojo@matfyz.cz>
MFC after:	3 days
2009-01-30 15:14:58 +00:00
Dag-Erling Smørgrav 1ccdc84fdd Make sure the entries don't run into each other when they're longer than
the allotted space.

PR:		bin/129318
Submitted by:	Ighighi <ighighi@gmail.com>
MFC after:	3 weeks
2009-01-30 14:28:50 +00:00
Maxim Konovalov 9b7076d1ce o Fix typo: indentical -> identical.
PR:		docs/131149
Submitted by:	Patrick Oonk
MFC after:	1 week
2009-01-30 09:42:25 +00:00
Andrew Thompson 0adedf6d9a Increment total_bounced busdma stat as required. 2009-01-30 07:01:32 +00:00
Tim Kientzle bbc14adaed Accept integer times. Previously, the field "time=1233294539" would be
rejected as invalid.
2009-01-30 05:49:27 +00:00
Warner Losh 5dc2a65eed Spawn one fewer shells on startup. We don't use dhcp_interfaces at
all in this function, and grep shows no other instances of it
(besides, this is a function, and in a sub-shell, so all changes are
local).
2009-01-30 03:41:45 +00:00
David E. O'Brien b29362d8dd For files not named on the command line, only the basename is compared
to the exclude pattern.
Change this so that "grep --exclude='*/.svn/*' -[Rr] foo *" DWIM.

Obtained from:	dave+news001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Dave Gibson)
Obtained from:	comp.unix.questions [Thu, 15 Mar 2007 18:54:38 +0000]
Obtained from:	http://unix.derkeiler.com/Newsgroups/comp.unix.questions/2007-03/msg00046.html
2009-01-30 00:22:08 +00:00
Sam Leffler a712d81c55 track hal changes 2009-01-29 23:29:07 +00:00
Sam Leffler 2961d4c674 update for hal changes 2009-01-29 23:24:21 +00:00
Sam Leffler 800e5ab76a setup default fixed rates for static turbo and 11n;
the 11n rates are pure guess
2009-01-29 23:12:06 +00:00
Sam Leffler f76cde9515 set ni_txparms for static turbo mode 2009-01-29 23:11:18 +00:00
Sam Leffler 8500d65d94 setup default rate set for static turbo mode 2009-01-29 23:09:12 +00:00
Roman Divacky e9b123be77 Define NULL to be __null in a case of gnu c++. This makes sentinel attribute
work ok in C++. Note that we enable this only for gcc 4.x for any value
of x. The __null was introduced in gcc 4.1 (in fact it was commited
12 days after release of gcc 4.0) and as we have never released any version
of FreeBSD with gcc 4.0 nor ports support gcc 4.0.x this is a safe check.

Using __GNUC_PREREQ__ would require us to include cdefs.h in params.h so
we just check __GNUC__.

Approved by:	kib (mentor)
Tested by:	exp build of ports (done by pav)
Tested by:	make universe (done by me)
2009-01-29 16:51:09 +00:00
Edward Tomasz Napierala 49c4791ccc Make sure the cdev doesn't go away while the filesystem is still mounted.
Otherwise dev2udev() could return garbage.

Reviewed by:	kib
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2009-01-29 16:47:15 +00:00
John Baldwin be57da218c Use si_drv1 to hold the softc for the adb_mouse character device instead of
using devclass_get_softc().

Tested by:	nwhitehorn
2009-01-29 16:18:49 +00:00
Robert Watson ad765b0945 If a process is a zombie and we couldn't identify another useful state,
print out the state as "zombine" in preference to "unknown" when ^T is
pressed.

MFC after:	3 days
Sponsored by:	Google, Inc.
2009-01-29 09:32:56 +00:00
Jeff Roberson 9c8e8e3aa7 - Allocate apic vectors on a per-cpu basis. This allows us to allocate
more irqs as we have more cpus.  This is principally useful on systems
   with msi devices which may want many irqs per-cpu.

Discussed with:	jhb
Sponsored by:	Nokia
2009-01-29 09:22:56 +00:00
Giorgos Keramidas 9bad6e2c6d Backout change 187782. It inhibits ntpd from starting at all
when ntpd_sync_on_start is set.

Noticed by:	rafan
2009-01-29 06:43:29 +00:00
Ed Schouten 218653a7fc Make adb_mouse use dev2unit() instead of minor().
A real fix would be to migrate it to si_drv0 to store the softc
directly, but this is the quickest way to fix it right now.
2009-01-29 05:59:42 +00:00
Alexander Motin 64e4196db9 Add one more debug level. 2009-01-28 23:18:21 +00:00
Alexander Motin 5b69a497e5 Add hw.sdhci.debug sysctl to control debug level. 2009-01-28 22:53:41 +00:00
Alexander Motin ed01be88f7 Improve mmc driver verbose logging.
Make requests logging controllable by hw.mmc.debug sysctl.
2009-01-28 22:09:00 +00:00
John Baldwin de43ac6044 Use a different value for the initial control word for the FPU state for
32-bit processes.  The value matches the initial setting used by
FreeBSD/i386.  Otherwise, 32-bit binaries using floating point would use
a slightly different initial state when run on FreeBSD/amd64.

MFC after:	1 week
2009-01-28 20:35:16 +00:00
Maksim Yevmenkin 3045a45f42 Update ubtbcmfw2 (aka usb2_bluetooth_fw) driver
Reviewed by:	HPS
2009-01-28 20:06:02 +00:00
Maksim Yevmenkin 0e360a7ebe Make ng_ubt2 (aka usb2_bluetooth_ng) driver only attach as "generic" driver
Reviewed by:	HPS
2009-01-28 20:04:39 +00:00
Ed Schouten f3b86a5fd7 Mark most often used sysctl's as MPSAFE.
After running a `make buildkernel', I noticed most of the Giant locks in
sysctl are only caused by a very small amount of sysctl's:

- sysctl.name2oid. This one is locked by SYSCTL_LOCK, just like
  sysctl.oidfmt.

- kern.ident, kern.osrelease, kern.version, etc. These are just constant
  strings.

- kern.arandom, used by the stack protector. It is already protected by
  arc4_mtx.

I also saw the following sysctl's show up. Not as often as the ones
above, but still quite often:

- security.jail.jailed. Also mark security.jail.list as MPSAFE. They
  don't need locking or already use allprison_lock.

- kern.devname, used by devname(3), ttyname(3), etc.

This seems to reduce Giant locking inside sysctl by ~75% in my primitive
test setup.
2009-01-28 19:58:05 +00:00
Sam Leffler c4506e0298 Remove gsm hacks now that we can do this "right":
o no need for special country codes; it's sufficient to use the sku
o no need to specify bands w/ 2.4G frequencies, use the real values
o remove duplicate band specs
2009-01-28 19:25:51 +00:00
Sam Leffler 1dfdb874b6 include the channel list in list caps when -v is set; ieee channel
#'s are not available and we have to hack around the mapchan routine
but it lets us see the calibration table w/o forcing the debug regdomain
2009-01-28 19:24:29 +00:00
Sam Leffler fa46e75db6 pritize the channel we display with list chans so that, among other
things, 1/2 and 1/4 width channels are hidden behind the full width
channel; this is needed because they are ordered such that they
appear after in the channel table
2009-01-28 19:23:12 +00:00
Sam Leffler 2da7e03a99 simplify display of 1/2 and 1/4 width channels 2009-01-28 19:20:12 +00:00
Sam Leffler 2f686fcee3 improve debug msgs for regdomain operations; print channel flags
symbolically so it's easier to identify channels and why they
are added (or not)
2009-01-28 19:18:58 +00:00
Sam Leffler d6bf86af1e Fix 1/2 and 1/4 width channel handling:
o only include 1/2 and 1/4 width channels when they are specified in the
  regulatory database description; previously we treated them as if they
  were part of the band and blindly added them for 11a/g
o check the channel list returned in the devcaps to identify whether a
  device supports 1/2 or 1/4 width channels on a band; this might be
  better brought out as a capability bit to avoid filling the channel
  list w/ 1/2 and 1/4 width channels but then cards that only support
  these channels in a range of frequencies could not be described (though
  right now we don't check frequency range only band)
2009-01-28 19:15:52 +00:00
Warner Losh bb5d3b71d3 Use the correct field name for the size of the sierra_id. While this
is the same size as id, and is unlikely to change, it seems better to
use the correct field here.  There's no difference in the generated
code.
2009-01-28 19:09:49 +00:00
John Baldwin 9078981ab1 Convert the global mutex protecting the directory lookup name cache from a
mutex to a reader/writer lock.  Lookup operations first grab a read lock and
perform the lookup.  If the operation results in a need to modify the cache,
then it tries to do an upgrade.  If that fails, it drops the read lock,
obtains a write lock, and redoes the lookup.
2009-01-28 19:05:18 +00:00
John Baldwin c222ece0cc Mark cd9660 MPSAFE and add support for using shared vnode locks during
pathname lookups.
- Remove 'i_offset' and 'i_ino' from the ISO node structure and replace
  them with local variables in the lookup routine instead.
- Cache a copy of 'i_diroff' for use during a lookup in a local variable.
- Save a copy of the found directory entry in a malloc'd buffer after a
  successfull lookup before getting the vnode.  This allows us to release
  the buffer holding the directory block before calling vget() which
  otherwise resulted in a LOR between "bufwait" and the vnode lock.
- Use an inlined version of vn_vget_ino() to handle races with ..
  lookups.  I had to inline the code here since cd9660 uses an internal
  vget routine to save a disk I/O that would otherwise re-read the
  directory block.
- Honor the requested locking flags during lookups to allow for shared
  locking.
- Honor the requested locking flags passed to VFS_ROOT() and VFS_VGET()
  similar to UFS.
- Don't make every ISO 9660 vnode hold a reference on the vnode of the
  underlying device vnode of the mountpoint.  The mountpoint already
  holds a suitable reference.
2009-01-28 18:54:56 +00:00
John Baldwin 04c98d464f Sync with ufs_vnops.c:1.245 and remove support for accessing device nodes
in ISO 9660 filesystems.
2009-01-28 18:46:29 +00:00
Sam Leffler f8b1ea1737 add an assert to verify the number of channels returned by ic_getradiocaps
correlates with the size of the channel array passed down

might want to promote this to be always present to catch for driver errors
2009-01-28 18:39:23 +00:00