Commit Graph

80487 Commits

Author SHA1 Message Date
eric
346283a0eb Initialize a variable in order to fix when faced with picky compilers.
Sponsored by:	Apple
2002-09-20 19:40:23 +00:00
phk
f99eaf8ce5 (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
e9da443a09 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
2539e3d8a0 Remove NVIDIA ioctl bits. They will be provided in a kernel module. 2002-09-20 19:19:58 +00:00
jhb
3c5095fc72 Axe unused include. 2002-09-20 19:16:41 +00:00
ume
0a1592f6f6 up gif during setup. 2002-09-20 18:31:55 +00:00
ume
a3ddf3a54c mistakenly set IFF_UP by SIOCSIFPHYADDR.
Obtained from:	KAME
2002-09-20 18:21:46 +00:00
phk
8fa9608749 This file does not <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 18:15:40 +00:00
phk
a313cdcbaf 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
11c93dc683 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
48b03f7c07 Put an XXX comment here to point somebody in the right direction. 2002-09-20 17:55:47 +00:00
mike
086445be5d 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
b05161d361 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
492876b22e 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
10f5b58778 #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
nectar
16373636f6 Fix k5admind by dropping libkadm5clnt from LDADD. 2002-09-20 17:31:03 +00:00
matusita
1d8a7ff173 Kernel MIB name for disabling ACPI was changed.
Pointed out by: iwasaki
2002-09-20 17:24:39 +00:00
phk
78854e898b Reduce <sys/disklabel.h> poisoning a bit.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:14:48 +00:00
nectar
70bfe2e4d1 Reorder libraries in LDADD in case some wants to statically
link these applications.
2002-09-20 17:09:38 +00:00
nectar
2772ec8ff0 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
77c3f6a70f Remove unneeded #include <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:00:24 +00:00
phk
a719cfb56b 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
e6d6b3ea37 Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
phk
0c72f48ed7 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
0e79f65347 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
f1b5b39d15 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
8065a2f590 Remove needless <sys/disklabel.h> and <sys/diskslice.h> #includes.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:37:15 +00:00
phk
0d0b20486d 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
04e808125a 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
7dc4652022 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
2dbd48c162 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
4590476d95 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
501bfd8ac9 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
47e2421c5c fork_trampoline() marks a trap frame.
Submitted by:	bde
2002-09-20 13:58:21 +00:00
jhb
b11ffbee29 Use proper type for a variable used as a DDB symbol. 2002-09-20 13:56:11 +00:00
jhb
e10343b51f Trim includes.
Submitted by:	bde
2002-09-20 13:54:45 +00:00
jhb
ff4d4620fd 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
4a91d13170 Lock the file once per call and use the unlocked fgetwc()/fputwc() variants. 2002-09-20 13:25:40 +00:00
tjr
fd97692951 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
da75bd41a4 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
c003c05d8c 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
0060873825 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
ce3ca627fa Remove unused variable. 2002-09-20 09:33:30 +00:00
phk
f3169d0f73 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
phk
e1155175db 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
f4a51ad4cf Add restrict type-qualifier. 2002-09-20 08:24:01 +00:00
mike
2304e21090 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
mini
2348815a32 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
09f3d3ca41 Straighten out get_params().
Sponsored by:	DARPA & NAI Labs.
2002-09-20 08:12:51 +00:00
imp
6de5d1911e Current uses struct thread *td rather than struct proc *p. 2002-09-20 04:30:00 +00:00