Commit Graph

80644 Commits

Author SHA1 Message Date
Poul-Henning Kamp
2f9752e95e Change a return to a break so the local buffers get properly freeed.
Spotte by:	FlexeLint

Reviewed by:	rwatson
2002-09-28 21:34:31 +00:00
Poul-Henning Kamp
19ebba326b s/struct dev_t */dev_t */ 2002-09-28 21:21:01 +00:00
Poul-Henning Kamp
b9b7876d2b This driver doesn't need to include <sys/bus_private.h> either.
Spotted by:	FlexeLint
2002-09-28 20:59:59 +00:00
Poul-Henning Kamp
a3ae595729 Disabuse this driver of the notion that it needs to include
<sys/bus_private.h> to find the unit from a device_t.

Spotted by:	FlexeLint
2002-09-28 20:56:32 +00:00
Peter Wemm
feea0ab05b There is no need for start/num to be signed in i386_ldt_args. 2002-09-28 20:42:04 +00:00
Juli Mallett
76e8db31fc Fix merge error in previous commit.
Sponsored by:	Bright Path Solutions
2002-09-28 20:04:17 +00:00
Juli Mallett
1e3d8881cf Add empty default cases where they should be, remove non-local execution stuff
in compat.c which doesn't even have preprocessor-conditional-hidden support
code, and add a debugging statement where we might end up with a nil list
somehow, but where I doubt it.

First confirmed userland kill for Flexelint.

Sponsored by:	Bright Path Solutions
2002-09-28 20:03:26 +00:00
Poul-Henning Kamp
079a527a3d Zero the local-variable mutexes before we call mtx_init() on them,
failing to do this may lead mtx_init() to belive they have already
been initialized.

Detected by:	Marc Recht <marc@informatik.uni-bremen.de>
2002-09-28 19:38:29 +00:00
Peter Wemm
8b223ac209 Repair range checking for reading the ldt list.
PR:		38016
Submitted by:	davidx
2002-09-28 19:37:54 +00:00
Sebastien Gioria
b7df8acc7c We go more on MFen 1.423 2002-09-28 19:05:34 +00:00
Juli Mallett
85de3147ea When spamming me with a printf(9), under DIAGNOSTIC, at least be nice enough
to include a newline.

MFC after:	4 days
Sponsored by:	Bright Path Solutions
2002-09-28 19:04:49 +00:00
Poul-Henning Kamp
d94c4c67a2 Make P_MAGIC fit in p_magic. 2002-09-28 18:48:22 +00:00
Mitsuru IWASAKI
01598b8d4a Add support for the BCM5702x chips.
Reviewed by:	jdp
MFC after:	1 week
2002-09-28 18:04:12 +00:00
Poul-Henning Kamp
b28a0fe196 Don't use GCC shorthand for ?: unless it really matters. 2002-09-28 17:47:51 +00:00
Poul-Henning Kamp
53cc479393 Remove unused includes.
Clarify the intention of a while();
Move a local variable to avoid potential name-confusion.
2002-09-28 17:46:30 +00:00
Poul-Henning Kamp
562c866822 Fix mis-indent. 2002-09-28 17:37:55 +00:00
Warner Losh
a2398beeed Newer Netgear MA401RA entry.
Submitted by: Michael Ranner
2002-09-28 17:36:52 +00:00
Poul-Henning Kamp
cb8e433232 Don't call function in return() for a void function. 2002-09-28 17:36:29 +00:00
Poul-Henning Kamp
024cb40078 Fix an indentation problem. 2002-09-28 17:34:31 +00:00
Poul-Henning Kamp
5c5f6cfa52 Don't use unnamed anonymous structs: give it a name. 2002-09-28 17:33:31 +00:00
Poul-Henning Kamp
37c841831f Be consistent about "static" functions: if the function is marked
static in its prototype, mark it static at the definition too.

Inspired by:    FlexeLint warning #512
2002-09-28 17:15:38 +00:00
Makoto Matsushita
069f4a6841 Create symlink for /etc/group. MAKEDEV file will use this file (group name
to gid conversion).

PR:		43455
Submitted by:	n-kogane@syd.odn.ad.jp
X-MFC after:	immediately if re@ permits, or after 4.7-RELEASE is out
2002-09-28 17:06:07 +00:00
Poul-Henning Kamp
1cff889a46 Put the casts on the right hand side of =. 2002-09-28 14:17:24 +00:00
Poul-Henning Kamp
7b83124255 Don't return(foo(bla)) when foo returns void. 2002-09-28 14:03:27 +00:00
Poul-Henning Kamp
d241c36453 I misplaced a local variable yesterday. 2002-09-28 13:42:04 +00:00
Poul-Henning Kamp
54286a04c5 Correctly order VI_UNLOCK(), local variables and block comment. 2002-09-28 12:15:44 +00:00
Poul-Henning Kamp
4ae677009e Style, whitespace and lint fixes.
Sponsored by:	DARPA & NAI Labs.
2002-09-28 11:57:20 +00:00
Poul-Henning Kamp
eadf0ffdce Void functions cannot use return(foo) even if foo is also returning void.
Sponsored by:	DARPA & NAI Labs.
2002-09-28 11:43:20 +00:00
Poul-Henning Kamp
df60b2499b Fix two style problems which made FlexeLint unhappy:
Don't use zero-dimension array in struct pargs.

Comma after the last element of an enum doesn't make sense.
2002-09-28 11:28:44 +00:00
Julian Elischer
165d2b993c Rewrite the kse_create() function to better aproach the semantics we
have specified in the design.
2002-09-28 08:44:31 +00:00
Poul-Henning Kamp
852f392456 First confirmed kill from my Flexelint license: Check return value
of g_clone_bio().

Detected by:	http://www.gimpel.com/html/flex.htm
Sponsored by:	DARPA & NAI Labs.
2002-09-28 08:16:50 +00:00
Tim J. Robbins
3619568a64 Remove masking macros for getwc(), putwc(), putwchar() and getwchar().
Although there was nothing wrong with getwc() and putwc(), getwchar()
and putwchar() assumed that <stdio.h> had been included before <wchar.h>,
which is not allowed by the standard.
2002-09-28 07:43:44 +00:00
Julian Elischer
ee38d590ff Place 'completed thread anchor' in pre-zero'd secion of the KSEGRP
structure, not the copied section.
2002-09-28 07:27:31 +00:00
Andrey A. Chernov
69513ccb80 Remove more two-letters names,
we don't use them in termcap already many years.

Add "su" as alias to "dumb" to help login, with comment.
2002-09-28 03:40:19 +00:00
Jake Burkholder
3297e8c990 Renamed intr_enqueue to intr_vector and intr_dequeue to intr_fast, to
better reflect how they are called.
2002-09-28 03:06:35 +00:00
Jake Burkholder
091c1e1acf Moved most interrupt related code to a new file, interrupt.S. 2002-09-28 01:56:24 +00:00
Peter Wemm
224af215a6 Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
Jake Burkholder
169d513cb4 Add a workaround for what seems to be confusion between binutils and the
sparc v9 ABI.  The Elf_Rela records for local symbols appear to already
have the symbol's value added in to the addend field, even though the ABI
specifies we need to lookup the symbol and add its value too.  This breaks
text relocations in klds because the symbol's value is added twice, and
the resulting address points off into nowhere land, so for now just use
the addend.

Tested by:	rwatson
2002-09-27 23:12:53 +00:00
Justin T. Gibbs
2eaa80698f Add a missing pair of curly braces to a conditional debug
statement.  This ensures that debug code doesn't trigger if
it isn't enabled. <blush>
2002-09-27 23:00:35 +00:00
Poul-Henning Kamp
967970bab6 Update to match current kernel code.
Fix a couple of reference data which were found to be in error.

Sponsored by:	DARPA & NAI Labs.
2002-09-27 22:20:53 +00:00
Poul-Henning Kamp
6cfbfac6d4 Add "missing scratch-pad register" to the first of the two ports
on the Argosy SP-320 dual-port async PCcard.

An amazing piece of hardware seen from an ISO9000 point of view.
2002-09-27 22:02:46 +00:00
Poul-Henning Kamp
32bc35fdb6 Add a field so we can specify flags per port to the underlying device driver. 2002-09-27 22:01:32 +00:00
Poul-Henning Kamp
97c6f4f976 Add yet a quick flag to sio: 0x100000 "Scratch pad register missing".
The advanced stage of computer assisted hardware design and
verification is aptly illustrated by the fact that this is necessary
because only the first ports in a single-chip, dual-port async
PC-Card product lacks this register.
2002-09-27 22:00:23 +00:00
Søren Schmidt
595ecc67ab Fix so it compiles with the new disklabel stuff. 2002-09-27 21:56:35 +00:00
Poul-Henning Kamp
3d3816e633 Extensively rework the geom_bsd method, put a lot of comments in, betting
that this will make people use this for their future copy&paste operations.

Rework the detection of raw-disk offsets in disklabels.  This actually
unearthed a number of bugs in the (now) previous version.

Also accept labels which don't have a magic RAW_PART, provided they don't
confuse us too much.

Change the order of our sanity-checks on labels found on disks to be more
robust.

Check against MAXPARTITIONS in our sanity-check and reject disklabels
we cannot cope with.

Create new g_bsd_modify() function to implment disklabel modifying
ioctls.

Implement DIOCSDINFO and DIOCWDINFO with the provision that the latter
still not writes your change back to disk.  I didn't have the nerves
for that yet.

In the start routine, use g_call_me() for complex ioctls to prevent
sleeping.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:54:37 +00:00
Poul-Henning Kamp
5a6baf5457 Add the new g_slice_config() call, which can add/delete/change a slice,
with support for trying, doing and forcing.

This will eventually replace g_slice_addslice() which gets changed from
grabbing topology to requing it in this commit as well.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:37:11 +00:00
Poul-Henning Kamp
b1937dd1ca Make the UP/DOWN threads hold on to their own private mutex while doing
work.

This prevents people from sleeping in the UP/DOWN I/O path by mistake
or design (doing so almost invariably result in deadlocks since it
stalls all I/O processing in the given direction.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:24:40 +00:00
Poul-Henning Kamp
8ac8480b86 Correctly en/decode MAXPARTITIONS partitions.
Sponsored by:	DARPA & NAI Labs.
2002-09-27 21:19:47 +00:00
Poul-Henning Kamp
d4c4a6f165 Setattr should not retry on EBUSY, we could get EBUSY back because
a disklabel modification tries to change an open device, and no
counter-examples exists.

Be less facist about when we can do Setattr, the openmodes of devices
are so loosely managed that the "exclusive" count is almost useless.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:12:47 +00:00
Poul-Henning Kamp
9169e8004d Various no-ops:
Add a __unused.

Make the 2byte decoder functions return 16 bits for the benefits
of picky lints.

No need to grab giant around a tsleep() when we have a timeout.

Sponsored by:	DARPA & NAI Labs.
2002-09-27 21:05:05 +00:00