- remove some instances of __P()
- use real prototypes and un-K&R function headers
- constify where necessary (mostly strings and structures containing
strings)
- make functions and variables static that need not to be global
- tag unused function parameters as __unused
Add a PATH_INQ flag, PIM_NO_6_BYTE, which indicates the SIM never wishes to
receive 6 byte commands. Add a check for this flag to da(4) and cd(4) so
that they honor it. This is a quick workaround for many devices (especially
USB) that require da(4) quirks to operate. The more complete approach is
to finish the new transport code which will be aware of the SCSI version a
transport implements.
Alan Cox [Mon, 28 Jul 2003 02:29:07 +0000 (02:29 +0000)]
None of the "alloc" functions used by UMA assume that Giant is held any
longer. (If they still need it, e.g., contigmalloc(), they acquire it
themselves.) Therefore, we need not acquire Giant in slab_zalloc().
Robert Watson [Mon, 28 Jul 2003 02:28:51 +0000 (02:28 +0000)]
auth.conf seems to be being gradually subsumed by user classes
and PAM configuration. Remove the line concerning "auth_list"
from the template, since it's referenced only in the tinyware
password command, and only #ifdef KERBEROS, which isn't defined
in tinyware. Add a comment about auth.conf being on the way
out the door. The one remaining consumer of auth.conf is
crypt(3).
Reset the per-CPU unique value at boot and clear it in the PCB of the
child when forking. This provides a consistent initial state.
Note that cpu_set_upcall() does not clear the per-CPU unique value as
it is followed by a call to set_mcontext(), which sets it accordingly.
Mark Murray [Sun, 27 Jul 2003 16:49:10 +0000 (16:49 +0000)]
Try a lot harder to get dependancies right. This involves some ugly
looking ${.OBJDIR} work that has the up-side of actually working
in upgrade and make -jN cases.
This needs to be revisited further, and it is conceivable that
the ${.OBJDIR} stuff can be simplified, but the sheer number of
edge cases and other causes make this Hard(tm). For now, this works.
David Malone [Sun, 27 Jul 2003 14:19:23 +0000 (14:19 +0000)]
Now that we can call kmem_malloc without Giant it should be safe
to do mbuf allocation without Giant, so remove the GIANT_REQUIRED
from mb_alloc in the M_TRYWAIT case.
Robert Drehmel [Sun, 27 Jul 2003 14:01:33 +0000 (14:01 +0000)]
Changed the data types of three index variables, two of them
in the `video_state' structure, to larger ones (from u_char to
u_short). Each can now hold values at least as large as the
size of the array it is meant to point into.
This eliminates warnings printed by GCC 3.3.1 and hence makes
pcvt compilable using -Werror.
Maxime Henrion [Sun, 27 Jul 2003 13:52:10 +0000 (13:52 +0000)]
- Introduce a new busdma flag BUS_DMA_ZERO to request for zero'ed
memory in bus_dmamem_alloc(). This is possible now that
contigmalloc() supports the M_ZERO flag.
- Remove the locking of Giant around calls to contigmalloc() since
contigmalloc() now grabs Giant itself.
Mark Murray [Sun, 27 Jul 2003 13:17:31 +0000 (13:17 +0000)]
Try a lot harder to get dependancies right. This involves some ugly
looking ${.OBJDIR} work that has the up-side of actually working
in upgrade and make -jN cases.
This needs to be revisited further, and it is conceivable that
the ${.OBJDIR} stuff can be simplified, but the sheer number of
edge cases and other causes make this Hard(tm). For now, this works.
Tim J. Robbins [Sun, 27 Jul 2003 11:41:38 +0000 (11:41 +0000)]
Fix some off-by-one errors dealing with limits of server names,
usernames, workgroup names and passwords. We can now connect to
servers with 15-character NetBIOS names. (Some versions of Windows
use semi-random 15-char names by default.)
Tim J. Robbins [Sun, 27 Jul 2003 10:53:28 +0000 (10:53 +0000)]
Add the -n maxrec option as an alias for -maxrec for compatibility with
System V and consistency with other utilities. Document the new form
instead of the old form in the manual page.
Robert Drehmel [Sun, 27 Jul 2003 00:13:49 +0000 (00:13 +0000)]
Changed the type of the variable `qidx' from u_int8_t to int,
mainly to quiet a warning emitted by GCC 3.3 about comparing
a variable to a value which is larger than the former can hold.
The value was checked to make sure the `np->squeue' array is
not accessed behind its boundary.
This worked due to possibly accidental truncation when
(np->squeueput + 1) was larger than or equal to MAX_START (256)
when it was assigned to `qidx'.
`qidx' is used to hold the next position in the start queue
for an insertion. The new type was chosen because some other
code in the function ncr_freeze_devq() also uses plain integers
to hold those indices.
Wrapped the line after the closing parenthesis of an `if'
condition.
John Polstra [Sat, 26 Jul 2003 20:54:57 +0000 (20:54 +0000)]
Fix a couple of bugs in the resume handler. Don't call the if_init
function unless the device is configured up. Without this fix, the
device ends up in the RUNNING state even though it is configured down.
Also, check the RUNNING flag before calling the if_start function, in
case the if_init function failed for one reason or another.
Mike Makonnen [Sat, 26 Jul 2003 18:50:53 +0000 (18:50 +0000)]
When stopping a dhcp interface, don't just release the lease on
the address, also kill the dhclient process. Instead of doing the
release in the stop command, move it to the precmd stage and allow
rc.subr(8) to automatically kill the dhclient process by leaving the
stop command undefined.
Silence a gcc-warning. Do this by inlining the macro-call. This is
not very nice - the compiler should just silently optimize away the
unused else clause.
Bruce Evans [Sat, 26 Jul 2003 11:53:40 +0000 (11:53 +0000)]
Fixed wrong function names in the error message that was translated to
C in rev.1.32 so that it doesn't take 2 commits for all branches to fix
this message.
Avoid using __aligned(16). Instead define the jmp_buf in terms of
long doubles. This gives us 16-byte alignment. Add a CTASSERT for
the size of the jmp_buf to detect ABI breakages.
Peter Wemm [Sat, 26 Jul 2003 04:02:22 +0000 (04:02 +0000)]
Use #include <string.h> rather than <strings.h> so that the strdup()
prototype gets brought into scope. This is a big deal for 64 bit
systems where the default return value of 'int' is != pointer.
Peter Wemm [Sat, 26 Jul 2003 03:46:39 +0000 (03:46 +0000)]
Turn -Werror back on again. I've tested with/without
invariants/witness/etc on i386, sparc64, amd64 and alpha for GENERIC.
Lint probably still needs fixing, as do a couple of other drivers
that have broken recently and not been noticed.
Tim J. Robbins [Sat, 26 Jul 2003 02:21:49 +0000 (02:21 +0000)]
Revise and improve ntfs_subr.c 1.30: read only a single cluster at a time
in ntfs_writentvattr_plain and ntfs_readntvattr_plain, and purge the boot
block from the buffer cache if isn't exactly one cluster long. These two
changes work around the same buffer cache bug that ntfs_subr.c 1.30 tried
to, but in a different way. This may decrease throughput by reading smaller
amounts of data from the disk at a time, but may increase it by avoiding
bogus writes of clean buffers.
Problem (re)reported by Karel J. Bosschaart on -current.
Revert previous commit. We don't use setjmp()/longjmp() for context
switching anymore, so there's no need to save and restore GP. This
change breaks threaded applications linked against libc_r. Pull the
tier 2 card again: relink. This will link against libthr instead.
Bill Paul [Fri, 25 Jul 2003 20:33:43 +0000 (20:33 +0000)]
Remove alpha vtophys() hack from if_bgereg.h and clean up unneeded
#includes formerly required to pull in vtophys support, since we
don't need them anymore.
Bill Paul [Fri, 25 Jul 2003 19:42:44 +0000 (19:42 +0000)]
Convert bge(4) to use busdma. I have not tested this on anything
besides x86 yet since I don't have access to a non-x86 FreeBSD
box at the moment. Volunteers welcome.
Discussions on src-committers with alfred and bde pointed out that
the "do-nothing" versions of __RCSID(), __RCSID_SOURCE(), __SCCSID(),
and __COPYRIGHT() were not strictly correct. They should not expand
into [nothing], because the ';' which follows them would then cause
a syntax error (in a strict C compiler, if not gcc...).
So, change the do-nothing versions of those macros to use the
'struct __hack' tactic, as was already used with __FBSDID().
Approved by: discussions with bde
MFC after: 1 week
Add an informational debugging printf of the maximum time spent in
EcEventWait(). If you get AE_HARDWARE_NO_RESPONSE errors, please enable
this info by setting hw.acpi.verbose=1 in loader.conf.
Bruce Evans [Fri, 25 Jul 2003 15:54:23 +0000 (15:54 +0000)]
Backed out the micro-optimization in 1.4. It was to help gcc-2.6.3
on i486's (and probably i386's), but it has had very little effect
since gcc-2.7 or gcc-2.95. With gcc-3.3, it gave a small
pessimization for at least i386's, athlon-xp's and pentium4's, a
small optimization (I think) for pentium1's, and made no difference
for i386's. (movzbl is best for all the later processors, and the
micro-optimization was to stop it being used on i486's.)
When deciding whether to download the microcode or not look at the API rather
than at the vendor. We have three different Fore cards and only the PCA200
need the microcode. Look also at the RAM address and load the code only if
it is not zero. A zero RAM address means either a bug in the driver or
this is a interface created by harp(4) in which case fatm(4) handles the
microcode issue.
o Do not overwrite saved interrupt priority level by alloc_hash(),
use a separate variable.
o Restore interrupt priority level before return (no-op in HEAD).
Spotted by: Don Bowman <don@sandvine.com>
MFC after: 5 days
Ruslan Ermilov [Fri, 25 Jul 2003 08:54:41 +0000 (08:54 +0000)]
Moved the boot floppy generation code out from release.9 to release.10.
The release.9 target is now responsible only for generation of MFS root
file systems, that are built for all architectures, even those that do
not provide a floppy installation option. The release.10 target is now
responsible for creation of a set of boot, MFS root, and fixit floppies,
and the NO_FLOPPIES variable now affects only this target.
Also, replaced the FIXIT_TARGET variable with a check of whether the
*FIXITSIZE variables are present for a given architecture, similar to
how this is done when generating boot floppies.
Remove __aligned(16) from the definition of struct _ia64_fpreg. It's
a non-standard construct. Instead, redefine struct _ia64_fpreg as a
union and put a long double in it. On ia64 and for LP64, this is
defined by the ABI to have 16-byte alignment. For ILP32 a long double
has 4-byte alignment, but we don't support ILP32.
Note that the in-memory image of a long double does not match the in-
memory image of spilled FP registers. This means that one cannot use
the fpr_flt field to interpet the bits. For this reason we continue
to use an aggregate type.