Commit Graph

74570 Commits

Author SHA1 Message Date
Poul-Henning Kamp
75766e179d Sigh, more BBSIZE related breakage.
Sponsored by:	DARPA & NAI Labs.
2002-05-12 21:37:08 +00:00
Poul-Henning Kamp
ab4f4196a9 #include <sys/disklabel.h> to get BBSIZE. 2002-05-12 20:58:18 +00:00
Luigi Rizzo
d61ee39cd5 Main functional change is the implementation of matching of MAC header
fields as discussed in the commit to ip_fw.c:1.186

On top of this, a ton of non functional changes to clean up the code,
write functions to replace sections of code that were replicated
multiple times (e.g. the printing or matching of flags and options),
splitting long sections of inlined code into separate functions,
and the like.

I have tested the code quite a bit, but some typos (using one variable
in place of another) might have escaped.

The "embedded manpage" is a bit inconsistent, but i am leaving fixing
it for later. The current format makes no sense, it is over 40 lines
long and practically unreadable. We can either split it into sections
( ipfw -h options  , ipfw -h pipe , ipfw -h queue ...)
or remove it altogether and refer to the manpage.
2002-05-12 20:52:21 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
Luigi Rizzo
201efb1913 Add code to match MAC header fields (at the moment supported on
bridged packets only, soon to come also for packets on ordinary
ether_input() and ether_output() paths. The syntax is

    ipfw add <action> MAC dst src type

where dst and src can be "any" or a MAC address optionallyfollowed
by a mask, e.g.

	10:20:30:40:50
	10:20:30:40:50/32
	10:20:30:40:50&ff:ff:ff:f0:ff:0f

and type can be a single ethernet type, a range, or a type followed by
a mask (values are always in hexadecimal) e.g.

	0800
	0800-0806
	0800/8
	0800&03ff

Note, I am still uncertain on what is the best format for inputting
these values, having the values in hexadecimal is convenient in most
cases but can be confusing sometimes. Suggestions welcome.

Implement suggestion from PR 37778 to allow "not me" on destination
and source IP. The code in the PR was slightly wrong and interfered
with the normal handling of IP addresses. This version hopefully is
correct.

Minor cleanup of the code, in some places moving the indentation to 4
spaces because the code was becoming too deep. Eventually, in a
separate commit, I will move the whole file to 4 space indent.
2002-05-12 20:43:50 +00:00
Poul-Henning Kamp
7110af7577 ARGH! SBLOCK is not unused. Try to get this right.
BBSIZE belongs in <sys/disklabel.h> (but shouldn't be a constant).

Define SBLOCK again, using the right math.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:21:40 +00:00
Poul-Henning Kamp
7cb71b749c Remove #define for BBOFF, it is assumed == 0 so many places that we might
as well forget about it.  In fact the only thing which used it was the
SBOFF macro.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:00:21 +00:00
Poul-Henning Kamp
16910634dd Remove unused BBLOCK and SBLOCK #defines.
Sponsored by: DARPA & NAI Labs.
2002-05-12 19:56:31 +00:00
Poul-Henning Kamp
532aff98f6 Remove the private code for reading UFS superblocks, this does not belong
in df(1) when we have multiple filesystem types, and the complications of
handling UFS2 pushes this over the edge.

Use the .../mount/extern.h to get prototypes of the functions we
borrow from there.  Constify things to match.  (why aren't these
functions in a lib anyway ?)

Make everything static and set WARNS?=5.

The way the "df diskdevice" thing works for unmounted diskdevices
is not very general.

Sponsored by: DARPA & NAI Labs.
2002-05-12 19:24:09 +00:00
Alan Cox
a47335fdb4 o Remove GIANT_REQUIRED and an excessive number of blank lines
from vm_map_inherit().  (minherit() need not acquire Giant
   anymore.)
2002-05-12 18:42:05 +00:00
Marcel Moolenaar
882c6b1e5a Fix alpha build. The alpha has dumpsys implemented.
While here, revert the condition to list the machines
for which dumpsys has not been implemented.

Reported by: wilko
2002-05-12 18:27:28 +00:00
Jake Burkholder
63fd3b0af9 Enable KTR_TRAP by default. 2002-05-12 18:10:48 +00:00
David E. O'Brien
f0ab1657e0 do-while ASM_OUTPUT_ALIGN to enable its use in more places. 2002-05-12 17:31:12 +00:00
Joerg Wunsch
5613959d84 Hide the fd autoselection messages behind the bootverbose case so they
stop bothering people on their consoles.
2002-05-12 17:17:46 +00:00
Ruslan Ermilov
c75fbf36b1 NOLIB is gone; put INTERNALLIB back for now. 2002-05-12 16:35:34 +00:00
Ruslan Ermilov
5b8f41af39 Revert the last change. The corresponding bsd.lib.mk changes were
already backed out.
2002-05-12 16:21:23 +00:00
Ruslan Ermilov
c7b111cba8 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
Bruce Evans
26e5d4d14f Translated -malign-functions=4 to -falign-functions=16 for the new gcc. 2002-05-12 15:51:38 +00:00
Bruce Evans
e754a32842 Saved 176 bytes by compiling with -fno-guess-branch-probability. The
default of -fguess-branch-probablility causes time optimizations (?)
like rewriting `if (foo) x++;' as
`if (!foo) goto forth; back: ; ...; forth: x++; goto back;".  This is
pessimizes space especially well on i386's because one short branch
gets converted to 2 long ones.

Removed -fno-align-foo since it is implied by -Os.  Previous commit
messages seem to have overstated the new alignment bugs in gcc.  The
only case that affects boot2 is that -fno-align-functions (or
equivalently -falign-functions=1) actually gives -falign-functions=2.
This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1.
The default case where the optimization level is 1 and no alignment
options are given is more broken.  All alignments are minimal, modulo
the bug in FUNCTION_BOUNDARY.  This is caused by toplev.c setting
defaults too early.

Some hacks in previous commits ar not needed now, but may as well be
kept until gcc is fixed.  The previous on in the Makefile saved 96
bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data
due to unrelated bloat in the alignment of large objects.  There aren't
even any options to control alignment of data.
2002-05-12 15:45:28 +00:00
Joerg Wunsch
cb38bb6c36 Increase the PIO timeout to approximately the value it used to have
before rev 1.229 (~ 100 ms).  According to bde, some (old) broken
hardware could require it.  In order to make timing more accurate than
what could be achieved with a loop around DELAY(1), increase loop
timing after the initial ~ 1 ms.

Also, move the declaration of FDSTS_TIMEOUT out from fdreg.h into fd.c
where it actually belongs to.

MFC after:	2 days
2002-05-12 15:24:21 +00:00
Robert Watson
11e4779e45 Add a man page for the devinfo command; I'd argue devinfo is the single
most useful new command added to FreeBSD 5.0, but maybe that's just
me :-).

Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-12 14:23:15 +00:00
Hajimu UMEMOTO
88a89f8617 Recent zlib does not like Z_FLUSH at the end of inflate().
Reported by:	quak@mydiax.ch
Obtained from:	KAME
MFC after:	2 days
		and approved by re
2002-05-12 14:12:30 +00:00
David E. O'Brien
357228d788 Properly build lb1spc.asm on Sparc64. 2002-05-12 14:05:58 +00:00
David E. O'Brien
95cfc25d0d Back out last commit. I expect our bsd.*.mk gods to remove the need for
defining so many extra things in addition to INTERNALLIB.  We don't like
repetitive C code and we shouldn't for make code either.
2002-05-12 13:54:42 +00:00
David E. O'Brien
d43e78d0c7 There is no more NOLIB. 2002-05-12 13:49:14 +00:00
David E. O'Brien
5aa237561f Back out rev 1.118. 2002-05-12 13:48:53 +00:00
Benno Rice
608cd3ca29 More locking fixes. 2002-05-12 13:43:21 +00:00
Ruslan Ermilov
163c384f66 Document my willingness in maintaining share/mk infrastructure. 2002-05-12 13:41:28 +00:00
David E. O'Brien
428019989d Quiet the peanut gallary and back out magical "breakage". 2002-05-12 13:37:59 +00:00
David E. O'Brien
be60db5891 I was not strict enough with my ordering of things to satisfy make(1) nieve
symbol evaluation which causes it to be very sensitive to macro ordering.
2002-05-12 12:44:04 +00:00
David E. O'Brien
a0eb22834d Tidy up the cleanfiles. 2002-05-12 12:06:19 +00:00
David E. O'Brien
79c021244b Fixes for building a.out bits.
Submitted by:	bde
2002-05-12 12:01:12 +00:00
David E. O'Brien
0348e62146 Do as you want with GCC. 2002-05-12 11:45:35 +00:00
Brian Somers
189c2e0e07 Add a prototype for rad_get_vendor_attr().
Forgotten by:	brian
2002-05-12 10:53:00 +00:00
Dag-Erling Smørgrav
55589c84e2 Don't declare krb5_mcc_ops, it's already declared in <krb5.h> 2002-05-12 07:06:27 +00:00
Benno Rice
a397544c6b Do the correct locking on processes for DSI and ISI traps.
Copied from:	sparc64
2002-05-12 06:06:24 +00:00
Marcel Moolenaar
f5b454cf25 o Rename ia64_count_aps to ia64_count_cpus and reimplement the
function to return the total number of CPUs and not the highest
   CPU id.
o  Define mp_maxid based on the minimum of the actual number of
   CPUs in the system and MAXCPU.
o  In cpu_mp_add, when the CPU id of the CPU we're trying to add
   is larger than mp_maxid, don't add the CPU. Formerly this was
   based on MAXCPU. Don't count CPUs when we add them. We already
   know how many CPUs exist.
o  Replace MAXCPU with mp_maxid when used in loops that iterate
   over the id space. This avoids a couple of useless iterations.
o  In cpu_mp_unleash, use the number of CPUs to determine if we
   need to launch the CPUs.
o  Remove mp_hardware as it's not used anymore.
o  Move the IPI vector array from mp_machdep.c to sal.c. We use
   the array as a centralized place to collect vector assignments.
   Note that we still assign vectors to SMP specific IPIs in
   non-SMP configurations. Rename the array from mp_ipi_vector to
   ipi_vector.
o  Add IPI_MCA_RENDEZ and IPI_MCA_CMCV. These are used by MCA.
   Note that IPI_MCA_CMCV is not SMP specific.
o  Initialize the ipi_vector array so that we place the IPIs in
   sensible priority classes. The classes are relative to where
   the AP wake-up vector is located to guarantee that it's the
   highest priority (external) interrupt. Class assignment is
   as follows:
	class	IPI		notes
	x	AP wake-up	(normally x=15)
	x-1	MCA rendezvous
	x-2	AST, Rendezvous, stop
	x-3	CMCV, test
2002-05-12 05:54:21 +00:00
Alan Cox
47c3ccc467 o Acquire and release Giant in vm_object_reference() and
vm_object_deallocate(), replacing the assertion GIANT_REQUIRED.
 o Remove GIANT_REQUIRED from vm_map_protect() and vm_map_simplify_entry().
 o Acquire and release Giant around vm_map_protect()'s call to pmap_protect().

Altogether, these changes eliminate the need for mprotect() to acquire
and release Giant.
2002-05-12 05:22:56 +00:00
Scott Long
c52bf372f5 Update the PCI table as per Dell's fickleness.
MFC after:	3 days
2002-05-12 04:30:28 +00:00
Bruce Evans
0b94059ea3 Fixed 5 style bugs in VCS ids. 2002-05-12 04:02:57 +00:00
Mike Barcroft
b2c80b69eb Finish converting the rest of the function declaration and prototypes
to ANSI C.  Use new source ID scheme.
2002-05-12 03:56:34 +00:00
Bruce Evans
a8f9c5c794 Fixed printing the the strip binary's name in error messages. 2002-05-12 03:47:23 +00:00
Jacques Vidrine
95ba43303b Turn on the set-user-ID bit for k5su if ENABLE_SUID_K5SU is defined. 2002-05-12 03:17:31 +00:00
Giorgos Keramidas
96044fe8c3 CVS_RSH defaults to 'ssh' these days, and not 'rsh'.
PR:		docs/37429
Submitted by:	Martin v. Löwis <martin@v.loewis.de>
Reviewed by:	peter
2002-05-12 02:12:04 +00:00
Chris D. Faulhaber
c2fc1c7365 Remove _PATH_CP now that it is defined in paths.h
Reviewed by:	des
2002-05-12 01:52:11 +00:00
Brian S. Dean
73f899cae1 To perform even basic error checking, one must have an exit code that
indicates that not everything worked as expected.  Exit non-zero if we
timed out while transmitting or receiving a file or if the file did
not exist, etc.

MFC After:	3 days (re@ willing)
2002-05-12 01:47:50 +00:00
Dima Dorfman
11612afabe s/demon/daemon/ 2002-05-12 00:22:38 +00:00
Mike Barcroft
9828cf071d Remove some duplicate types that should have been removed as part of
the rearranging in the previous revision.

Pointy hat to:	cvs update (merging), mike (for not noticing)
2002-05-11 23:28:51 +00:00
Mike Barcroft
f605f8168e Document that <netinet/in.h> can also provide prototypes. Change
wording related to standards conformance.
2002-05-11 23:22:54 +00:00
Dima Dorfman
361817b059 demon -> daemon
Submitted by:	zhuravlev alexander <zaa@box.ulstu.ru>
2002-05-11 23:20:53 +00:00