kientzle [Mon, 17 May 2004 22:15:49 +0000 (22:15 +0000)]
getgrent() and friends should set errno if there is an error.
Also, clarify the manpage description of when errno is set and
explain that clients should set errno=0 first if they want useful
error information.
peter [Mon, 17 May 2004 21:24:39 +0000 (21:24 +0000)]
Since we go to the trouble of compiling the kobj ops table for each class,
and cannot handle it going away, add an explicit reference to the kobj
class inside each linker class. Without this, a class with no modules
loaded will sit with an idle refcount of 0. Loading and unloading
a module with it causes a 0->1->0 transition which frees the ops table
and causes subsequent loads using that class to explode. Normally, the
"kernel" module will remain forever loaded and prevent this happening, but
if you have more than one linker class active, only one owns the "kernel".
This finishes making modules work for kldload(8) on amd64.
peter [Mon, 17 May 2004 21:20:23 +0000 (21:20 +0000)]
Clean up the code some more. Unify the text/data (progbits) and bss
(nobits) tables to simplify some code. Try and shorten some of the very
wide lines. Somewhere along the way, I think I fixed the memory
corruption that caused panics after going multiuser.
peter [Mon, 17 May 2004 21:16:49 +0000 (21:16 +0000)]
Deal with REL records that have the addend embedded variable sized targets
rather than the RELA table. I dont know if bintutils will ever generate
REL records, but just in case.....
truckman [Mon, 17 May 2004 20:16:40 +0000 (20:16 +0000)]
Switch from using the vnode interlock to a private mutex in fifo_open()
to avoid lock order problems when manipulating the sockets associated
with the fifo.
Minor optimization of a couple of calls to fifo_cleanup() from
fifo_open().
joerg [Mon, 17 May 2004 19:19:08 +0000 (19:19 +0000)]
Fix my own style(9) bugs:
. forward declare all static functions
. add a couple of redundant parens in return statements where they've
been missing
. remove the space after exit since it's a function
joerg [Mon, 17 May 2004 18:55:45 +0000 (18:55 +0000)]
Fix various style(9) bugs. This includes the removal of wrong
reimplementations of enodev() (for the smbread() and smbwrite()
functions), as well as fixing various errno values to conform to
errno(3).
Bruce also points out that a number of the pointer == NULL tests
are probably nonsense because the respective checks are already
done at upper layers.
marcel [Mon, 17 May 2004 18:36:14 +0000 (18:36 +0000)]
Fix typo in comment. While here, end the sentence with a period and
remove the empty line between the fdc and sio devices. The empty
line suggests that the comment applies to fdc only while it applies
to all following devices and options.
kientzle [Mon, 17 May 2004 18:27:05 +0000 (18:27 +0000)]
POSIX prohibits any library function from setting errno to 0.
Correct my previous commit and add a comment to the manpage
indicating that the user must set errno to 0 if they wish to
distinguish "no such user" from "error".
ps [Mon, 17 May 2004 17:27:38 +0000 (17:27 +0000)]
Turn SCSI pre-fetch ON. This is mainly for 64XX and 64X based
controllers and allows the controller to prefetch 1-2k on certain
PCI memory reads to the host. The spec says this should only be
used for IA32 based systems.
Informed of feature by: John Cagle <first.last@hp.com>
tjr [Mon, 17 May 2004 12:32:40 +0000 (12:32 +0000)]
Use conversion state objects to store the accumulated wide character,
low bound, and the number of bytes remaining instead of storing the
raw byte sequence and deriving them every time mbrtowc() is called.
This is much faster -- about twice as fast in some crude benchmarks.
marcel [Mon, 17 May 2004 07:11:37 +0000 (07:11 +0000)]
Unbreak build due to previous commit: now that elf_reloc_internal()
gets the relocation base passed in relocbase, we cannot declare a
local variable with the same name. Assume the argument holds the
same value as the local variable did...
imp [Mon, 17 May 2004 05:46:16 +0000 (05:46 +0000)]
Move fdc from isa/fd.c to dev/fdc/fdc.c. The old files were
repocopied. Soon there will be additional bus attachments and
specialization for isa, acpi and pccard (and maybe pc98's cbus).
This was approved by nate, joerg and myself. bde dissented on the new
location, but appeared to be OK after some discussion.
imp [Mon, 17 May 2004 05:42:04 +0000 (05:42 +0000)]
Update to reflect new location in the tree. This has been repo copied
from sys/isa/fd.c in preparation for specialization of attachments for
different busses.
kientzle [Mon, 17 May 2004 05:02:39 +0000 (05:02 +0000)]
Refactor name caching to use a common piece of code for uname_cache and
gname_cache. Cache negative lookups to dramatically improve performance
building archives containing nonexistent uid/gid.
kientzle [Mon, 17 May 2004 03:33:06 +0000 (03:33 +0000)]
Make symlink protection a bit more useful:
* Remove terminal symlinks so they can be replaced.
* If -U, remove intermediate symlinks as well
* Otherwise, refuse the extraction
das [Mon, 17 May 2004 01:04:37 +0000 (01:04 +0000)]
Remove some kludges designed to ensure that the compiler didn't round
constants the wrong way on the VAX. Instead, use C99 hexadecimal
floating-point constants, which are guaranteed to be exact on binary
IEEE machines. (The correct hexadecimal values were already provided
in the source, but not used.) Also, convert the constants to
lowercase to work around a gcc bug that wasn't fixed until gcc 3.4.0.
peter [Sun, 16 May 2004 22:43:57 +0000 (22:43 +0000)]
Checkpoint some of what I was starting to tinker with for having some
different context support for 32 vs 64 bit processes. This simply omits
the save/restore of the segment selector registers for non 32 bit
processes. This avoids the rdmsr/rwmsr juggling when restoring %gs
clobbers the kernel msr that holds the gsbase.
However, I suspect it might be better to conditionally do this at
user<->kernel transition where we wouldn't need to do the juggling in the
first place. Or have per-thread extended context save/restore hooks.
peter [Sun, 16 May 2004 22:24:57 +0000 (22:24 +0000)]
Disable ndis module on amd64. It doesn't compile. For example,
hal_raise_irql(void) doesn't take an argument, but it is called with one.
eg: irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL);
This is hidden by the macros on i386, but becomes a compile error on amd64
since the arguments are actually checked.
peter [Sun, 16 May 2004 22:11:50 +0000 (22:11 +0000)]
Kill the LAZYPMAP ifdefs. While they worked, they didn't do anything
to help the AMD cpus (which have a hardware tlb flush filter). I held
off to see what the 64 bit Intel cpus did, but it doesn't seem to help
much there either. Oh well, store it in the Attic.
njl [Sun, 16 May 2004 22:05:25 +0000 (22:05 +0000)]
Remove myself from da(4). MIHIRA Sanpei Yoshiro will be taking over quirk
maintenance given his work on USB. Also, the root cause of spamming da(4)
with NO_6_BYTE quirks was fixed last year and the extraneous quirks have
been removed. Please coordinate future quirk issues with sanpei@
joerg [Sun, 16 May 2004 21:11:46 +0000 (21:11 +0000)]
After successfully attaching an iicbus instance, instead of using a
NULL name in device_add_child(), explicitly name all of our known
child drivers in order to give them a chance to attach to us.
Otherwise, only the first one present would be probed and attached.
peter [Sun, 16 May 2004 20:44:41 +0000 (20:44 +0000)]
For consistency with i386, have pmap_kenter_temporary() take a vm_paddr_t
argument. It is actually the same type on amd64 (vm_paddr_t = vm_offset_t)
but this reduces the i386<->amd64 diffs a little.
peter [Sun, 16 May 2004 20:11:38 +0000 (20:11 +0000)]
Enable first part of kld's on amd64. This is known to not work right
yet, but building kld's is OK now and they can be loaded by kldload(2).
(but the machine will likely crash soon afterwards, a "minor" problem :-)
peter [Sun, 16 May 2004 20:00:28 +0000 (20:00 +0000)]
Make a small revision to the api between the elf linker core and the
elf_reloc() backends for two reasons. First, to support the possibility
of there being two elf linkers in the kernel (eg: amd64), and second, to
pass the relocbase explicitly (for relocating .o format kld files).
yar [Sun, 16 May 2004 19:29:33 +0000 (19:29 +0000)]
Add two new options to cron(8), -J and -j. They allow to specify
the maximum amount of time jitter for root and other users, respectively.
Before starting a job, cron(8) will sleep a random number of seconds,
from 0 to the amount specified. This can help to smooth down load spikes
when a lot of jobs are to start at the beginning of a particular minute
(e.g., the first minute of an hour.)