Commit Graph

80119 Commits

Author SHA1 Message Date
bde
0971ab9cee Removed unused includes. Sorted includes. This is part of removing
includes of <sys/user.h> for its pollution only.  <sys/user.h> wasn't
even used for its pollution here.
2002-09-15 17:45:10 +00:00
bde
8dff83c125 Garbage-collected splmem.
Moved the declaration of malloc_mtx to be with the other extern declarations
and not exposed to userland.

Fixed some minor style bugs.
2002-09-15 17:10:18 +00:00
nectar
ddc260dae6 Check for truncation in calls to res_send/res_query/res_search.
Fail when it is detected.
2002-09-15 16:51:09 +00:00
bde
8194dc2df5 Removed most namespace pollution in this header: don't include <vm/uma.h>;
include <sys/_mutex.h> and its prerequisites instead of <sys/mutex.h> and
its prerequisite.
2002-09-15 16:48:25 +00:00
phk
9a217ae1b4 Try to pick up disk geometry with specific DIOC* ioctls, rather than
expecting a bogo-disklabel to contain them, if possible.

This makes fdisk work with GEOM.
2002-09-15 16:08:52 +00:00
dwmalone
59050f45ff Add "-t" to useage message and comment. (The -t option was added
independently by Robert, but also proposed in the PR below).

PR:		38126
Submitted by:	Josh Elsasser <jre@vineyard.net>
MFC after:	1 month
2002-09-15 15:37:50 +00:00
dwmalone
01d68c5499 Some BIOSs are using MTRR values that are only documented under NDA
to control the mapping of things like the ACPI and APM into memory.

The problem is that starting X changes these values, so if something
was using the bits of BIOS mapped into memory (say ACPI or APM),
then next time they access this memory the machine would hang.

This patch refuse to change MTRR values it doesn't understand,
unless a new "force" option is given. This means X doesn't change
them by accident but someone can override that if they really want
to.

PR:		28418
Tested by:	Christopher Masto <chris@netmonger.net>,
		David Bushong <david@bushong.net>,
		Santos <casd@myrealbox.com>
MFC after:	1 week
2002-09-15 15:07:55 +00:00
bde
d23b2860a9 Define __LONG_LONG_SUPPORTED if the compiler claims to support C99.
Don't set __LONG_LONG_SUPPORTED for gcc-1.  I didn't check exactly
when gcc started to support long long, but it was in the version
of gcc in FreeBSD-1.0 (gcc-2.4.5).

Other C99 features should be ifdefed similarly, but the ifdefs for
old versions of gcc will be more complicated since the features
weren't in all versions of gcc-2.
2002-09-15 14:17:29 +00:00
bde
f5f46cde54 Include <sys/systm.h> instead of depending on namespace pollution 2
layers deep in <sys/malloc.h> or 1 layer deep in <net/if_var.h>.
2002-09-15 13:54:12 +00:00
phk
40ec1b09ed Some change in src/share/mk seems to have made it possible to remove
50% of the active ingredients in these Makefiles.
2002-09-15 13:05:42 +00:00
phk
93735d8b70 Remove the unused _bio_buf field. I can't even remember if this ever got
to be used in the first place.

Spotted by:	bde
2002-09-15 12:50:37 +00:00
anholt
52547ba41c Fix i810 after i830 commit.
Submitted by:	David Dawes <dawes@XFree86.Org>
2002-09-15 08:43:23 +00:00
tjr
238ea7422c Add wcstod() as a wrapper around strtod(). It does not handle any characters
that strtod() does not (alternate digit characters, etc. are not handled).
2002-09-15 08:38:51 +00:00
bde
e57a5c8c76 Fixed breakage from removing the used include of <sys/buf.h> in the
previous commit:
Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of
depending on namespace pollution in <sys/buf.h>.  Only do this in the
__FreeBSD_version > 500000 case although the __FreeBSD_version < 500000
case has already rotted.
2002-09-15 08:21:14 +00:00
tjr
489b832ffc Use the heap instead of the stack to store temporary multibyte string
buffers; this is slower but safer for threaded programs where threads
often have relatively low stack size limits.
2002-09-15 08:06:17 +00:00
jmallett
f4e166beb1 Make a comment reflect less of a lie, NOCPU is used to generally mean that we
are not on a specific CPU in a distributed system, certainly not just for
<struct proc>.p_oncpu, which is of course now <struct kse>.ke_oncpu.
2002-09-15 04:45:56 +00:00
nectar
a1dc11dea2 Backout the increase of MAXPACKET from 1024 to 65536: it
broke pthreads.

Reported by:	mbr, tjr
2002-09-15 04:23:20 +00:00
phk
13b79249d5 Un-inline the non-trivial "trivial" bio* functions.
Untangle devstat_end_transaction_bio()
2002-09-14 19:34:11 +00:00
imp
754c0de72b Add additional information returned to userland by the device querying
functions.  We add pnpinfo, locationinfo, devflags (the newbus flags
on the device), flags (the flags that device_get_flags returns) and
state to the list of things we return.

pnpinfo and locationinfo are place holders at the moment that will be
filled in by the device's parent (optionally).  Userland programs will
likely use this information from time to time and take appropriate
actions.

Improvements to devinfo to follow.
2002-09-14 19:15:12 +00:00
phk
1ae06a8866 remove #includes of <sys/bio.h> where not needed. 2002-09-14 18:59:32 +00:00
phk
f4c7558a39 FreeBSD -current doesn't need <sys/buf.h> or <sys/bio.h>. 2002-09-14 18:58:36 +00:00
njl
1fd3d6b2a8 Move setugidsafety() call outside of process lock. This prevents a lock
recursion when closef() calls pfind() which also wants the proc lock.
This case only occurred when setugidsafety() needed to close unsafe files.

Reviewed by:	truckman
2002-09-14 18:55:11 +00:00
njl
cac9d702dd Userland changes to go with vnode->v_tag change. 2002-09-14 18:51:10 +00:00
tmm
3c56a83b9c Use the macros from machine/fsr.h; some minor cleanups. 2002-09-14 18:07:03 +00:00
tmm
4d4159680a Add implementations of fpgetmask(), fpgetround(), fpgetsticky(),
fpsetround(), fpsetsticky(), obtained from NetBSD and tweaked a little
to use definitions from machine/fsr.h instead of magic numbers.
2002-09-14 18:06:21 +00:00
tmm
cabad00231 Use the definitions in machine/fsr.h instead of duplicating these magic
numbers here (the values need to correspond to the %fsr ones for some
libc functions to work right).
2002-09-14 18:00:44 +00:00
tmm
69561af496 Clean up a bit, and add some more macros to access %fsr fields. 2002-09-14 17:58:54 +00:00
ume
5e6cb71dd6 Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.
Obtained from:	KAME
2002-09-14 17:28:40 +00:00
scottl
ecfa9b22f9 kthread.h is not needed 2002-09-14 16:54:46 +00:00
mux
9eba69e40a Removed a debugging printf() left here in peter's
last commit.

Spotted by:	kris
2002-09-14 15:14:29 +00:00
mux
0edd293481 Remove a conditional #include <sys/kernel.h>, it is already
included unconditionally before.

Submitted by:	Olivier Houchard <cognet@ci0.org>
2002-09-14 14:44:41 +00:00
tmm
6a56880f71 Return an error if a symbol is not found in reloc_jmpslots() instead of
crashing.
2002-09-14 12:14:24 +00:00
njl
a4849fcf1b Remove all use of vnode->v_tag, replacing with appropriate substitutes.
v_tag is now const char * and should only be used for debugging.

Additionally:
1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK
2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which
is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP.

Suggested by:   phk
Reviewed by:    bde, rwatson (earlier version)
2002-09-14 09:02:28 +00:00
benno
015df72b79 Reference the socket we're accepting. 2002-09-14 08:56:10 +00:00
julian
df1a23d8ad Apparently something down in the guts of vm/uvm still needs giant
Obtained from:	 mini via P4 KSE tree.
2002-09-14 06:23:43 +00:00
rwatson
ad1dfc4af7 s/VOP_NULL/VATTR_NULL/ 2002-09-14 03:32:57 +00:00
mjacob
f7e2a87f71 Put firewire under architectures it actually might conceivably
build on, let alone actually do some useful work on real hardware.

Namely, put it in i386/pc98. There is no bus_dma.h on the other architecures,
tra la.
2002-09-14 02:05:33 +00:00
archie
be0a5cec1b Relax checking of incoming PPTP GRE packets a bit: ignore a bogus payload
length field when there's no payload indicated by the header 'S' bit.
This works around semi-brokenness in the Mac OS X PPTP client.
2002-09-14 00:00:49 +00:00
nectar
15073701b7 When using res_send/res_query/res_search, the caller must either
insure enough space is available for the response, or be prepared
to resize the buffer and retry as necessary.

Do the conservative thing and make sure enough space is available.

Reviewed by:	silence on freebsd-audit
2002-09-13 20:31:29 +00:00
peter
6a7b636351 The nfsroot code should be conditional on NFSCLIENT, not NFS (which no
longer exists as an option)
2002-09-13 20:29:42 +00:00
gioria
abf35607f6 Begin of MFen 1.423 2002-09-13 20:23:26 +00:00
mike
8c75087c36 mlockall() and munlockall() are unimplemented; remove their prototypes. 2002-09-13 18:29:15 +00:00
peter
f4f01549c4 Promote gcore from i386-specific to the MI section.
Compiled on: alpha, sparc64, ia64
2002-09-13 18:29:08 +00:00
peter
42037c3273 Add #include <sys/queue.h> for sparc64's benefit. The MD includes there
have less polution.
2002-09-13 18:24:59 +00:00
peter
87f05db624 Use a crowbar to move the a.out code out of gcore.c and into its own
file so that we have a chance of using gcore on non-i386 platforms.  Use
linker sets to reduce the registration glue.  Remove md-sparc.c, we do not
have an a.out sparc32 port.  aoutcore.c was repocopied from gcore.c.
2002-09-13 16:33:35 +00:00
imp
9d63828364 For boot verbose, print resources assigned in a more asthetically pleasing
way.

PR: 42745 (although done in a different way)
2002-09-13 16:23:41 +00:00
tmm
1d61cc9f45 Add an implementation of fabs() (which is quite trivial).
When it is called directly, gcc is smart enough to generate inline
code for it, which is why it wasn't noticed before that it was missing.

fabs() would probably better fit into libm, but it has traditionally been
in libc on FreeBSD, so there is probably software around that makes
assumptions about this by now.
2002-09-13 16:01:26 +00:00
tmm
d66c55da46 Fix fcntl(..., F_GETOWN, ...) and fcntl(..., F_SETOWN, ...) on sparc64
by not passing a pointer to a register_t or intptr_t when the code in
the lower layers expects one to an int.
2002-09-13 15:15:16 +00:00
phk
8a81f86fab Overhaul the kernel-simulation bits here to use pthreads instead.
If somebody wanted to, this could for the beginning of a "libkernel"
which could be used to run kernel code in userland.

Sponsored by:	DARPA & NAI Labs.
2002-09-13 13:13:00 +00:00
ikob
3d1d3cb83b Add firewire module 2002-09-13 12:42:57 +00:00