]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agostyle(9) fixes.
scf [Tue, 11 Nov 2008 00:32:55 +0000 (00:32 +0000)]
style(9) fixes.

MFC after: 1 week

15 years agoMake ispfw(4) play nice with individual firmware modules.
jkim [Tue, 11 Nov 2008 00:14:10 +0000 (00:14 +0000)]
Make ispfw(4) play nice with individual firmware modules.

- Do not let individual KLD module unregister firmware image loaded by ispfw
or vice versa.
- Make 'kldunload ispfw' actually unregister all firmware images loaded by
ispfw, not just 'isp_1040'.
- Print which KLD module actually loaded the firmware image.
- Remove unused return value from do_load_fw() and do_unload_fw() and remove
duplicate sys/param.h while I am here.

15 years agoSigh. Fix a pointer/int compile error.
peter [Mon, 10 Nov 2008 23:36:20 +0000 (23:36 +0000)]
Sigh.  Fix a pointer/int compile error.

15 years agoFix a signal emulation bug introduced in r163018 (and present in 7.x).
peter [Mon, 10 Nov 2008 23:26:52 +0000 (23:26 +0000)]
Fix a signal emulation bug introduced in r163018 (and present in 7.x).
This prevents 32 bit signal handlers from finding out what the faulting
address is.  Both the secret 4th argument and siginfo->si_addr are zero.

15 years agoAdd missing USB_BUS_LOCK* change from r184824.
thompsa [Mon, 10 Nov 2008 23:18:10 +0000 (23:18 +0000)]
Add missing USB_BUS_LOCK* change from r184824.

15 years agoWrap sx locking of the audit worker sleep lock in macros, update comments.
rwatson [Mon, 10 Nov 2008 22:06:24 +0000 (22:06 +0000)]
Wrap sx locking of the audit worker sleep lock in macros, update comments.

MFC after: 2 months
Sponsored by: Apple, Inc.

15 years agoConvert the two main locking areas into macros to make it clear on what we are
thompsa [Mon, 10 Nov 2008 20:54:31 +0000 (20:54 +0000)]
Convert the two main locking areas into macros to make it clear on what we are
grabbing and why. These are now:

 USB_BUS_LOCK/USB_BUS_UNLOCK
 USB_XFER_LOCK/USB_XFER_UNLOCK

Reviewed by: alfred

15 years agoMake usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 clean
matteo [Mon, 10 Nov 2008 06:35:30 +0000 (06:35 +0000)]
Make usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 clean

Tested with: make universe

MFC after: 3 days

15 years agoInclude more detailed explanation of this case, since it's pretty
kientzle [Mon, 10 Nov 2008 05:24:13 +0000 (05:24 +0000)]
Include more detailed explanation of this case, since it's pretty
subtle why it comes out the way it does.  Once you realize that it
depends on the archiving order, it's also important to realize that
filesystem differences aren't going to break this case.  (Some of the
other tests have had to be extensively rewritten to make them
independent of the order in which a particular filesystem returns file
entries.)

(This commit also serves to note the PR number that I accidentally
omitted from the previous commit.)

PR: bin/128562
MFC after: 30 days

15 years agoTest --strip-components and fix it to actually work. Jaakko did a
kientzle [Mon, 10 Nov 2008 05:04:55 +0000 (05:04 +0000)]
Test --strip-components and fix it to actually work.  Jaakko did a
good job writing this test; it exercises a lot of subtle cases.  The
trickiest one is that a hardlink to something that didn't get
extracted should not itself be extracted.  In some sense, this is not
the desired behavior (we'd rather restore the file), but it's the best
you can do in a single-pass restore of a tar archive.

The test here should be extended to exercise cpio and newc formats as
well, since their hardlink models are different, which will lead to
different handling of some of these edge cases.

Submitted by: Jaakko Heinonen
MFC after: 30 days

15 years agoImprove on 184781 - instead of ignoring the file when the only difference
sobomax [Sun, 9 Nov 2008 23:44:32 +0000 (23:44 +0000)]
Improve on 184781 - instead of ignoring the file when the only difference
is CVS Id, replace the old one with the new one automatically. While I
don't see much difference, some people think it's somehow better that way.

15 years ago- Separate PMC class dependent code from other kinds of machine
jkoshy [Sun, 9 Nov 2008 17:37:54 +0000 (17:37 +0000)]
- Separate PMC class dependent code from other kinds of machine
  dependencies.  A 'struct pmc_classdep' structure describes operations
  on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep'
  structures depending on the CPU in question.

  Inside PMC class dependent code, row indices are relative to the
  PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates
  global row indices before invoking class dependent operations.

- Augment the OP_GETCPUINFO request with the number of PMCs present
  in a PMC class.

- Move code common to Intel CPUs to file "hwpmc_intel.c".

- Move TSC handling to file "hwpmc_tsc.c".

15 years agoStyle tweak.
jkoshy [Sun, 9 Nov 2008 17:07:52 +0000 (17:07 +0000)]
Style tweak.

15 years agoFor consistency work on the local object passed into the function for the
bz [Sun, 9 Nov 2008 14:06:44 +0000 (14:06 +0000)]
For consistency work on the local object passed into the function for the
lock operation instead using the global name.

Submitted by: ganbold
MFC after: 2 months

15 years agoRegenerate system call tables for r184789.
ed [Sun, 9 Nov 2008 10:48:06 +0000 (10:48 +0000)]
Regenerate system call tables for r184789.

15 years agoMark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.
ed [Sun, 9 Nov 2008 10:45:13 +0000 (10:45 +0000)]
Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.

Looking at our source code history, it seems the uname(),
getdomainname() and setdomainname() system calls got deprecated
somewhere after FreeBSD 1.1, but they have never been phased out
properly. Because we don't have a COMPAT_FREEBSD1, just use
COMPAT_FREEBSD4.

Also fix the Linuxolator to build without the setdomainname() routine by
just making it call userland_sysctl on kern.domainname. Also replace the
setdomainname()'s implementation to use this approach, because we're
duplicating code with sysctl_domainname().

I wasn't able to keep these three routines working in our
COMPAT_FREEBSD32, because that would require yet another keyword for
syscalls.master (COMPAT4+NOPROTO). Because this routine is probably
unused already, this won't be a problem in practice. If it turns out to
be a problem, we'll just restore this functionality.

Reviewed by: rdivacky, kib

15 years agoRevert to previous revision.
matteo [Sun, 9 Nov 2008 09:01:09 +0000 (09:01 +0000)]
Revert to previous revision.
I should not commit anything at 3.50 AM.
In addition to danfe's comments, I got others.
I'll work on a better version of the patch.

15 years ago- Document the changed meaning of a '*' argument to option "-c".
jkoshy [Sun, 9 Nov 2008 08:39:52 +0000 (08:39 +0000)]
- Document the changed meaning of a '*' argument to option "-c".
- Tweak grammar.

15 years agoChange the meaning of a "*" argument to option -c to mean 'all
jkoshy [Sun, 9 Nov 2008 08:36:35 +0000 (08:36 +0000)]
Change the meaning of a "*" argument to option -c to mean 'all
unhalted CPUs', instead of 'all CPUs'.  This change brings
pmccontrol(8) in line with pmcstat(8).

15 years agoIgnore files that only differ in CVS Id tag.
sobomax [Sun, 9 Nov 2008 07:58:23 +0000 (07:58 +0000)]
Ignore files that only differ in CVS Id tag.

MFC after: 2 weeks

15 years agoDon't leave files in /var/cront/tabs when interrupted
matteo [Sun, 9 Nov 2008 07:34:11 +0000 (07:34 +0000)]
Don't leave files in /var/cront/tabs when interrupted

PR: 17363
MFC after: 3 days

15 years agoBe paranoid and use snprintf
matteo [Sun, 9 Nov 2008 06:44:53 +0000 (06:44 +0000)]
Be paranoid and use snprintf

PR: bin/122137
Submitted by: Steven Kreuzer <skreuzer@exit2shell.com>
MFC after: 3 days

15 years agomake kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al.
kmacy [Sun, 9 Nov 2008 01:53:06 +0000 (01:53 +0000)]
make kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al.
initialize pkthdr in field order

15 years agoAdd workaround for a back reference when no corresponding
hrs [Sun, 9 Nov 2008 01:10:21 +0000 (01:10 +0000)]
Add workaround for a back reference when no corresponding
parenthesized subexpression is defined.  For example, the
following command line caused unexpected behavior like
segmentation fault:

 % echo test | sed -e 's/test/\1/'

PR: bin/126682
MFC after: 1 week

15 years agoReduce the default baud rate of PTY's to 9600.
ed [Sat, 8 Nov 2008 20:40:39 +0000 (20:40 +0000)]
Reduce the default baud rate of PTY's to 9600.

On RELENG_6 (and probably RELENG_7) we see our syscons windows and
pseudo-terminals have the following buffer sizes:

| LINE RAW CAN OUT IHIWT ILOWT OHWT LWT     COL STATE  SESS      PGID DISC
| ttyv0  0   0   0  7680  6720 2052 256       7 OCcl       1146  1146 term
| ttyp0  0   0   0  7680  6720 1296 256       0 OCc       82033 82033 term

These buffer sizes make no sense, because we often have much more output
than input, but I guess having higher input buffer sizes improves
guarantees of the system.

On MPSAFE TTY I just sent both the input and output buffer sizes to 7
KB, which is pretty big on a standard FreeBSD install with 8 syscons
windows and some PTY's. Reduce the baud rate to 9600 baud, which means
we now have the following buffer sizes:

|  LINE   INQ  CAN  LIN  LOW  OUTQ  USE  LOW   COL  SESS  PGID STATE
| ttyv0  1920    0    0  192  1984    0  199     7  2401  2401 Oil
| pts/0  1920    0    0  192  1984    0  199  5631  1305  2526 Oi

This is a lot smaller, but for pseudo-devices this should be good
enough. You need to do a lot of punching to fill up a 7.5 KB input
buffer. If it turns out things don't work out this way, we'll just
switch to 19200 baud.

15 years agoRequire write access on a directory being moved from one parent
trasz [Sat, 8 Nov 2008 19:56:32 +0000 (19:56 +0000)]
Require write access on a directory being moved from one parent
directory to another in ZFS.

Approved by: rwatson (mentor), pjd

15 years agoSpell 'different' correctly.
keramida [Sat, 8 Nov 2008 17:45:47 +0000 (17:45 +0000)]
Spell 'different' correctly.

15 years agoDon't use curthread to resolve file descriptor. Request may be queued, so
mav [Sat, 8 Nov 2008 06:25:57 +0000 (06:25 +0000)]
Don't use curthread to resolve file descriptor. Request may be queued, so
thread will be different. Instead require sender to send process ID
together with file descriptor.

15 years agoNew command-line parser for bsdtar.
kientzle [Sat, 8 Nov 2008 04:43:24 +0000 (04:43 +0000)]
New command-line parser for bsdtar.

This replaces the getopt()/getopt_long() wrapper, the old-style
argument rewriter and the associated configuration glue with a more
straightforward custom command parser.  In particular, this ensures
that bsdtar will have consistent option parsing on every platform,
regardless of whether the platform supports getopt_long().

MFC after: 30 days

15 years agoAssign new cookie to the node to reflect API change.
mav [Sat, 8 Nov 2008 02:05:41 +0000 (02:05 +0000)]
Assign new cookie to the node to reflect API change.
All applications will have to be adapted and rebuilt.

15 years agoUpdate ports number and size of Ports Collection.
blackend [Fri, 7 Nov 2008 22:01:31 +0000 (22:01 +0000)]
Update ports number and size of Ports Collection.

15 years agoDon't assign completely meaningless name to the node on creation.
mav [Fri, 7 Nov 2008 19:51:07 +0000 (19:51 +0000)]
Don't assign completely meaningless name to the node on creation.
As soon as node is created from the netgraph side now, it can be found
without using this. Allow application to assign whatever name it want later.

15 years agoTwo minor fixes.
mav [Fri, 7 Nov 2008 17:55:09 +0000 (17:55 +0000)]
Two minor fixes.

15 years agoAdd one more EACCES clause to rename.2.
trasz [Fri, 7 Nov 2008 15:01:40 +0000 (15:01 +0000)]
Add one more EACCES clause to rename.2.

Approved by: rwatson (mentor)

15 years agoMake test for write access to the directory being moved a little more
trasz [Fri, 7 Nov 2008 14:46:46 +0000 (14:46 +0000)]
Make test for write access to the directory being moved a little more
specific.

Approved by: rwatson (mentor)

15 years agoImprove output when a test fails.
trasz [Fri, 7 Nov 2008 14:45:42 +0000 (14:45 +0000)]
Improve output when a test fails.

Approved by: rwatson (mentor)

15 years agoRange-check NFSv2 procedure numbers before converting to NFSv3.
dfr [Fri, 7 Nov 2008 10:43:01 +0000 (10:43 +0000)]
Range-check NFSv2 procedure numbers before converting to NFSv3.

Submitted by: csjp

15 years agoRemove informational messages left. These messages were intended to
yongari [Fri, 7 Nov 2008 07:02:28 +0000 (07:02 +0000)]
Remove informational messages left. These messages were intended to
show up in verbose boot mode.

Reported by: pluknet ( pluknet<> gmail DOT com )

15 years agoRestore (intmax_t) casts I lost during the last change & unbreak the build.
mlaier [Thu, 6 Nov 2008 23:55:28 +0000 (23:55 +0000)]
Restore (intmax_t) casts I lost during the last change & unbreak the build.

15 years agoBackoff the last patch. It was overly restrictive - we want to check
trasz [Thu, 6 Nov 2008 22:28:04 +0000 (22:28 +0000)]
Backoff the last patch.  It was overly restrictive - we want to check
for write permission on target only when moving the target between two
directories.

Approved by: rwatson (mentor)

15 years agoA lot of spelling fixes.
mav [Thu, 6 Nov 2008 21:47:02 +0000 (21:47 +0000)]
A lot of spelling fixes.

Submitted by: keramida

15 years agoChange ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
trasz [Thu, 6 Nov 2008 19:17:58 +0000 (19:17 +0000)]
Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
from one parent directory to another, in addition to the usual access checks
one also needs write access to the subdirectory being moved.

Approved by:    rwatson (mentor), pjd

15 years agoBring in http://perforce.freebsd.org/chv.cgi?CH=152584 from hps.
imp [Thu, 6 Nov 2008 17:26:12 +0000 (17:26 +0000)]
Bring in http://perforce.freebsd.org/chv.cgi?CH=152584 from hps.

Submitted by: hps

15 years agoFix copyright notice.
marcel [Thu, 6 Nov 2008 17:00:19 +0000 (17:00 +0000)]
Fix copyright notice.

15 years agoFix a panic caused by a corrupted table when the header is
marcel [Thu, 6 Nov 2008 16:51:33 +0000 (16:51 +0000)]
Fix a panic caused by a corrupted table when the header is
still valid. We were checking the state of the header and
not the table.

PR: 119868
Based on a patch from: Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 1 week

15 years agoAdd two new options to du(1):
mlaier [Thu, 6 Nov 2008 16:30:38 +0000 (16:30 +0000)]
Add two new options to du(1):
     -A      Display the apparent size instead of the disk usage.  This can be
             helpful when operating on compressed volumes or sparse files.

     -B blocksize
             Calculate block counts in blocksize byte blocks.  This is differ-
             ent from the -k, -m options or setting BLOCKSIZE and gives an
             estimate of how much space the examined file hierachy would
             require on a filesystem with the given blocksize.  Unless in -A
             mode, blocksize is rounded up to the next multiple of 512.

The former is similar to GNU's du(1) --apparent-size.  The latter is
different from what GNU's du(1) -B does, which is equivalent to setting
BLOCKSIZE in our implementation and is rather pointless as it doesn't add
any real value (i.e. you can achieve the same with a simple awk-script).

No change in the normal output or processing.

Reviewed by: keramida@, Peter French
Otherwise silience from: freebsd-hackers@

15 years agoEliminate dead declarations in libstand.
raj [Thu, 6 Nov 2008 16:30:32 +0000 (16:30 +0000)]
Eliminate dead declarations in libstand.

15 years agoFix typo and while here another one.
bz [Thu, 6 Nov 2008 16:30:20 +0000 (16:30 +0000)]
Fix typo and while here another one.

Reviewed by: keramida
Reported by: keramida
MFC after: 2 months (with r184720)

15 years agoARM pmap style(9) and cosmetics.
raj [Thu, 6 Nov 2008 16:28:28 +0000 (16:28 +0000)]
ARM pmap style(9) and cosmetics.

15 years agoAuto-size kernel page tables allocation on Marvell systems.
raj [Thu, 6 Nov 2008 16:25:12 +0000 (16:25 +0000)]
Auto-size kernel page tables allocation on Marvell systems.

This allows mini dumps to fully work for these platforms.

Obtained from: Juniper Networks, Semihalf

15 years agoSupport kernel crash mini dumps on ARM architecture.
raj [Thu, 6 Nov 2008 16:20:27 +0000 (16:20 +0000)]
Support kernel crash mini dumps on ARM architecture.

Obtained from: Juniper Networks, Semihalf

15 years agoInclude if_arp.h for IFP2AC so that the netgraph parts in if.c
bz [Thu, 6 Nov 2008 15:26:09 +0000 (15:26 +0000)]
Include if_arp.h for IFP2AC so that the netgraph parts in if.c
are happy even if compiled without INET or INET6.

MFC after: 2 months

15 years agoFix a bug introduced with r182851 splitting tcp_mss() into
bz [Thu, 6 Nov 2008 13:25:59 +0000 (13:25 +0000)]
Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

Move the TSO logic back to tcp_mss() and out of tcp_mss_update().
We tried to avoid that initially but if were are called from
tcp_output() with EMSGSIZE, we cleared the TSO flag on the tcpcb
there, called into tcp_mtudisc() and tcp_mss_update() which
then would reenable TSO on the tcpcb based on TSO capabilities
of the interface as learnt in tcp_maxmtu/6().
So if TSO was enabled on the (possibly new) outgoing interface
it was turned back on, which lead to an endless loop between
tcp_output() and tcp_mtudisc() until we overflew the stack.

Reported by: kmacy
MFC after: 2 months (along with r182851)

15 years agoAdopt the comment for tcp_maxmtu(); we are returning a number
bz [Thu, 6 Nov 2008 12:59:00 +0000 (12:59 +0000)]
Adopt the comment for tcp_maxmtu(); we are returning a number
not a pointer. While here update the rest of the comment to
better match what we have these days.

MFC after: 2 months

15 years agoFix a bug introduced with r182851 splitting tcp_mss() into
bz [Thu, 6 Nov 2008 12:33:33 +0000 (12:33 +0000)]
Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

In case we return early and got a metricptr to pass the hostcache
info back to the caller we need to initialize the data to a defined
state (zero it) as tcp_hc_get() would do if there was no hit.
Without that the caller would check on random stack garbage which
could lead to undefined results.

This only affected tcp_mss() if there was no routing entry for the peer,
tcp_mtudisc() was not affected.

MFC after: 2 months (along with r182851)

15 years agoDon't depend on krpc.ko in the NFS_LEGACYRPC case.
dfr [Thu, 6 Nov 2008 11:43:49 +0000 (11:43 +0000)]
Don't depend on krpc.ko in the NFS_LEGACYRPC case.

15 years agoHide AF_INET specific ioctl handling under #ifdef INET.
bz [Thu, 6 Nov 2008 11:11:25 +0000 (11:11 +0000)]
Hide AF_INET specific ioctl handling under #ifdef INET.

MFC after: 2 months

15 years agoHide AF_INET specific ioctl handling under #ifdef INET.
bz [Thu, 6 Nov 2008 11:00:57 +0000 (11:00 +0000)]
Hide AF_INET specific ioctl handling under #ifdef INET.

MFC after: 2 months

15 years agoUnbreak NFS.
des [Thu, 6 Nov 2008 10:53:35 +0000 (10:53 +0000)]
Unbreak NFS.

Pointy hat to: dfr

15 years agoFor now our LRO code (tcp_lro.c) only supports IPv4 properly thus
bz [Thu, 6 Nov 2008 10:35:46 +0000 (10:35 +0000)]
For now our LRO code (tcp_lro.c) only supports IPv4 properly thus
only enable if INET is on.

Reviewed by: kmacy
MFC after: 2 months

15 years agoHide AF_INET specific ioctl handling under #ifdef INET.
bz [Thu, 6 Nov 2008 10:17:57 +0000 (10:17 +0000)]
Hide AF_INET specific ioctl handling under #ifdef INET.

Reviewed by: kmacy
MFC after: 2 months

15 years agoHide an unused variable in case we compile with neither INET nor INET6.
bz [Thu, 6 Nov 2008 09:41:31 +0000 (09:41 +0000)]
Hide an unused variable in case we compile with neither INET nor INET6.
NATM needs 'struct in_addr' to compile, which is a problem on its own
but include in.h for now if we have NATM but neither INET or INET6.

MFC after: 2 months

15 years agoCheck for INET not AF_INET in #ifdef. Makes it compile without INET.
bz [Thu, 6 Nov 2008 09:27:47 +0000 (09:27 +0000)]
Check for INET not AF_INET in #ifdef. Makes it compile without INET.

MFC after: 2 months

15 years agoHide an unused variable in case we compile without INET.
bz [Thu, 6 Nov 2008 09:18:29 +0000 (09:18 +0000)]
Hide an unused variable in case we compile without INET.
Include ethernet.h and if_arp.h directly so that the constants are
always defined.
Makes token compile without INET.

MFC after: 2 months

15 years agoHide an unused variable in case we compile without INET.
bz [Thu, 6 Nov 2008 09:07:56 +0000 (09:07 +0000)]
Hide an unused variable in case we compile without INET.
Include ethernet.h directly so that the constants are always defined.
Makes fddi compile without INET.

MFC after: 2 months

15 years agoIn case INET is not defined, then ANCACHE is not defined and
bz [Thu, 6 Nov 2008 08:55:46 +0000 (08:55 +0000)]
In case INET is not defined, then ANCACHE is not defined and
the sc does not have 'an_have_rssimap' variable.
Add an ANCACHE check to poperly hide the case and make an(4)
compile without INET.

MFC after: 2 months

15 years agoBe paranoid and zero out passwd
matteo [Thu, 6 Nov 2008 04:53:02 +0000 (04:53 +0000)]
Be paranoid and zero out passwd

PR: 122070
Submitted by: Steven Kreuzer <skreuzer@exit2shell.com>
Reminded by:    gnn@
MFC after: 3 days

15 years agoRemove definition of KMEM_DEBUG accidentally brought in by latest DTrace
rodrigc [Wed, 5 Nov 2008 20:32:13 +0000 (20:32 +0000)]
Remove definition of KMEM_DEBUG accidentally brought in by latest DTrace
import.

Noticed by: thompsa

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:40:36 +0000 (19:40 +0000)]
Merge latest DTrace changes from Perforce.

Approved by: jb

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:39:37 +0000 (19:39 +0000)]
Merge latest DTrace changes from Perforce.

Approved by: jb

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:39:11 +0000 (19:39 +0000)]
Merge latest DTrace changes from Perforce.

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:35:43 +0000 (19:35 +0000)]
Merge latest DTrace changes from Perforce.
Update libproc API to reflect new changes.

Approved by: jb

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:35:09 +0000 (19:35 +0000)]
Merge latest DTrace changes from Perforce.

Approved by: jb

15 years agoImprove driver operation example description.
mav [Wed, 5 Nov 2008 17:12:18 +0000 (17:12 +0000)]
Improve driver operation example description.

15 years agoIf mountd doesn't specify a secflavor list for the mount, assume that -sec=sys
dfr [Wed, 5 Nov 2008 16:25:26 +0000 (16:25 +0000)]
If mountd doesn't specify a secflavor list for the mount, assume that -sec=sys
is what was wanted.

15 years agoDon't return a NULL mbuf from xdrmbuf_getall.
dfr [Wed, 5 Nov 2008 16:24:31 +0000 (16:24 +0000)]
Don't return a NULL mbuf from xdrmbuf_getall.

15 years agoutf-8
des [Wed, 5 Nov 2008 15:08:09 +0000 (15:08 +0000)]
utf-8

MFC after: 3 weeks

15 years agoMissing email address
des [Wed, 5 Nov 2008 15:07:42 +0000 (15:07 +0000)]
Missing email address

MFC after: 3 weeks

15 years agoReintroduce the snp(4) driver.
ed [Wed, 5 Nov 2008 15:04:03 +0000 (15:04 +0000)]
Reintroduce the snp(4) driver.

Because the TTY hooks interface was not finished when I imported the
MPSAFE TTY layer, I had to disconnect the snp(4) driver. This snp(4)
implementation has been sitting in my P4 branch for some time now.
Unfortunately it still doesn't use the same error handling as snp(4)
(returning codes through FIONREAD), but it should already be usable.

I'm committing this to SVN, hoping someone else could polish off its
rough edges. It's always better than having a broken driver sitting in
the tree.

15 years agoLike many other functions that handle sockaddrs, realhostname_sa() takes a
des [Wed, 5 Nov 2008 12:13:10 +0000 (12:13 +0000)]
Like many other functions that handle sockaddrs, realhostname_sa() takes a
struct sockaddr * that it casts internally to the appropriate type based on
sa_family.  However, struct sockaddr has very lax alignment requirements,
which causes the compiler to complain when you cast a struct sockaddr * to,
say, a struct sockaddr_in6 *.

I find it reasonable to assume that the pointer we received is in fact
correctly aligned.  Therefore, we can work around the compiler warnings by
casting to void * before casting to the desired type.  For readability's
sake, this is done with macros.

The same technique should prove useful in other parts of the tree that
deal with socket addresses.

MFC after: 3 weeks

15 years agoMake compile without INET.
bz [Wed, 5 Nov 2008 12:02:25 +0000 (12:02 +0000)]
Make compile without INET.

The change is modelled after the way it was done for (without) INET6.

MFC after: 2 months

15 years agoHide the IPv4 init function if the kernel is compiled without INET.
bz [Wed, 5 Nov 2008 11:54:56 +0000 (11:54 +0000)]
Hide the IPv4 init function if the kernel is compiled without INET.
It is not used in that case and would not compile.

15 years agoMake compile without INET.
bz [Wed, 5 Nov 2008 11:43:01 +0000 (11:43 +0000)]
Make compile without INET.

MFC after: 2 months

15 years agoMake tun(4) compile without INET.
bz [Wed, 5 Nov 2008 11:39:46 +0000 (11:39 +0000)]
Make tun(4) compile without INET.

MFC after: 2 months

15 years agoDo only define the variable if either INET or INET6 is defined.
bz [Wed, 5 Nov 2008 11:37:26 +0000 (11:37 +0000)]
Do only define the variable if either INET or INET6 is defined.

To prevent it from compiling without INET and INET6 we should put
an explicit #error in there like we have in other files,
but not rely on an unused variable.

MFC after: 2 months

15 years agoComment out WARNS. There are too many alignment issues in libutil.
des [Wed, 5 Nov 2008 11:06:10 +0000 (11:06 +0000)]
Comment out WARNS.  There are too many alignment issues in libutil.

15 years agoDisconnect gr_util.c from the build. It isn't documented or used anywhere
des [Wed, 5 Nov 2008 10:45:39 +0000 (10:45 +0000)]
Disconnect gr_util.c from the build.  It isn't documented or used anywhere
in the tree, and due to unsafe pointer arithmetic, it will most likely crash
on architectures with strict alignment requirements.

15 years agoAdd defaults for /etc/rc.d/gssd
keramida [Wed, 5 Nov 2008 10:20:33 +0000 (10:20 +0000)]
Add defaults for /etc/rc.d/gssd

Approved by: dfr

15 years agoTiny typo fix and remove 'example' from a "real" manpage.
keramida [Wed, 5 Nov 2008 09:42:05 +0000 (09:42 +0000)]
Tiny typo fix and remove 'example' from a "real" manpage.

15 years agoo One more s/gpt/gpart/.
maxim [Wed, 5 Nov 2008 09:28:30 +0000 (09:28 +0000)]
o One more s/gpt/gpart/.

15 years agoo Replace Xr to gpt(8) which is gone by gpart(8).
maxim [Wed, 5 Nov 2008 09:27:13 +0000 (09:27 +0000)]
o Replace Xr to gpt(8) which is gone by gpart(8).

15 years agoWhen comparing, cast to the larger size, off_t in this case.
kientzle [Wed, 5 Nov 2008 06:40:53 +0000 (06:40 +0000)]
When comparing, cast to the larger size, off_t in this case.
Once we know which one is smaller, then we cast to the smaller size.

Thanks to Xin Li (delphij@)
Pointy hat: /me

15 years agoFix compile warnings building on amd64. This is modified slightly
kientzle [Wed, 5 Nov 2008 05:26:11 +0000 (05:26 +0000)]
Fix compile warnings building on amd64.  This is modified slightly
from Jaakko's original patch: I have misgivings about the portability
of the 'z' printf modifier so opted to cast the arguments to (int)
instead.

PR: bin/128561
Submitted by: Jaakko Heinonen
MFC after: 30 days

15 years agoRevert rev 184216 and 184199, due to the way the thread_lock works,
davidxu [Wed, 5 Nov 2008 03:01:23 +0000 (03:01 +0000)]
Revert rev 184216 and 184199, due to the way the thread_lock works,
it may cause a lockup.

Noticed by: peter, jhb

15 years agoCorrect a typo that prevented my laptop from starting
delphij [Tue, 4 Nov 2008 23:03:36 +0000 (23:03 +0000)]
Correct a typo that prevented my laptop from starting
devd.

15 years agoUse shared vnode locks for auditing vnode arguments as auditing only
jhb [Tue, 4 Nov 2008 22:31:04 +0000 (22:31 +0000)]
Use shared vnode locks for auditing vnode arguments as auditing only
does a VOP_GETATTR() which does not require an exclusive lock.

Reviewed by: csjp, rwatson

15 years agoDon't lock the vnode around calls to vn_fullpath().
jhb [Tue, 4 Nov 2008 22:30:24 +0000 (22:30 +0000)]
Don't lock the vnode around calls to vn_fullpath().

Reviewed by: csjp, rwatson

15 years agoEven though the previous commit was functionally equivalent with the code it replaced...
rink [Tue, 4 Nov 2008 20:57:39 +0000 (20:57 +0000)]
Even though the previous commit was functionally equivalent with the code it replaced, it was wrong: le16toh should have been used.

Note that these changes will not make the driver work on powerpc, but it should fix at least the i386/amd64 cases.

Obtained from: //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#20
Noticed by: jeli, ed

15 years agoFix the build (on at least powerpc) by moving the htole16() from the case(x) expressi...
rink [Tue, 4 Nov 2008 19:28:19 +0000 (19:28 +0000)]
Fix the build (on at least powerpc) by moving the htole16() from the case(x) expression directly to the switch(x) itself.

Reviewed by: imp@

15 years agoDeclare functions and variables static and save a few byte. This is a
mlaier [Tue, 4 Nov 2008 19:23:48 +0000 (19:23 +0000)]
Declare functions and variables static and save a few byte.  This is a
style(9)-change, too.  Separate commit as it changes the object.