]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMake this slightly less yelly about regions that the hypervisor protects
nwhitehorn [Mon, 20 Jun 2011 01:43:18 +0000 (01:43 +0000)]
Make this slightly less yelly about regions that the hypervisor protects
from us by not registering them as disks.

13 years agoAdd an OHCI driver to complement the EHCI one. The infrastructure to attach
nwhitehorn [Mon, 20 Jun 2011 00:46:07 +0000 (00:46 +0000)]
Add an OHCI driver to complement the EHCI one. The infrastructure to attach
both to the parent ps3bus was in r223313. This driver itself comes from the
ps3 project branch.

13 years agoDriver for PS3's internal hard disk. Hopefully this can be CAM-ified in
nwhitehorn [Mon, 20 Jun 2011 00:17:44 +0000 (00:17 +0000)]
Driver for PS3's internal hard disk. Hopefully this can be CAM-ified in
the future, but presents a set of simple block devices for now. With
(forthcoming) boot loader support or vfs.root.mountfrom, allows booting
PS3s from disk.

Submitted by: glevand <geoffrey.levand@mail.ru>

13 years agoFix a number of places where the new NFS server did not
rmacklem [Sun, 19 Jun 2011 23:54:01 +0000 (23:54 +0000)]
Fix a number of places where the new NFS server did not
lock the mutex when manipulating rc_flag in the DRC cache.
This is believed to fix a hung server that was reported
to the freebsd-fs@ list on June 9 under the subject heading
"New NFS server stress test hang", where all the threads
were waiting for the RC_LOCKED flag to clear.

Tested by: jwd at slowblink.com
MFC after: 2 weeks

13 years agoBlah, forgot to svn add the actual script from r223310
dougb [Sun, 19 Jun 2011 22:59:54 +0000 (22:59 +0000)]
Blah, forgot to svn add the actual script from r223310

13 years agoAdd the netwait rc.d script. It waits for the specified period for the
dougb [Sun, 19 Jun 2011 22:48:40 +0000 (22:48 +0000)]
Add the netwait rc.d script. It waits for the specified period for the
network to become active.

PR: conf/151063
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>

13 years agoFix the kgssapi so that it can be loaded as a module. Currently
rmacklem [Sun, 19 Jun 2011 22:08:55 +0000 (22:08 +0000)]
Fix the kgssapi so that it can be loaded as a module. Currently
the NFS subsystems use five of the rpcsec_gss/kgssapi entry points,
but since it was not obvious which others might be useful, all
nineteen were included. Basically the nineteen entry points are
set in a structure called rpc_gss_entries and inline functions
defined in sys/rpc/rpcsec_gss.h check for the entry points being
non-NULL and then call them. A default value is returned otherwise.
Requested by rwatson.

Reviewed by: jhb
MFC after: 2 weeks

13 years agoCopy lukemftp to its new home, tnftp. I'm doing this in stages so as to
gavin [Sun, 19 Jun 2011 21:50:38 +0000 (21:50 +0000)]
Copy lukemftp to its new home, tnftp.  I'm doing this in stages so as to
not confuse the CVS exporter.

13 years agoPrecisely document the synchronization rules for the page's dirty field.
alc [Sun, 19 Jun 2011 19:13:24 +0000 (19:13 +0000)]
Precisely document the synchronization rules for the page's dirty field.
(Saying that the lock on the object that the page belongs to must be held
only represents one aspect of the rules.)

Eliminate the use of the page queues lock for atomically performing read-
modify-write operations on the dirty field when the underlying architecture
supports atomic operations on char and short types.

Document the fact that 32KB pages aren't really supported.

Reviewed by: attilio, kib

13 years agoAdd support for using mtree(5) manifest files to define the image
marcel [Sun, 19 Jun 2011 18:34:49 +0000 (18:34 +0000)]
Add support for using mtree(5) manifest files to define the image
to be created. The support is based on mtree version 2.0, as used
in libarchive, but adds new features on top of it.

The current implementation is fully functional, but is envisioned
to grow at least the following additional features over time:
o   Add support for the /include special command so that manifest
    files can be constructed using includable fragments.
o   Add support specifying a search path to locate content files.
o   Content file filters: commands that provide file contents on
    stdout.

The manifest file eliminates the need to first construct a tree
as root in order to create an image and allows images (releases)
to be created directly from object trees and/or source trees.

Reviewed by: deo
Sponsored by: Juniper Networks, Inc

13 years agoVendor import of tnftp-20100108.
gavin [Sun, 19 Jun 2011 17:36:02 +0000 (17:36 +0000)]
Vendor import of tnftp-20100108.

13 years agoIn the libm access macros for the double type, z can sometimes
kargl [Sun, 19 Jun 2011 17:07:58 +0000 (17:07 +0000)]
In the libm access macros for the double type, z can sometimes
be used uninitialized.  This can lead to spurious exceptions
and bit clobbering.

Submitted by: bde
Approved by: das (mentor)

13 years agoBootstrap lukemftp vendor area
gavin [Sun, 19 Jun 2011 16:54:06 +0000 (16:54 +0000)]
Bootstrap lukemftp vendor area

13 years agorc.subr: Make sure all functions are under if [ -z "${_rc_subr_loaded}" ].
jilles [Sun, 19 Jun 2011 15:23:32 +0000 (15:23 +0000)]
rc.subr: Make sure all functions are under if [ -z "${_rc_subr_loaded}" ].

13 years agoPut a quick bandaid on internal citrus locking.
kan [Sun, 19 Jun 2011 13:35:46 +0000 (13:35 +0000)]
Put a quick bandaid on internal citrus locking.

The code is not quite right still, but it programs from deadlocking
on themselves if one enables new citrus code by mistake.

13 years agoMinimize backward seeks when trying to load ELF relocatable modules.
kan [Sun, 19 Jun 2011 13:35:41 +0000 (13:35 +0000)]
Minimize backward seeks when trying to load ELF relocatable modules.

Some of loader filesystems are very ill equipped to handle seeking
backwards within the file. Namely, tftp requires trasfer to be
restarted from the start of the file every time we go backwards.

13 years agoDo not set thread name to less than informative 'initial thread'.
kan [Sun, 19 Jun 2011 13:35:36 +0000 (13:35 +0000)]
Do not set thread name to less than informative 'initial thread'.

13 years agoDo not use #warning to warn about missing implementation of dt_popc(),
simon [Sun, 19 Jun 2011 12:52:50 +0000 (12:52 +0000)]
Do not use #warning to warn about missing implementation of dt_popc(),
but just have a comment that this is broken.

This is just a bandaid until somebody can fix this correctly.  The code
is just a broken as it was before r223262 - now buildworld just doesn't
fail.

Tested by: i386 + amd64 buildworld
With hat: benl co-mentor

13 years agorc.subr: Eliminate a fork from check_kern_features, like r223227.
jilles [Sun, 19 Jun 2011 11:42:48 +0000 (11:42 +0000)]
rc.subr: Eliminate a fork from check_kern_features, like r223227.

MFC after: 2 weeks

13 years agoDon't #undef curses ERR in dialog.h. Otherwise, the macro will be
jh [Sun, 19 Jun 2011 08:53:16 +0000 (08:53 +0000)]
Don't #undef curses ERR in dialog.h. Otherwise, the macro will be
unavailable if curses.h is included before dialog.h.

PR: bin/156601
Obtained from: Thomas E. Dickey (upstream maintainer)
Discussed with: nwhitehorn

13 years agoAdd new USB ID to UDAV driver.
hselasky [Sun, 19 Jun 2011 08:34:10 +0000 (08:34 +0000)]
Add new USB ID to UDAV driver.

Submitted by: Luiz Gustavo S. Costa <lgcosta@pfsense.org>
MFC after: 7 days

13 years agosh: Add test for r223282.
jilles [Sun, 19 Jun 2011 00:00:36 +0000 (00:00 +0000)]
sh: Add test for r223282.

13 years agosh: Remove special support for background simple commands.
jilles [Sat, 18 Jun 2011 23:58:59 +0000 (23:58 +0000)]
sh: Remove special support for background simple commands.

It expands the arguments in the parent shell process, which is incorrect.

13 years agosh: Add do-nothing -h option.
jilles [Sat, 18 Jun 2011 23:43:28 +0000 (23:43 +0000)]
sh: Add do-nothing -h option.

POSIX requires a -h option to sh and set, to locate and remember utilities
invoked by functions as they are defined. Given that this
locate-and-remember process is optional elsewhere, it seems safe enough to
make this option do nothing.

POSIX does not specify a long name for this option. Follow ksh in calling it
"trackall".

13 years agoAdd DTrace support to the new NFS client. This is essentially
rmacklem [Sat, 18 Jun 2011 23:02:53 +0000 (23:02 +0000)]
Add DTrace support to the new NFS client. This is essentially
cloned from the old NFS client, plus additions for NFSv4. A
review of this code is in progress, however it was felt by the
reviewer that it could go in now, before code slush. Any changes
required by the review can be committed as bug fixes later.

13 years agolibprocstat: For MAP_PRIVATE, do not consider the file open for writing.
jilles [Sat, 18 Jun 2011 23:01:26 +0000 (23:01 +0000)]
libprocstat: For MAP_PRIVATE, do not consider the file open for writing.

If a file is mapped with with MAP_PRIVATE, no write permission is required
and changes do not end up in the file. Therefore, tools like fuser and fstat
should not show the file as open for writing.

The protection as displayed by procstat -v still includes write in this
case, and shows 'C' for copy-on-write.

13 years agoCorrect subcommand name 'unset' -> 'unscript'.
pjd [Sat, 18 Jun 2011 22:32:55 +0000 (22:32 +0000)]
Correct subcommand name 'unset' -> 'unscript'.

13 years agoFix a typo in adagetattr() from r223089. In particular, this restores
kib [Sat, 18 Jun 2011 22:26:58 +0000 (22:26 +0000)]
Fix a typo in adagetattr() from r223089. In particular, this restores
the ability to use ahci(4) for kernel dumps.

13 years agolibprocstat: Fix typo in error messages.
jilles [Sat, 18 Jun 2011 22:16:55 +0000 (22:16 +0000)]
libprocstat: Fix typo in error messages.

13 years agofuser: Fix skipping "SIG" on signal names (-s).
jilles [Sat, 18 Jun 2011 21:53:36 +0000 (21:53 +0000)]
fuser: Fix skipping "SIG" on signal names (-s).

The code did  !strncasecmp(str, "sig", 4)  which is not useful.

Also change "sig" to "SIG" matching the uppercase signal names as of
r218285. This has little effect because fuser does not enable locale.

13 years agolibprocstat: Remove spaces between function name and open parenthesis.
jilles [Sat, 18 Jun 2011 21:46:11 +0000 (21:46 +0000)]
libprocstat: Remove spaces between function name and open parenthesis.

13 years agolibprocstat: Correct format for size_t (should be %zu, not %zd).
jilles [Sat, 18 Jun 2011 21:29:25 +0000 (21:29 +0000)]
libprocstat: Correct format for size_t (should be %zu, not %zd).

13 years agoFixed dereference of a NULL pointer.
mckusick [Sat, 18 Jun 2011 21:10:03 +0000 (21:10 +0000)]
Fixed dereference of a NULL pointer.

Reported by: Peter Holm

13 years agoAdd 'show logstate' to usage().
bz [Sat, 18 Jun 2011 21:08:27 +0000 (21:08 +0000)]
Add 'show logstate' to usage().

MFC after: 1 week

13 years agoAdd rc.d/kld to load kernel modules after local disks are up.
dougb [Sat, 18 Jun 2011 19:41:05 +0000 (19:41 +0000)]
Add rc.d/kld to load kernel modules after local disks are up.
This method is many times faster than doing it in /boot/loader.conf.

13 years agoFix clang warnings.
benl [Sat, 18 Jun 2011 13:56:33 +0000 (13:56 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoRemove a these days incorrect comment left from before new-arp.
bz [Sat, 18 Jun 2011 13:54:36 +0000 (13:54 +0000)]
Remove a these days incorrect comment left from before new-arp.

MFC after: 1 week

13 years agoInstall symlinks for m_tag_* mbuf tag functions to the mbuf_tags.9 man page.
bz [Sat, 18 Jun 2011 13:08:46 +0000 (13:08 +0000)]
Install symlinks for m_tag_* mbuf tag functions to the mbuf_tags.9 man page.

MFC after: 1 week

13 years agoCorrect a typo in the function name.
bz [Sat, 18 Jun 2011 13:03:06 +0000 (13:03 +0000)]
Correct a typo in the function name.

MFC after: 1 week

13 years agoFix vfork. Add comments.
kib [Sat, 18 Jun 2011 12:13:28 +0000 (12:13 +0000)]
Fix vfork. Add comments.

13 years ago- As with stray vector interrupts limit the reporting of stray level
marius [Sat, 18 Jun 2011 11:27:44 +0000 (11:27 +0000)]
- As with stray vector interrupts limit the reporting of stray level
  interrupts. Bringup on additional machine models repeatedly reveals
  firmware that enables interrupts behind our back, causing the console
  to be flooded otherwise.
- As with the regular interrupt counters using uint16_t instead of
  u_long for counting the stray vector interrupts should be more than
  sufficient.
- Cache the interrupt vector in intr_stray_vector().

13 years agoMerge from r161730:
marius [Sat, 18 Jun 2011 11:07:09 +0000 (11:07 +0000)]
Merge from r161730:
o  Set TP using inline assembly to avoid dead code elimination.
o  Eliminate _tcb.

Merge from r161840:
Stylize: avoid using a global register variable.

Merge from r157461:
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.

Merge from r177853:
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.

MFC after: 1 week

13 years agorc.subr: Eliminate about 100 forks from the boot sequence.
jilles [Sat, 18 Jun 2011 11:05:30 +0000 (11:05 +0000)]
rc.subr: Eliminate about 100 forks from the boot sequence.

With the current sh, placing eval in a command substitution always results
in a fork(), even if it is the only command and only executes a single
simple command. Therefore, avoid it where it can be avoided easily.

Side effect: values starting with a hyphen and all whitespace are preserved.
The values are defaults and names for rc.conf variables and messages to be
given about obsolete ones.

MFC after: 2 weeks

13 years agoAdd an entry for r221407 forgotten in said revision.
marius [Sat, 18 Jun 2011 10:48:00 +0000 (10:48 +0000)]
Add an entry for r221407 forgotten in said revision.

13 years agoDocument the latest changes to sctp_opt_info() in the code.
tuexen [Sat, 18 Jun 2011 10:36:05 +0000 (10:36 +0000)]
Document the latest changes to sctp_opt_info() in the code.
This makes sctp_opt_info() compiliant with the latest version
of the socket API ID.

13 years agoAdd a missing ',' to separate arguments lost for r222465 only found in
bz [Sat, 18 Jun 2011 09:46:39 +0000 (09:46 +0000)]
Add a missing ',' to separate arguments lost for r222465 only found in
case a complete world is built without INET support.

MFC after: 10 days
X-MFC with: 222465

13 years agogre(4) was using a field in the softc to detect possible recursion.
bz [Sat, 18 Jun 2011 09:34:03 +0000 (09:34 +0000)]
gre(4) was using a field in the softc to detect possible recursion.
On MP systems this is not a usable solution anymore and could easily
lead to false positives triggering enough logging that even  using
the console was no longer usable (multiple parallel ping -f can do).

Switch to the suggested solution of using mbuf tags to carry per
packet state between gre_output() invocations.  Contrary to the
proposed solution modelled after gif(4) only allocate one mbuf tag
per packet rather than per packet and per gre_output() pass through.

As the sysctl to control the possible valid (gre in gre) nestings does
no sanity checks, make sure to always allocate space in the mbuf tag
for at least one, and at most 255 possible gre interfaces to detect
loops in addition to the counter.

Submitted by: Cristian KLEIN (cristi net.utcluj.ro) (original version)
PR: kern/114714
Reviewed by: Cristian KLEIN (cristi net.utcluj.ro)
Reviewed bu: Wooseog Choi (ben_choi hotmail.com)
Sponsored by: Sandvine Incorporated
MFC after: 1 week

13 years agoLet the size of the namebuf depend on the size of the ut_user field.
ed [Sat, 18 Jun 2011 07:47:15 +0000 (07:47 +0000)]
Let the size of the namebuf depend on the size of the ut_user field.

13 years agoMore expeirmentation suggests that 10ms isn't as reliable as
imp [Sat, 18 Jun 2011 03:16:51 +0000 (03:16 +0000)]
More expeirmentation suggests that 10ms isn't as reliable as
previously thought, but 100ms seems to be.  Likely there's a good
middle ground, but for now be conservative.

13 years agoAfter we get a good power signal, always wait about 10ms before
imp [Sat, 18 Jun 2011 02:25:08 +0000 (02:25 +0000)]
After we get a good power signal, always wait about 10ms before
proceeding.

On boot, some laptops with certain cards in them sometimes fail on
boot, but if the card is inserted after boot it works.  Experiments
show that small delays here makes things more reliable.  It is
believed that some combinations need a little more time before the
power on the card is really stable enough to be reliable once the
power is stable in the bridge.

13 years agoNote how wait(3) is implemented.
obrien [Sat, 18 Jun 2011 00:53:51 +0000 (00:53 +0000)]
Note how wait(3) is implemented.

13 years agoSync with OpenBSD, primarily make the code easier to read, and a license
delphij [Sat, 18 Jun 2011 00:33:34 +0000 (00:33 +0000)]
Sync with OpenBSD, primarily make the code easier to read, and a license
change to standard OpenBSD ISC license.

Obtained from: OpenBSD
MFC after: 2 weeks

13 years agoSync with OpenBSD (zap rcsid).
delphij [Sat, 18 Jun 2011 00:29:10 +0000 (00:29 +0000)]
Sync with OpenBSD (zap rcsid).

MFC after: 2 weeks

13 years agoThe flags argument of mpool_get() is meaningful, document it.
delphij [Sat, 18 Jun 2011 00:10:21 +0000 (00:10 +0000)]
The flags argument of mpool_get() is meaningful, document it.

MFC after: 2 weeks

13 years agoAdd comment from CSRG rev 7.27 (1992/06/23 19:56:55; author: mckusick)
obrien [Fri, 17 Jun 2011 21:44:13 +0000 (21:44 +0000)]
Add comment from CSRG rev 7.27 (1992/06/23 19:56:55; author: mckusick)

13 years agoTeach the compiler how to shift TSC value efficiently. As noted in r220631,
jkim [Fri, 17 Jun 2011 21:41:06 +0000 (21:41 +0000)]
Teach the compiler how to shift TSC value efficiently.  As noted in r220631,
some times compiler inserts redundant instructions to preserve unused upper
32 bits even when it is casted to a 32-bit value.  Unfortunately, it seems
the problem becomes more serious when it is shifted, especially on amd64.

13 years agoRegenerate src.conf.5.
ed [Fri, 17 Jun 2011 21:31:13 +0000 (21:31 +0000)]
Regenerate src.conf.5.

13 years agoAdd WITHOUT_UTMPX switch to the build system.
ed [Fri, 17 Jun 2011 21:30:21 +0000 (21:30 +0000)]
Add WITHOUT_UTMPX switch to the build system.

This knob removes the tools that are exclusively used to view and
maintain the databases maintained by utmpx, namely last, users, who,
wtmpcvt, ac, lastlogin and utxrm.

The tool w is not in this list, because it has some other functionality
which is unrelated to utmpx; it is hardlinked to the uptime tool.

13 years agoDon't remove the periodic script for ac(8) when setting WITHOUT_ACCT.
ed [Fri, 17 Jun 2011 21:20:41 +0000 (21:20 +0000)]
Don't remove the periodic script for ac(8) when setting WITHOUT_ACCT.

13 years agoDon't create a device_t object or parse current resources (via _CRS) for
jhb [Fri, 17 Jun 2011 21:19:01 +0000 (21:19 +0000)]
Don't create a device_t object or parse current resources (via _CRS) for
ACPI Device() objects that do not have any device IDs available via the
_HID or _CID methods.  Without a device ID a device driver cannot attach
to the device anyway.  Namespace objects that are devices but not of
type ACPI_TYPE_DEVICE are not affected.

A few BIOSes have also attached a _CRS method to a PCI device to
allocate resources that are not managed via a BAR.  With the previous
code those resources are allocated from acpi0 directly which can interfere
with the new PCI-PCI bridge driver (since the PCI device in question may
be behind a bridge and its resources should be allocated from that
bridge's windows instead).  The resources were also orphaned and
and would end up associated with some other random device whose device_t
reused the pointer of the original ACPI-enumerated device (after it was
free'd by the ACPI PCI bus driver) in devinfo output which was confusing.
If we want to handle _CRS on PCI devices we can adjust the ACPI PCI bus
driver to do that in the future and associate the resources with the
proper device object respecting PCI-PCI bridges, etc.

Note that with this change the ACPI PCI bus driver no longer has to
delete ACPI-enumerated device_t devices that mirror PCI devices since
they should in general not exist.  There are rare cases when a BIOS
will give a PCI device a _HID (e.g. I've seen a PCI-ISA bridge given
a _HID for a system resource device).  In that case we leave both the
ACPI and PCI-enumerated device_t objects around just as in the previous
code.

13 years agoposix_spawn(3): Document r222511 (trying to close already closed fd).
jilles [Fri, 17 Jun 2011 21:16:27 +0000 (21:16 +0000)]
posix_spawn(3): Document r222511 (trying to close already closed fd).

MFC after: 1 week

13 years agoUpdate manpage.
ed [Fri, 17 Jun 2011 20:49:30 +0000 (20:49 +0000)]
Update manpage.

13 years agoDon't omit ac(8) as part of WITHOUT_ACCT.
ed [Fri, 17 Jun 2011 20:47:44 +0000 (20:47 +0000)]
Don't omit ac(8) as part of WITHOUT_ACCT.

The WITHOUT_ACCT switch is supposed to omit tools related to process
accounting, namely accton and sa. ac(8) is just a simple tool that
prints statistics based on data in the utx.log database. It has nothing
to do with the former.

13 years ago- Use a dedicated task to handle deferred transmits from the if_transmit
jhb [Fri, 17 Jun 2011 20:06:52 +0000 (20:06 +0000)]
- Use a dedicated task to handle deferred transmits from the if_transmit
  method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing.
- Don't define igb_start() at all on 8.0 and where if_transmit is used.
  Replace last remaining call to igb_start() with a loop to kick off
  transmit on each queue instead.
- Call ether_ifdetach() earlier in igb_detach().
- Drain tasks and free taskqueues during igb_detach().

Reviewed by: jfv
MFC after: 1 week

13 years agoOpen the floppy disk device with O_RDONLY rather than O_RDWR. After
joerg [Fri, 17 Jun 2011 18:56:51 +0000 (18:56 +0000)]
Open the floppy disk device with O_RDONLY rather than O_RDWR.  After
all, this is the fd*read* command, and thus should be able to read
even write-protected disks.

MFC after: 1 week

13 years agosh: Add case statement fallthrough (with ';&' instead of ';;').
jilles [Fri, 17 Jun 2011 13:03:49 +0000 (13:03 +0000)]
sh: Add case statement fallthrough (with ';&' instead of ';;').

Replacing ;; with the new control operator ;& will cause the next list to be
executed as well without checking its pattern, continuing until a list ends
with ;; or until the end of the case statement. This is like omitting
"break" in a C "switch" statement.

The sequence ;& was formerly invalid.

This feature is proposed for the next POSIX issue in Austin Group issue
#449.

13 years ago- Fix my braino in the 220835, when I used strtok(). It isn't
glebius [Fri, 17 Jun 2011 12:12:52 +0000 (12:12 +0000)]
- Fix my braino in the 220835, when I used strtok(). It isn't
  applicable here, since modifies the string. Switch to strchr().
- Restore support for undocumented optional parameters of
  redir_port and redir_proto, that were disabled in 220835.
- While here, change !isalpha() checks on optinal parameters
  for isdigit().

Submitted by: Alexander V. Chernikov <melifaro ipfw.ru>
PR: kern/143653

13 years agosh: Skip variables with invalid names in "set", "export -p", "readonly -p".
jilles [Fri, 17 Jun 2011 10:21:24 +0000 (10:21 +0000)]
sh: Skip variables with invalid names in "set", "export -p", "readonly -p".

This ensures the output of these commands is valid shell input.

13 years agoReturn empty cmdline/environ string for processes with kernel address
pluknet [Fri, 17 Jun 2011 07:30:56 +0000 (07:30 +0000)]
Return empty cmdline/environ string for processes with kernel address
space. This is consistent with the behavior in linux.

PR: kern/157871
Reported by: Petr Salinger <Petr Salinger att seznam cz>
Verified on: GNU/kFreeBSD debian 8.2-1-amd64 (by reporter)
Reviewed by: kib (some time ago)
MFC after: 2 weeks

13 years agoIn HAST we use two sockets - one for only sending the data and one for
trociny [Fri, 17 Jun 2011 07:07:26 +0000 (07:07 +0000)]
In HAST we use two sockets - one for only sending the data and one for
only receiving the data. In r220271 the unused directions were
disabled using shutdown(2).

Unfortunately, this broke automatic receive buffer sizing, which
currently works only for connections in ETASBLISHED state. It was a
root cause of the issue reported by users, when connection between
primary and secondary could get stuck.

Disable the code introduced in r220271 until the issue with automatic
buffer sizing is not resolved.

Reported by: Daniel Kalchev <daniel@digsys.bg>, danger, sobomax
Tested by: Daniel Kalchev <daniel@digsys.bg>, danger
Approved by: pjd (mentor)
MFC after: 1 week

13 years agoAdd SCTP_MAX_BURST support to sctp_opt_info().
tuexen [Fri, 17 Jun 2011 07:06:42 +0000 (07:06 +0000)]
Add SCTP_MAX_BURST support to sctp_opt_info().
This only applies to 9.0 and higher, since the type
of the values has changed since we introduced it.
So it can't be MFCed.

13 years agoUpdate the list of supported socket options for sctp_opt_info().
tuexen [Fri, 17 Jun 2011 07:03:42 +0000 (07:03 +0000)]
Update the list of supported socket options for sctp_opt_info().

MFC after: 1 month.

13 years agoAdd 2-clause BSD license.
netchild [Fri, 17 Jun 2011 06:12:28 +0000 (06:12 +0000)]
Add 2-clause BSD license.

Approved by: David Kirchner <dpk@dpk.net> (initial author)
Requested by: Otto Moerbeek <otto@drijf.net>
MFC after: 1 week

13 years agoImprove on style(9)
marcel [Fri, 17 Jun 2011 05:30:12 +0000 (05:30 +0000)]
Improve on style(9)

13 years agoProperly serialize the global shootdown with the instruction
marcel [Fri, 17 Jun 2011 04:26:03 +0000 (04:26 +0000)]
Properly serialize the global shootdown with the instruction
stream of the local processor. Also explicitly invalidate
the ALAT. This is done on the other CPUs in the coherence
domain by virtue of the ptc.ga instruction, but does not
apply to the local CPU.

13 years agoDrop the include of <ufs/ffs/ffs_extern.h> from usr.sbin/makefs/ffs/ffs_bswap.c
mckusick [Thu, 16 Jun 2011 23:40:10 +0000 (23:40 +0000)]
Drop the include of <ufs/ffs/ffs_extern.h> from usr.sbin/makefs/ffs/ffs_bswap.c
and usr.sbin/makefs/ffs/ffs_subr.c as they have no need of anything in that
file.  No other programs or libraries include <ufs/ffs/ffs_extern.h> (nor
should they as it is totally in-kernel interfaces). For added protection
I enclosed the entire contents of <ufs/ffs/ffs_extern.h> in ifdef _KERNEL.

Feedback from: Bruce Evans and Tai-hwa Liang

13 years agoRegen.
kib [Thu, 16 Jun 2011 22:06:35 +0000 (22:06 +0000)]
Regen.

13 years agoImplement compat32 for old lseek, for the a.out binaries on amd64.
kib [Thu, 16 Jun 2011 22:05:56 +0000 (22:05 +0000)]
Implement compat32 for old lseek, for the a.out binaries on amd64.

13 years agoDo not trash the argv[0] pointer for an a.out process on amd64.
kib [Thu, 16 Jun 2011 22:00:59 +0000 (22:00 +0000)]
Do not trash the argv[0] pointer for an a.out process on amd64.

Found with the binary provided by joerg.

13 years agoFix silly typo that resulted in the a.out process stack to end at
kib [Thu, 16 Jun 2011 21:59:16 +0000 (21:59 +0000)]
Fix silly typo that resulted in the a.out process stack to end at
~200MB instead of 3GB on amd64.

13 years agosh: Reduce unnecessary forks with eval.
jilles [Thu, 16 Jun 2011 21:50:28 +0000 (21:50 +0000)]
sh: Reduce unnecessary forks with eval.

The eval special builtin now runs the code with EV_EXIT if it was run
with EV_EXIT itself.

In particular, this eliminates one fork when a command substitution contains
an eval command that ends with an external program or a subshell.

This is similar to what r220978 did for functions.

13 years agoAdd SCTP_DEFAULT_PRINFO socket option.
tuexen [Thu, 16 Jun 2011 21:12:36 +0000 (21:12 +0000)]
Add SCTP_DEFAULT_PRINFO socket option.
Fix the SCTP_DEFAULT_SNDINFO socket option: Don't clear the
PR SCTP policy when setting sinfo_flags.

MFC after: 1 month.

13 years agoFix some wording and grammar in the BUGS section.
bcr [Thu, 16 Jun 2011 19:57:07 +0000 (19:57 +0000)]
Fix some wording and grammar in the BUGS section.

PR:             docs/157901
Submitted by:   Niclas Zeising (niclas dot zeising at gmail dot com)
Reviewed by:    mav
MFC after:      3 days

13 years agoAdd "alignment" param to the request before calling gpart_autofill().
ae [Thu, 16 Jun 2011 19:42:03 +0000 (19:42 +0000)]
Add "alignment" param to the request before calling gpart_autofill().

13 years agoSetting warnings without make universe considered harmful. Revert to WARNS=0
imp [Thu, 16 Jun 2011 18:00:27 +0000 (18:00 +0000)]
Setting warnings without make universe considered harmful.  Revert to WARNS=0
until such time that the warnings at =2 are fixed for all platforms.

13 years agoEven if the loaded module has no symbols, we still need to notify
marcel [Thu, 16 Jun 2011 17:41:21 +0000 (17:41 +0000)]
Even if the loaded module has no symbols, we still need to notify
MD code about it and update the link map for GDB's use.

13 years agoFix two typos and remove redundant code.
tuexen [Thu, 16 Jun 2011 17:30:50 +0000 (17:30 +0000)]
Fix two typos and remove redundant code.

MFC after: 1 month.

13 years agoAdd Digitizer-related usage IDs from HUTRR30 and HUTRR34.
mav [Thu, 16 Jun 2011 15:53:14 +0000 (15:53 +0000)]
Add Digitizer-related usage IDs from HUTRR30 and HUTRR34.

13 years ago* Fix the handling of addresses in sctp_sendv().
tuexen [Thu, 16 Jun 2011 15:36:09 +0000 (15:36 +0000)]
* Fix the handling of addresses in sctp_sendv().
* Add support for SCTP_SENDV_NOINFO.
* Improve the error handling of sctp_sendv() and sctp_recv().

MFC after: 1 month

13 years agoUsing the correct format string(%zu) for size_t type. This should fix 64
avatar [Thu, 16 Jun 2011 15:35:12 +0000 (15:35 +0000)]
Using the correct format string(%zu) for size_t type.  This should fix 64
bits builds.

Submitted by: Garrett Cooper <yanegomi@gmail.com>

13 years agoIt's a bit odd, but "make update" in src/ can also update the ports/,
ru [Thu, 16 Jun 2011 12:28:37 +0000 (12:28 +0000)]
It's a bit odd, but "make update" in src/ can also update the ports/,
doc/, and now www/ trees, but only using the "cvsup" transport.

When "make update" is run using a tree's makefile, it can also use
"cvs" (except for www/) and "svn" (only src/).

Clean up documentation and code regarding "make update":

- Increase oddness by adding support for WWWSUPFILE and NO_WWWUPDATE to
  Makefile.inc1 (analogous to PORTSSUPFILE/NO_PORTSUPDATE and
  DOCSUPFILE/NO_DOCUPDATE; WWWSUPFILE already supported by www/Makefile).

- Document all trees that support CVS_UPDATE.

- Document all trees that support SUP_UPDATE.

- Document SVN_UPDATE.

- Document NO_WWWUPDATE.

- make.conf(5) mistakenly said that *SUPFILE* had defaults.

- Add an example entry for WWWSUPFILE.

13 years agoChange i_len in ieee80211req to be unsigned and fix other signed/unsigned
kevlo [Thu, 16 Jun 2011 09:37:20 +0000 (09:37 +0000)]
Change i_len in ieee80211req to be unsigned and fix other signed/unsigned
issues.

Reviewed by: bschmidt
Obtained from: NetBSD

13 years agoRevert r222688.
sobomax [Thu, 16 Jun 2011 08:31:06 +0000 (08:31 +0000)]
Revert r222688.

Requested by: Mikolaj Golub

13 years agoUnbreaking build on sparc64.
avatar [Thu, 16 Jun 2011 07:14:55 +0000 (07:14 +0000)]
Unbreaking build on sparc64.

Submitted by: Garrett Cooper <yanegomi@gmail.com>

13 years agoFixing compilation bustage by introducing another forward declaration.
avatar [Thu, 16 Jun 2011 05:26:03 +0000 (05:26 +0000)]
Fixing compilation bustage by introducing another forward declaration.

13 years agoClarify that the TFTP blocksize (RFC2348) or non-standard
rodrigc [Thu, 16 Jun 2011 02:27:05 +0000 (02:27 +0000)]
Clarify that the TFTP blocksize (RFC2348) or non-standard
TFTP rollover option can be used to transfer larger files.

13 years agoUse size of int to fetch sysctl kern.sched.cpusetsize because it had
davidxu [Thu, 16 Jun 2011 02:22:24 +0000 (02:22 +0000)]
Use size of int to fetch sysctl kern.sched.cpusetsize because it had
switched from long to int type in kernel.

Fixed by: pluknet

13 years agoSpecify correct RFC2347 for TFTP options in diagnostic message.
rodrigc [Thu, 16 Jun 2011 02:16:53 +0000 (02:16 +0000)]
Specify correct RFC2347 for TFTP options in diagnostic message.

13 years agoMake the bootonly CD smaller by discarding static libraries that are not
nwhitehorn [Wed, 15 Jun 2011 23:56:40 +0000 (23:56 +0000)]
Make the bootonly CD smaller by discarding static libraries that are not
useful without a toolchain.

13 years agoAdd support for the newly added SCTP API.
tuexen [Wed, 15 Jun 2011 23:50:27 +0000 (23:50 +0000)]
Add support for the newly added SCTP API.
In particular add support for:
* SCTP_SNDINFO, SCTP_PRINFO, SCTP_AUTHINFO, SCTP_DSTADDRV4, and
  SCTP_DSTADDRV6 cmsgs.
* SCTP_NXTINFO and SCTP_RCVINFO cmgs.
* SCTP_EVENT, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO and SCTP_DEFAULT_SNDINFO
  socket option.
* Special association ids (SCTP_FUTURE_ASSOC, ...)
* sctp_recvv() and sctp_sendv() functions.

MFC after: 1 month.