Commit Graph

80437 Commits

Author SHA1 Message Date
eric
97eee3cd78 Initialize a variable in order to fix when faced with picky compilers.
Sponsored by:	Apple
2002-09-20 19:40:23 +00:00
phk
57a346a213 (This commit touches about 15 disk device drivers in a very consistent
and predictable way, and I apologize if I have gotten it wrong anywhere,
getting prior review on a patch like this is not feasible, considering
the number of people involved and hardware availability etc.)

If struct disklabel is the messenger: kill the messenger.

Inside struct disk we had a struct disklabel which disk drivers used to
communicate certain metrics to the disklayer above (GEOM or the disk
mini-layer).  This commit changes this communication to use four
explicit fields instead.

Amongst the benefits is that the fields do not get overwritten by
wrong or bogus on-disk disklabels.

Once that is clear, <sys/disk.h> which is included in the drivers
no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in,
the few places that needs them, have gotten explicit #includes for
them.

The disklabel inside struct disk is now only for internal use in
the disk mini-layer, so instead of embedding it, we malloc it as
we need it.

This concludes (modulus any mistakes) the series of disklabel related
commits.

I belive it all amounts to a NOP for all the rest of you :-)

Sponsored by:   DARPA & NAI Labs.
2002-09-20 19:36:05 +00:00
markm
2fb7a39c0f Extend the lint handling a bit.
o Make it possible to prevent parts of the tree from being linted
  (say) during a 'make world' by setting NOLINT in a leaf Makefile.

o Make "make lint" work (better) for executable programs.

o Clean up (nuke!) a syntax damaged pipeline.
2002-09-20 19:32:51 +00:00
mdodd
557fe83a62 Remove NVIDIA ioctl bits. They will be provided in a kernel module. 2002-09-20 19:19:58 +00:00
jhb
8c280ed0fd Axe unused include. 2002-09-20 19:16:41 +00:00
ume
9469c35005 up gif during setup. 2002-09-20 18:31:55 +00:00
ume
372b3e7ba2 mistakenly set IFF_UP by SIOCSIFPHYADDR.
Obtained from:	KAME
2002-09-20 18:21:46 +00:00
phk
bbda1de414 This file does not <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 18:15:40 +00:00
phk
7d7b5d4730 Remove unused #includes: <sys/disk.h> <sys/devicestat.h> and <sys/sysctl.h>
Sponsored by:	DARPA & NAI Labs.
Approved by:	sos
2002-09-20 18:08:57 +00:00
phk
9759856130 We need neither <sys/diskslice.h> nor <sys/disklabel.h> here.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:59:09 +00:00
phk
e5427d6bd3 Put an XXX comment here to point somebody in the right direction. 2002-09-20 17:55:47 +00:00
mike
a3e4a43eb4 Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tabs in typedef.
o Missing tabs in struct between types and member names.
o Unaligned, unordered function prototypes.
o Reversed comment for #endif.
2002-09-20 17:54:34 +00:00
phk
d376fc4110 For reasons now lost in historical fog, the bounds_check_with_label()
function were put in i386/i386/machdep.c from where it has been
cut and pasted to other architectures with only minor corruption.

Disklabel is really a MI format in many ways, at least it certainly
is when you operate on struct disklabel.

Put bounds_check_with_label() back in subr_disklabel.c where it belongs.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 17:51:00 +00:00
phk
4848209c80 We don't need the <sys/disklabel.h> include for alpha anymore.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:45:44 +00:00
phk
82a79f8c8f #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
nectar
5012a39145 Fix k5admind by dropping libkadm5clnt from LDADD. 2002-09-20 17:31:03 +00:00
matusita
a13431bdf6 Kernel MIB name for disabling ACPI was changed.
Pointed out by: iwasaki
2002-09-20 17:24:39 +00:00
phk
f4cdbd9ee6 Reduce <sys/disklabel.h> poisoning a bit.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:14:48 +00:00
nectar
296dd3ab99 Reorder libraries in LDADD in case some wants to statically
link these applications.
2002-09-20 17:09:38 +00:00
nectar
2658a0653c Make ipropd-slave/ipropd-master actually work. These applications
were being linked against the client Kerberos administration library,
when they must be linked against the server library, resulting in
segfaults early in the game.  I suspect these have never been tested
before :-(
2002-09-20 17:07:59 +00:00
phk
85723587cf Remove unneeded #include <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:00:24 +00:00
phk
6113c6e66c Include <sys/ioccom.h> directly, rather than indirectly through
<sys/disklabel.h>

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:59:14 +00:00
phk
29bf98d3e7 Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
phk
f2091a5e46 Remove unused #includes. Looks amacingly like the exact same set
as I just removed from ncr53c500_pccard.c.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:51:09 +00:00
phk
cded68f0c0 Remove #include of <sys/disklabel.h> (and a few other unused #includes I
noticed while here).

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:49:36 +00:00
phk
71d1473801 We don't need to #include <sys/disklabel.h>.
We don't need to #include <sys/disklabel.h> second time either.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:42:33 +00:00
phk
aee09c59a4 Remove needless <sys/disklabel.h> and <sys/diskslice.h> #includes.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:37:15 +00:00
phk
c3d0986c83 Don't call dkunit() to find our unit number, it is in our softc.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:26:12 +00:00
phk
c0477d28f4 Don't use dkunit() to find out unit, we already have our softc pointer
where we can find it.

Don't call dkpart() just to print the result, it is constant.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:25:16 +00:00
archie
207fb06f80 Revert previous commit to unbreak world until we figure out the
right way to do it.
2002-09-20 15:43:26 +00:00
mbr
d4b724dda7 Fix the support for the AN985/983 chips, which do not set the
RXSTATE to STOPPED, but to WAIT. This should fix hangs which
could only be solved by replugging the cable.

Submitted by:	jhb
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:18:13 +00:00
mbr
bca2116b24 Enable the automatic TX underrun recovery for the ADMtek chips.
This solves cvsup update on my laptop which aborts after a while
without this patch.

PR:		34236
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:16:06 +00:00
phk
7fd38535ea Make FreeBSD "struct disklabel" agnostic, step 312 of 723:
Rename bioqdisksort() to bioq_disksort().
Keep a #define around to avoid changing all diskdrivers right now.

Move it from subr_disklabel.c to subr_disk.c.
Move prototype from <sys/disklabel.h> to <sys/bio.h>

Sponsored by:   DARPA and NAI Labs.
2002-09-20 14:14:37 +00:00
jhb
868209c892 fork_trampoline() marks a trap frame.
Submitted by:	bde
2002-09-20 13:58:21 +00:00
jhb
8ba762c99f Use proper type for a variable used as a DDB symbol. 2002-09-20 13:56:11 +00:00
jhb
1deeb25fda Trim includes.
Submitted by:	bde
2002-09-20 13:54:45 +00:00
jhb
a68b84312f Various style fixes, including moving db_print_backtrace() out of the
middle of the watchpoint code.

Submitted by:	bde
2002-09-20 13:53:33 +00:00
tjr
dbed35f068 Lock the file once per call and use the unlocked fgetwc()/fputwc() variants. 2002-09-20 13:25:40 +00:00
tjr
ff2a681918 Lock and unlock the file once per call and use the unlocked version of
ungetc() instead of having ungetc() recurse on the lock.
2002-09-20 13:23:26 +00:00
tjr
124e10a797 Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()
and __fgetwc() which can be used when we know the file is locked.
2002-09-20 13:20:41 +00:00
phk
1919170e90 Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 12:52:03 +00:00
ru
b003f2381f Bandaid for a broken world. The real fix is somewhat more
complicated and will be sent for a review.
2002-09-20 12:33:19 +00:00
phk
bccba41c8d Remove unused variable. 2002-09-20 09:33:30 +00:00
phk
806dbaa1e8 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
phk
2f9ce7f609 Construct new disklabels based on the medias stated parameters in
userland, rather than expect all possible GEOMetries to know about
BSD disklabels.

Sponsored by:	DARPA & NAI Labs
2002-09-20 09:18:31 +00:00
mike
a33d7be6d9 Add restrict type-qualifier. 2002-09-20 08:24:01 +00:00
mike
8286a42d54 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
mini
691c400510 Don't peek into MD structures from MI code. The getcontext(3) and
setcontext(3) functions check the validify of the mcontext_t structs.
2002-09-20 08:13:21 +00:00
phk
d605f09966 Straighten out get_params().
Sponsored by:	DARPA & NAI Labs.
2002-09-20 08:12:51 +00:00
imp
42910e6e7c Current uses struct thread *td rather than struct proc *p. 2002-09-20 04:30:00 +00:00