kib [Mon, 4 Jan 2010 15:40:17 +0000 (15:40 +0000)]
Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions,
so we better follow too (older glibc used old BSDish alphasort prototype
and corresponding type of the comparision function for scandir). While
there, change the definitions of the functions to ANSI C and fix several
style issues nearby.
Remove requirement for "sys/types.h" include for functions from manpage.
POSIX also requires that alphasort(3) sorts as if strcoll(3) was used,
but leave the strcmp(3) call in the function for now.
Adapt in-tree callers of scandir(3) to new declaration. The fact that
select_sections() from catman(1) could modify supplied struct dirent is
a bug.
obrien [Mon, 4 Jan 2010 10:50:17 +0000 (10:50 +0000)]
Committed the wrong version in r201484. This time really fix the "-t"
functionality. Per the regression tests (pgrep-t.t & pkill-t.t), "-t"
should accept "v1", which means a plain number should be accepted for
UNIX98-style PTY's.
obrien [Mon, 4 Jan 2010 10:37:07 +0000 (10:37 +0000)]
Fix the "-t" functionality. Per the regression tests (pgrep-t.t & pkill-t.t),
"-t" should accept "v1", which means a plain number should be accepted for
UNIX98-style PTY's.
davidxu [Mon, 4 Jan 2010 05:27:49 +0000 (05:27 +0000)]
Add user-level semaphore synchronous type, this change allows multiple
processes to share semaphore by using shared memory area, in simplest case,
only one atomic operation is needed in userland, waiter flag is maintained by
kernel and userland only checks the flag, if the flag is set, user code enters
kernel and does a wakeup() call.
Move type definitions into file _umtx.h to minimize compiling time.
Also type names need to be prefixed with underline character, this would reduce
name conflict (still in progress).
obrien [Mon, 4 Jan 2010 00:49:04 +0000 (00:49 +0000)]
Report lines that ought to contain a ':' operator but start with a '.'
as "Unknown directive" sinze they are more likely to be .elseif (etc).
(NetBSD PR 37222).
yongari [Sun, 3 Jan 2010 21:49:24 +0000 (21:49 +0000)]
Fix regression introduced in r198318. BCM5754/BCM5754M uses the
same ASIC ID of BCM5758 such that r198318 incorecctly enabled TSO
on BCM5754.BCM5754M controllers. BCM5754/BCM5754M needs a special
firmware to enable TSO and bge(4) does not support firmware based
TSO.
rmacklem [Sun, 3 Jan 2010 20:08:10 +0000 (20:08 +0000)]
The test for "same client" for the experimental nfs server over NFSv4
was broken w.r.t. byte range lock conflicts when it was the same client
and the request used the open_to_lock_owner4 case, since lckstp->ls_clp
was not set. This patch fixes it by using "clp" instead of "lckstp->ls_clp".
rmacklem [Sun, 3 Jan 2010 18:27:10 +0000 (18:27 +0000)]
Fix three related problems in the experimental nfs client when
checking for conflicts w.r.t. byte range locks for NFSv4.
1 - Return 0 instead of EACCES when a conflict is found, for F_GETLK.
2 - Check for "same file" when checking for a conflict.
3 - Don't check for a conflict for the F_UNLCK case.
marius [Sun, 3 Jan 2010 02:58:43 +0000 (02:58 +0000)]
Exclude options COMPAT_FREEBSD4 now that the MD freebsd4_sigreturn()
is gone since r201396 and which is also in line with the fact that
FreeBSD 4 didn't supported sparc64.
marius [Sat, 2 Jan 2010 15:44:16 +0000 (15:44 +0000)]
- Demapping unused kernel TLB slots has proven to work reliably so move
the associated debugging under bootverbose.
- Remove freebsd4_sigreturn(); given that FreeBSD 4 didn't supported
sparc64 this only ever served as a transition aid prior to FreeBSD
5.0 and is unused by default since COMPAT_FREEBSD4 was removed from
GENERIC in r143072 nearly 5 years ago.
marius [Sat, 2 Jan 2010 15:19:33 +0000 (15:19 +0000)]
- Preserve the PROM IOMMU in order to allow OFW drivers to continue to
work.
- Sanity check the parameters passed to the implementations of the
pcib_{read,write}_config() methods. Using illegal values can cause
no real harm but it doesn't hurt to avoid unnecessary data error
traps requiring to flush and re-enable the level 1 caches.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
Just like bin/ and sbin/, I think setting WARNS to the highest value
possible will make it more attractive for people to fix warnings.
- The WARNS variable is set in the Makefile in the directory of the
application itself, making it more likely that it will be removed out
of curiosity to see what happens.
- New applications will most likely build with WARNS=6 out of the box,
because the author would more likely fix the warnings during
development than lower WARNS.
Unfortunately almost all apps in libexec require a lowered value of
WARNS.
dougb [Fri, 1 Jan 2010 22:10:07 +0000 (22:10 +0000)]
s/named_confidr/named_confdir/ in the rndc.key check. The line in
the command to create it was right, but the check was wrong, so it
was getting created every time. Mea culpa.
obrien [Fri, 1 Jan 2010 20:55:11 +0000 (20:55 +0000)]
Quiet variable "shadows" warning:
sys/vmmeter.h: warning: shadowed declaration is here
machine/cpufunc.h: In function 'insw':
machine/cpufunc.h: warning: declaration of 'cnt' shadows a global declaration
..snip..
dougb [Fri, 1 Jan 2010 19:09:40 +0000 (19:09 +0000)]
With the introduction of named_conf the -c example in named_flags
is no longer necessary or desirable. Update the comment to indicate
that _flags should be used for options other than -u and -c.
dougb [Fri, 1 Jan 2010 19:06:00 +0000 (19:06 +0000)]
The script hard-coded the assumption that the "configuration directory"
would be "/etc/namedb" in a number of places. Since the user may make
a different choice, introduce a new internal variable, named_confdir
that is generated relative to the location of $named_conf.
While this will work for some things (especially a highly customized
build from ISC source) there are still a number of places where
/etc/namedb is assumed that it is not easily virtualized (E.g., mtree).
If you deviate from the defaults you'd better know what you're doing. :)
jilles [Fri, 1 Jan 2010 18:17:46 +0000 (18:17 +0000)]
sh: Fix some bugs with backquoted builtins:
- correctly handle error output in $(builtin 2>&1), clarify out1/out2 vs
output/errout in the code
- treat all builtins as regular builtins so errors do not abort the shell
and variable assignments do not persist
- respect the caller's INTOFF
Some bugs still exist:
- expansion errors may still abort the shell
- some side effects of expansions and builtins persist
kib [Thu, 31 Dec 2009 18:52:58 +0000 (18:52 +0000)]
Allow swap out of the kernel stack for the thread with priority greater
or equial then PSOCK, not less or equial. Higher priority has lesser
numerical value.
Existing test does not allow for swapout of the thread waiting for
advisory lock, for exiting child or sleeping for timeout. On the other
hand, high-priority waiters of VFS/VM events can be swapped out.
rmacklem [Thu, 31 Dec 2009 18:02:48 +0000 (18:02 +0000)]
Fix the experimental NFS client so that it can create Unix
domain sockets on an NFSv4 mount point. It was generating
incorrect XDR in the request for this case.