Commit Graph

147869 Commits

Author SHA1 Message Date
Edwin Groothuis
3d942a6fc5 [patch] Portuguese timedef
In Portuguese, the names of the days of the week are not capitalized.
Also there is always a dash before "feira" in the names of the days.
For example: "segunda-feira" and not "segunda feira" (which has a
completely different meaning).

x_fmt is not correct either. The date separator should not be a dot
but a slash. Example: 31/12/2005 if far more used in Portugal than
31.12.2005.

References:
- a Portuguese online dictionary http://priberam.pt/dlpo/dlpo.aspx
- http://answers.com/days_of_the_week (there are translations to
  various languages, including Portuguese, at the bottom of the
  page)
- http://en.wikipedia.org/wiki/Week-day_names (there are translations
  to various languages, including Portuguese, at the bottom of the
  page)
- a Portuguese style guide
  http://www.publico.clix.pt/nos/livro_estilo/16d-palavras.html
  ("datas" section)

PR:		conf/58595
Submitted by:	Chris Stenton <jacs@gnome.co.uk>
MFC after:	1 week
2009-06-05 13:05:14 +00:00
Luigi Rizzo
b4043122fa Small changes (no actual code changes) in preparation of moving ipfw-related
stuff to its own directory, and cleaning headers and dependencies:

In this commit:
+ remove one use of a typedef;
+ document dn_rule_delete();
+ replace one usage of the DUMMYNET_LOADED macro with its value;

No MFC planned until the cleanup is complete.
2009-06-05 12:49:54 +00:00
Rafal Jaworowski
2b7b2d7952 Discover and handle the number of E500 CPUs in run time. 2009-06-05 09:46:00 +00:00
Brian Somers
f121baaa45 If we're passed garbage in malloc_init(), panic() rather than expecting
a KASSERT to handle it.  People are likely to turn off INVARIANTS RSN
and loading an old module can cause garbage-in here.

I saw the issue with an older nvidia driver (x11/nvidia-driver) loading
into a new kernel - a crash wasn't seen 'till sysctl_kern_malloc_stats().
I was lucky that mtp->ks_shortdesc was NULL and not something horrible.

While I'm here, KASSERT that malloc_uninit() isn't passed something that's
not in kmemstatistics.

MFC after:	3 weeks
2009-06-05 09:16:52 +00:00
Rafal Jaworowski
29794416db Fill PTEs covering kernel code and data.
Without this fix pte_vatopa() was not able to retrieve physical address of
data structures inside kernel, for example EFAULT was reported while acessing
/dev/kmem ('netstat -nr').

Submitted by:	Piotr Ziecik
Obtained from:	Semihalf
2009-06-05 09:09:46 +00:00
Brian Somers
22da50cfc8 Change the behaviour of -F slightly; it now persists (forever) in
trying to open files rather than giving up when it encounters an
error.  ENOENT errors are not reported.

As a result, files that are moved away then recreated are not at
risk of being 'lost' to tail.  Files that are recreated and
temporarily have unreadable permissions will be shown when they
are fixed.

This behaviour is consistent with the GNU version of tail but
without the verbiage that goes with the GNU version.

This change also fixes error messages accompanying -f and -F.
They no longer report problems with (null)!

MFC after:	3 weeks
2009-06-05 09:08:53 +00:00
Edwin Groothuis
ca67260eba Misc fixed to fortunes
PR:		conf/112024
Submitted by:	Niclas Zeising <niclas.zeising@gmail.com>
MFC after:	2 days
2009-06-05 07:57:10 +00:00
Benno Rice
effdb43e12 Bump document date.
Pointed out by:	trhodes
2009-06-05 03:06:24 +00:00
Benno Rice
02479ead25 Perform some checking on the requested list of modules to warn people if they
try to load modules by filename out of the current directory where the module
in question may be further up the module path or not in the module path at all.

Also add some text to the man page to help explain what's going on.

Sponsored by:	Redacted Consulting
2009-06-04 23:43:08 +00:00
Benno Rice
815d752a97 style(9) pass prior to further changes.
Sponsored by:	Redacted Consulting
2009-06-04 23:31:05 +00:00
Edwin Groothuis
b962a0d6e0 [patch] fortune(6): George Bernard Shaw quote fix
From the original PR:

    s/milestones/millstones/
    and less important..
    s/man/Man/
    Not every source I've seen capitalizes 'Man', but it seems
    right. Uncapitalized 'man' would usually be preceded by
    an 'a'. But I haven't seen any reference cite the orignal
    source yet, so I can't say for sure.

http://quotationsbook.com/quote/31568/

PR:		conf/131469
Submitted by:	John Hein <jhein@timing.com>
MFC after:	2 days
2009-06-04 22:01:50 +00:00
Andrew Thompson
b7d3e2426f Remove duplicate variable setting.
Spotted by:	Sylvestre Gallon
2009-06-04 22:00:48 +00:00
Andrew Thompson
c737a63263 revert r162516. We only support 1 or 2 channels per stream
which reflects mono and stereo.

Submitted by:	Hans Petter Selasky
2009-06-04 21:59:28 +00:00
Edwin Groothuis
d0e67068f4 [patch] fortune(6): file not Y2.01K compliant
Update the time in the fortune to make the joke a little bit more
realistic again: Bump year from 2009 to 2039.

PR:		conf/129860
Submitted by:	Alan Amesbury <amesbury@umn.edu>
MFC after:	2 days
2009-06-04 21:55:07 +00:00
Edwin Groothuis
5db5ccf42c [patch] calendar.music: Chuck Berry was born in St. Louis, Missouri, not California
The /usr/bin/calendar program reports that Chuck Berry was born
    in San Jose California but he was not born in California.

    Chuck Berry was born in St. Louis, Missouri in 1926 on October 18.

    http://www.chuckberry.com/about/bio.htm
    http://www.khaldea.com/charts/chuckberry.shtml
    http://en.wikipedia.org/wiki/Chuck_Berry

PR:		conf/128215
Submitted by:	comet--berkeley (aka Pablo Picasso) <comet@transbay.net>
MFC after:	2 days
2009-06-04 21:48:04 +00:00
Sam Leffler
5d644c39b5 track rename of CSA ie
Submitted by:	wxs
2009-06-04 18:22:21 +00:00
Paul Saab
983b43c5de When checking for shared writes, use the struct mount returned from
vn_start_write.

Reviewed by:	jhb
2009-06-04 16:50:03 +00:00
Paul Saab
a6d545d8ed Support shared vnode locks for write operations when the offset is
provided on filesystems that support it.  This really improves mysql
+ innodb performance on ZFS.

Reviewed by:	jhb, kmacy, jeffr
2009-06-04 16:18:07 +00:00
Sam Leffler
c70761e6b5 o station mode channel switch support
o IEEE80211_IOC_CHANSWITCH fixups:
  - restrict to hostap vaps
  - return EOPNOTSUPP instead of EINVAL when applied to !hostap vap
    or to a vap w/o 11h enabled
  - interpret count of 0 to mean cancel the current CSA

Reviewed by:	rpaulo, avatar
2009-06-04 15:57:38 +00:00
Rick Macklem
3144f81221 Fix upcall races in the client side krpc. For the client side upcall,
holding SOCKBUF_LOCK() isn't sufficient to guarantee that there is
no upcall in progress, since SOCKBUF_LOCK() is released/re-acquired
in the upcall. An upcall reference counter was added to the upcall
structure that is incremented at the beginning of the upcall and
decremented at the end of the upcall. As such, a reference count == 0
when holding the SOCKBUF_LOCK() guarantees there is no upcall in
progress. Add a function that is called just after soupcall_clear(),
which waits until the reference count == 0.
Also, move the mtx_destroy() down to after soupcall_clear(), so that
the mutex is not destroyed before upcalls are done.

Reviewed by:	dfr, jhb
Tested by:	pho
Approved by:	kib (mentor)
2009-06-04 14:49:27 +00:00
Rick Macklem
a4fa5e6dd9 Fix two races in the server side krpc w.r.t upcalls:
Add a flag so that soupcall_clear() is only called once to cancel
  an upcall.
  Move the test for xprt_registered in the upcall down to after the
  mtx_lock() of the pool mutex, to catch the case where it is
  unregistered while the upcall is waiting for the mutex.
Also, move the mtx_destroy() of the pool mutex to after SVC_RELEASE(),
so that it isn't destroyed before the upcalls are disabled.

Reviewed by:	dfr, jhb
Tested by:	pho
Approved by:	kib (mentor)
2009-06-04 14:13:06 +00:00
Luigi Rizzo
c421791e77 fix a bug introduced in rev.190865 related to the signedness
of the credit of a pipe. On passing, also use explicit
signed/unsigned types for two other fields.
Noticed by Oleg Bulyzhin and Maxim Ignatenko long ago,
i forgot to commit the fix.

Does not affect RELENG_7.
2009-06-04 12:27:57 +00:00
Ed Schouten
e38ee1f2b2 Correct typo; errno => error. 2009-06-04 11:22:53 +00:00
Robert Watson
927e0a56ce Re-add opt_mac.h include, which is required in order for MNT_MULTILABEL
to be set properly on devfs.  Otherwise, it isn't possible to set labels
on /dev nodes.

Reported by:	Sergio Rodriguez <sergiorr at yahoo.com>
MFC after:	3 days
2009-06-04 10:30:18 +00:00
Doug Rabson
d7e0637111 Don't panic in nlm_record_lock if we get ENOENT from lf_advlockasync. This
is likely to be because the file was just removed and in our context this is
harmless.
2009-06-04 08:13:51 +00:00
Weongyo Jeong
df99b9c9ac add two prerequisites; if_zydreg.h and if_zydfw for dependency check. 2009-06-04 03:59:20 +00:00
Weongyo Jeong
78cc4bbbb0 reimplements RF logic for GCT chipset (as known as UW2453) to support
ICIDU NI-707503 which is donated by Nick Hibma (great thanks!).  Though
it has a MAXIM RF (0x8) there's some success reports with using GCT RF
(0x9) codes and it worked well for ICIDU NI-707503 too.  So codes for
MAXIM and GCT RFs are integrated.

Before this commit, if I rememeber correctly, MAXIM RF is never tested
that it seems it's a first report working with FreeBSD.
2009-06-04 02:49:50 +00:00
Weongyo Jeong
9dde689c63 cleanups the device match list. 2009-06-04 01:55:13 +00:00
Sam Leffler
7131987ded When a channel switch is done to a channel with different operating
characteristics force the stations to re-associate so protocol state
is re-initialized.  Note that for 11h/DFS this is irrelevant as channel
changes are never cross-band.

Reviewed by:	ctlaw
2009-06-03 23:33:09 +00:00
Sam Leffler
4e15098821 After a channel switch mark associated stations so they will immediately
be probed as inactive; this more quickly weeds out stations that don't
follow to the new channel.
2009-06-03 23:30:25 +00:00
Rick Macklem
35f2eba009 Re-format the nfsv4.4 man page so that all sentences start on a
new line.

Approved by:	kib (mentor)
2009-06-03 21:50:26 +00:00
John Baldwin
8985d7f35e Remove unused VM includes. 2009-06-03 20:25:13 +00:00
Robert Watson
3ad3d9c5ef Add one further check with mac_policy_count to an mbuf copying case
(limited to netatalk) to avoid MAC label lookup on both mbufs if no
policies are registered.

Obtained from:	TrustedBSD Project
2009-06-03 19:41:12 +00:00
Marius Strobl
506a380d0f Adjust the padding of struct pcpu to r193219.
Submitted by:	Eygene Ryabinkin
2009-06-03 19:31:26 +00:00
Robert Watson
3de4046939 Continue work to optimize performance of "options MAC" when no MAC policy
modules are loaded by avoiding mbuf label lookups when policies aren't
loaded, pushing further socket locking into MAC policy modules, and
avoiding locking MAC ifnet locks when no policies are loaded:

- Check mac_policies_count before looking for mbuf MAC label m_tags in MAC
  Framework entry points.  We will still pay label lookup costs if MAC
  policies are present but don't require labels (typically a single mbuf
  header field read, but perhaps further indirection if IPSEC or other
  m_tag consumers are in use).

- Further push socket locking for socket-related access control checks and
  events into MAC policies from the MAC Framework, so that sockets are
  only locked if a policy specifically requires a lock to protect a label.
  This resolves lock order issues during sonewconn() and also in local
  domain socket cross-connect where multiple socket locks could not be
  held at once for the purposes of propagatig MAC labels across multiple
  sockets.  Eliminate mac_policy_count check in some entry points where it
  no longer avoids locking.

- Add mac_policy_count checking in some entry points relating to network
  interfaces that otherwise lock a global MAC ifnet lock used to protect
  ifnet labels.

Obtained from:	TrustedBSD Project
2009-06-03 18:46:28 +00:00
Stanislav Sedov
097695e97a - Remove unused sparc64-bitops.h file. Our ext2fs code doesn't use
sparc64-specific bitops implemetations and relies on generic ones.
  Furthermore, bitops implementations present in sparc64-bitops.h
  are written in C similarly to generic bitops.
2009-06-03 17:30:10 +00:00
Sam Leffler
309a3e4521 treat IEEE80211_S_CSA as a "running state"; this fixes
ap mode 11h channel switch announcements
2009-06-03 17:25:19 +00:00
Joseph Koshy
3b9626854a Trim an obsolete comment.
Noticed by:	lifengkai <lifengkai at huawei dot com>
2009-06-03 17:19:12 +00:00
Rafal Jaworowski
f439325342 Make GPT style partitiong endian-safe in U-Boot support library.
Submitted by:	Piotr Ziecik
Obtained from:	Semihalf
2009-06-03 16:28:29 +00:00
Stanislav Sedov
52d9a478fe - Style(9) improvements.
- Convert all K&R definitions to ANSI equialents.
- Retire bsd_malloc and bsd_free macros and
  use malloc/free directly.
- Drop some unused debugging calls.

This commit brings no functional changes.
2009-06-03 14:18:37 +00:00
Stanislav Sedov
22db14d54b - Sync our copies of ext2fs Linux headers to current Linux versions.
Minimize differencies between our ext2fs headers and relevant Linux
  versions by using EXT2_SB macro to access the superblock fields. Most
  of the differencies in access to these fields are now hidden inside
  this macro.
- Rename the s_db_per_group field of ext2fs_sb_info to s_gdb_count
  to reflect the similar change in Linux headers. New name also seem
  to be more appropriate for this field.
- Use proper types for s_first_inode and s_inode_size in-core superblock
  fields. Now they reflec types used in the on-disk superblock version.
- Add support for older filesystem revisions that doesn't have proper
  s_first_ino and s_inode_size fields in the on-disk superblock. In these
  cases predefined values for these fields are used.
- Add simple sanity checks for s_first_inode and s_inode_size correctness.

Reviewed by:	bde (previous version)
MFC after:	2 weeks
2009-06-03 13:25:50 +00:00
Sean Nicholas Barkas
af0adb8312 Add vm_lowmem event handler for dirhash. This will cause dirhashes to be
deleted when the system is low on memory. This ought to allow an increase to
vfs.ufs.dirhash_maxmem on machines that have lots of memory, without
degrading performance by having too much memory reserved for dirhash when
other things need it. The default value for dirhash_maxmem is being kept at
2MB for now, though.

This work was mostly done during the 2008 Google Summer of Code.

Approved by:	dwmalone (mentor), re
MFC after:	3 months
2009-06-03 09:44:22 +00:00
Pawel Jakub Dawidek
195ebc7e9e Where if not in examples we should follow style(9)? 2009-06-03 09:28:58 +00:00
Pawel Jakub Dawidek
bf64a6b6b4 lchflags(2) takes int, not u_long like chflags(2) and fchflags(2).
Strange, isn't it?

Pointed out by:	bde
2009-06-03 09:24:58 +00:00
Pawel Jakub Dawidek
2b2dc3a904 Correct comment. 2009-06-03 09:23:31 +00:00
Robert Watson
15141acc67 By default, label all network interfaces as biba/equal on attach. This
makes it easier for first-time users to configure and work with biba as
remote acess is still allowed.  Effectively, this means that, by default,
only local security properties, not distributed ones, are enforced.

Obtained from:	TrustedBSD Project
2009-06-03 08:49:44 +00:00
Ed Schouten
b492f2899f Use ISO C99 style inline semantics in msun.
Because we use ISO C99 nowadays, we can just get rid of enforcing
GNU89-style inlining.
2009-06-03 08:16:34 +00:00
Weongyo Jeong
38812f8ee6 calls callout_drain(9) to un-schedule a scan timer to prevent a page
fault in softclock.

Submitted by:	sam
Reviewed by:	jhb, sam (original version), thompsa
2009-06-03 04:10:22 +00:00
Robert Watson
5f51fb4871 Mark MAC Framework sx and rm locks as NOWITNESS to suppress warnings that
might arise from WITNESS not understanding its locking protocol, which
should be deadlock-free.  Currently these warnings generally don't occur,
but as object locking is pushed into policies for some object types, they
would otherwise occur more often.

Obtained from:	TrustedBSD Project
2009-06-02 22:22:09 +00:00
Rick Macklem
f0a011a1b1 Add support for the experimental nfs subsystem to the scripts in
/etc/rc.d. They use the following new rc variables:
  nfsv4_server_enable - set to "YES" to run the experimental server
  nfsuserd_enable - set to "YES" to run nfsuserd for NFSv4 client and
    server
  nfsuserd_flags - command line flags for nfsuserd
  nfscbd_enable - set to "YES" to run the experimental nfs client's
    NFSv4 callback daemon
  nfscbd_flags - command line flags for nfscbd

Reviewed by:	dougb
Approved by:	kib (mentor)
2009-06-02 22:15:47 +00:00