tjr [Thu, 19 Dec 2002 01:13:23 +0000 (01:13 +0000)]
pathconf() and acl_get_file() follow links so they cannot be used to
determine whether a symlink has an ACL. Instead, assume that symbolic
links don't have ACLs and don't bother checking. Avoids spurious
ENOENT warnings when listing directories containing broken symlinks
on filesystems with ACLs enabled.
mux [Wed, 18 Dec 2002 23:16:22 +0000 (23:16 +0000)]
Fix bug with 3c90xB cards and newer. We weren't trying to
copy the mbuf chain into an mbuf cluster when there is
more than 63 mbufs in the chain. We were trying with older
cards though.
rwatson [Wed, 18 Dec 2002 21:05:15 +0000 (21:05 +0000)]
Improve handling of symlink targets when listing MAC labels: don't
do the wrong thing when the symlink doesn't have a target, by
considering !f_label in the construction of ch_options.
fanf [Wed, 18 Dec 2002 20:50:44 +0000 (20:50 +0000)]
Sync with up-stream version, including a number of bug-fixes:
* The partial-evaluation of #elif sequences was broken and the
spaghetti logic of its implementation was too hard to understand.
I've re-done it using a straight-forward table-driven push-down
automaton.
* The pre-processor line parser did not allow for all of the weird
places that people might put comments, which could have caused it
to add syntax-errors to the output by removing a #if line containing
the start- or end-marker of a comment.
* The lexer didn't need to special-case the handling of string-literals
or character-constants, but it did need to learn about line-continuations
(backslash-newline).
* The input routine was buggy and bit-rotten and trivially replacable
with fgets(). I've also made the program static- and const-safe and
improved the presentation-order. The formatting of the state-transition
tables remains non-stylish.
This commit-messsage was brought to you by code-point 45.
mike [Wed, 18 Dec 2002 18:22:06 +0000 (18:22 +0000)]
o Add new types: msgqnum_t and msglen_t.
o Add typedefs for pid_t, time_t, size_t and ssize_t.
o Hide struct mymsg and msgsys() in the standards case.
o Add some comments about conformance bugs.
o Sort prototypes.
mike [Wed, 18 Dec 2002 16:53:31 +0000 (16:53 +0000)]
Rearrange strerror() so that its itoa procedure can be used with
strerror_r(). Doing this allows us to ensure that strerror_r() always
fills the supplied buffer regardless of EINVAL or ERANGE errors.
strerror()'s semantics have changed slightly such that an argument of
0 is now considered invalid and errno is set to EINVAL.
Remove internal regression test for strerror() and strerror_r(). This
will be reincarnated in src/tools/regression/lib/libc/string.
In strerror(3), add a comment about strerror()'s bogus return type.
rwatson [Wed, 18 Dec 2002 15:34:17 +0000 (15:34 +0000)]
Under some circumstances, the loopback interface will allocate a new
mbuf for a packet looping back to provide alignment guarantees for
KAME. Unfortunately, this code performs a direct copy of the header
rather than using a header copying primitive (largely because we have
sucky header copying primitives). This results in a multiple free
of the MAC label in the header when the same label data is freed
twice when the two mbufs with that header are freed. As a temporary
work-around, clear the initialized flag on the label to prevent the
duplicate free, which prevents panics on large unaligned loopback
IP and IPv6 data. The real fix is to improve and make use of proper
packet header copying routines here.
johan [Wed, 18 Dec 2002 11:50:28 +0000 (11:50 +0000)]
Remove undocumented behavior (return current work dir if no path
is given as argument) that is not present in 4-Stable.
It was introduced when realpath(1) was split out of pwd(1).
The removed behavior is provided by pwd(1).
marcel [Wed, 18 Dec 2002 08:47:07 +0000 (08:47 +0000)]
Export the physical address of the RSDP to userland by means
of the `machdep.acpi_root' sysctl. This is required on ia64
because the root pointer hardly ever, if at all, lives in the
first MB of memory and also because scanning the first MB of
memory can cause machine checks.
This provides a save and reliable way for ACPI tools to work
with the tables if ACPI support is present in the kernel. On
ia64 ACPI is non-optional.
sos [Wed, 18 Dec 2002 07:43:42 +0000 (07:43 +0000)]
On drives that returns 00 as 100% done, lower the criteria
for wraparound, 99 was too much for fast drives since they
do not give 99 as the last value, but instead something
in the 90's range.
mckusick [Wed, 18 Dec 2002 07:21:31 +0000 (07:21 +0000)]
Delay an optional amount of time after booting before starting a
background fsck. The delay defaults to sixty seconds to allow
large applications such as the X server to start before disk I/O
bandwidth is monopolized by fsck.
Submitted by: Brooks Davis <brooks@one-eyed-alien.net>
Sponsored by: DARPA & NAI Labs.
alc [Wed, 18 Dec 2002 04:39:15 +0000 (04:39 +0000)]
- Hold the page queues lock when performing vm_page_busy().
- Replace vm_page_sleep_busy() with proper page queues locking
and vm_page_sleep_if_busy().
imp [Tue, 17 Dec 2002 22:00:06 +0000 (22:00 +0000)]
Reduce diffs with Peter's expanded diffs:
1) Put back the keyboard printing printf, at the cost of 58 bytes.
2) Minor tweak to getstr at no apparent cost.
jhb [Tue, 17 Dec 2002 21:14:45 +0000 (21:14 +0000)]
Remove request for i386 boot[012] review. I didn't have time recently to
work on the UFS2 stuff and people were committing patches w/o sending them
my way anyways, so it seems rather pointless for me to be in here. :)
imp [Tue, 17 Dec 2002 21:10:34 +0000 (21:10 +0000)]
Make both UFS1 and UFS2 fit on the same boot blocks. These are a
subset of Peter's patchs that are believed to be safe.
Makefile tweaks:
o -fomit-frame-pointer
o Change default to building both UFS1 and UFS2 bootblocks.
Lots of boot2 tweaks:
o lookup is only ever called with kname, so use it directly.
o inline memsize
o getstr are only ever called with cmd, so hardware that.
o tweaks to the parsing code to test after the conversion rather than
before since we tested after anyways.
o eliminate support for %x in printf.
o eliminate a few bytes in printfs.
o Tweak the boot banner.
o eliminate support for wd and " " devices (I might add wd back to
keep bde happy).
o eliminate support for a few arguments.
This takes us from -162 bytes free to 67 bytes free.
I've tested this only on a few systems, so be careful when updating to
this change.
green [Tue, 17 Dec 2002 20:45:07 +0000 (20:45 +0000)]
Make /etc/rc and /etc/rc.shutdown executable, and execute them directly
instead of via /bin/sh. They already have the proper #! lines, and
there is no new failure case (if execution fails, it still attempts to
execute indirectly via /bin/sh). This is necessary for SEBSD to function
properly.
phk [Tue, 17 Dec 2002 19:13:03 +0000 (19:13 +0000)]
Don't cast a pointer to (intptr_t) and then on to (int) when we cannot
be sure that (int) is large enough. Instead cast only to (intptr_t) and
cast the switch/case values to (intptr_t) as well.
marcel [Tue, 17 Dec 2002 02:51:56 +0000 (02:51 +0000)]
Check that the dump device is large enough. Otherwise we could
end up with a dump offset that's smaller than the start of the
dump device and either clobber data in preceding partitions or
try to write beyond the end of the medium (unsigned wrap).
Implement legacy behaviour to never write to the first 64KB as
that is where metadata (ie disklabels) may reside.
mux [Tue, 17 Dec 2002 00:08:49 +0000 (00:08 +0000)]
Convert the xl(4) driver to the busdma API. This should make
it possible to use this driver under ia64, sparc64 (though
there may be endianness issues with this one) and other archs.
julian [Mon, 16 Dec 2002 23:04:54 +0000 (23:04 +0000)]
Don't dump core into a partition that is too small for it.
If we do, we usually wrote backwareds into the proceeding partititon
which is usually the root partition.
dillon [Mon, 16 Dec 2002 19:24:43 +0000 (19:24 +0000)]
Change the way ELF coredumps are handled. Instead of unconditionally
skipping read-only pages, which can result in valuable non-text-related
data not getting dumped, the ELF loader and the dynamic loader now mark
read-only text pages NOCORE and the coredump code only checks (primarily) for
complete inaccessibility of the page or NOCORE being set.
Certain applications which map large amounts of read-only data will
produce much larger cores. A new sysctl has been added,
debug.elf_legacy_coredump, which will revert to the old behavior.
This commit represents collaborative work by all parties involved.
The PR contains a program demonstrating the problem.
trhodes [Mon, 16 Dec 2002 17:40:17 +0000 (17:40 +0000)]
The HP DAT 40 tape drive should be able to handle variable block sizes.
But for some reason the block size is different when a different type of
tape is placed in the drive. This commit fixes that.
PR: 46209
Submitted by: Alex Wang <alex@alexwang.com>
Approved by: mjacob
robert [Mon, 16 Dec 2002 16:20:06 +0000 (16:20 +0000)]
Remove the hto(be|le)[slq] and (be|le)toh[slq] macros defined in
_KERNEL scope from "src/sys/sys/mchain.h".
Replace each occurrence of the above in _KERNEL scope with the
appropriate macro from the set of hto(be|le)(16|32|64) and
(be|le)toh(16|32|64) from "src/sys/sys/endian.h".
Tested by: tjr
Requested by: comment marked with XXX
des [Mon, 16 Dec 2002 14:22:59 +0000 (14:22 +0000)]
Ignore IEEE1284 descriptors when looking for bidirectional mode. We don't
really know how to talk IEEE1284, so attaching to that interface makes the
printer unusable.