Commit graph

75257 commits

Author SHA1 Message Date
Juli Mallett 8a4f086026 Use function prototypes. 2002-05-22 12:31:40 +00:00
Ruslan Ermilov a8b6785203 PSD:19 (curses) is long dead. 2002-05-22 11:58:34 +00:00
Ruslan Ermilov b004c713cf Unencumber. 2002-05-22 11:57:29 +00:00
Ruslan Ermilov 37d1dbf01d Build sccs(1) docs. 2002-05-22 11:55:47 +00:00
Ruslan Ermilov 3111860520 19.curses wasn't encumbered, it's just dead. 2002-05-22 11:45:23 +00:00
Juli Mallett 5fed7e7311 Clean up formatting. 2002-05-22 11:29:21 +00:00
Juli Mallett 27ffa61f2a Replace the evil that is __DECONST() with (void *). This is one of the least
evil things we can do involving the const qualifier and a pointer.

Submitted by:	bde, ru
2002-05-22 11:16:48 +00:00
Juli Mallett d7853f431e Make sccs(1) compile cleanly by fixing syntax errors such as #endif followed
by a token, and by including headers to get prototypes for many things, and
also by spelling the type of structure readdir(3) returns as "dirent".
2002-05-22 11:10:03 +00:00
Ruslan Ermilov f6ce5895a9 Unroff all forms of \f and \*, and the simplest form of \s.
Submitted by:	fenner, ru
Reviewed by:	ru, fenner
2002-05-22 11:08:41 +00:00
Ruslan Ermilov 79273cd77c Revision 1.39 made filtering of CFLAGS unnecessary. 2002-05-22 11:03:35 +00:00
Juli Mallett 61252e89e7 Revive the SCCS front-end, sccs(1), back from the Attic, since it's something
SUS wants (they want the entire suite of SCCS commands, we don't have them,
but we *had* the frontend, so we can have it again, and now).

Add $FreeBSD$ where appropriate, don't revive PSD.doc/spell.ok.
2002-05-22 10:43:50 +00:00
Ruslan Ermilov 718daeaaf1 Fixed build of recently added legacy docs.
Reviewed by:	grog
2002-05-22 10:41:12 +00:00
Ruslan Ermilov 0c2fe74da8 Added share/doc/[pu]sd entries.
Reviewed by:	grog
2002-05-22 10:38:25 +00:00
Maxim Sobolev 6950a26a50 Eliminate free'ing already freed chunks.
MFC after:	1 week
2002-05-22 10:33:25 +00:00
Tim J. Robbins b9f6304141 Build pathchk(1). 2002-05-22 10:32:24 +00:00
Tim J. Robbins c78c4633a2 Add the pathchk utility, which checks pathnames for validity or
portability between POSIX systems.

Submitted by:	Chuck Rouillard (manpage, initial implementation)
2002-05-22 10:30:16 +00:00
Bruce Evans fba2e6106f Quick fix for non-unique inode numbers for hard links. We use the
byte offset of the directory entry for the inode number for all types
of files except directories, although this breaks hard links for
non-directories even if it doesn't cause overflow.  Just ignore this
broken inode number for stat() and readdir() and return a less broken
one (the block offset of the file), so that applications normally can't
see the brokenness.

This leaves at least the following brokenness:
- extra inodes, vnodes and caching for hard links.
- various overflow bugs.  cd9660 supports 64-bit block numbers, but we
  silently ignore the top 32 bits in isonum_733() and then drop another
  10 bits for our broken inode numbers.  We may also have sign extension
  bugs from storing 32-bit extents in ints and longs even if ints are
  32-bits.  These bugs affect DVDs.  mkisofs apparently limits them
  by writing directory entries first.

Inode numbers were broken mainly in 4.4BSD-Lite2.  FreeBSD-1.1.5 seems
to have a correct implementation modulo the overflow bugs.  We need
to look up directory entries from inodes for symlinks only.  FreeBSD-1.1.5
use separate fields (iso_parent_extent, iso_parent) to point to the
directory entry.  4.4BSD-Lite doesn't have these, and abuses i_ino to
point to the directory entry.  Correct pointers are impossible for
hard links, but symlinks can't be hard links.
2002-05-22 08:50:18 +00:00
Bruce Evans 2dd0744cbe Include <sys.systm.h> for the declaration of some atomic functions -- don't
depend on namespace pollution in <sys/mutex.h>.
2002-05-22 06:26:44 +00:00
Tim J. Robbins 09086b0499 Bring back the cd -L and -P options from revision 1.24, but try harder not
to fail when the logical current directory no longer exists. Allow changes
to absolute paths when logical cwd is invalid, fall back to physical cd
if logical cd fails.
2002-05-22 05:15:53 +00:00
Tim J. Robbins baf3e7c14b Temporarily back out revision 1.24; it seems to handle the case where the
current directory no longer exists incorrectly and breaks `make cleandir'.
2002-05-22 03:29:20 +00:00
Marcel Moolenaar 76a0f0f560 o Add records for PCI bus and PCI device errors.
o  Rename mem_platform_id to mem_oem_id.
o  Minor style fixes.
2002-05-22 02:25:06 +00:00
Marcel Moolenaar 504de8da7e Don't build doc on ia64. No groff in sight. 2002-05-22 01:04:42 +00:00
Alan Cox 03adb816d7 o Make contigmalloc1() static. 2002-05-22 01:01:37 +00:00
Robert Watson ddbbc9628d Permit alternative break sequence to break to debugger in GENERIC. Breakage
of serial break on -CURRENT seems rampant for some reason, and I like
being able to get into ddb.

Reviewed by:	peter
2002-05-21 23:35:51 +00:00
John Baldwin 703fc290fb Add appropriate IA32 "pause" instructions to improve performanec on
Pentium 4's and newer IA32 processors.  The "pause" instruction has been
verified by Intel to be a NOP on all currently existing IA32 processors
prior to the Pentium 4.
2002-05-21 22:26:35 +00:00
Andrew R. Reiter ec41816009 - td will never be NULL, so the call to soalloc() in socreate() will always
be passed a 1; we can, however, use M_NOWAIT to indicate this.
- Check so against NULL since it's a pointer to a structure.
2002-05-21 21:30:44 +00:00
John Baldwin 0e54ddadd9 Fix an old cut 'n' paste bug inherited from BSD/OS: don't increment 'i'
twice once we are in the long wait stage of spinning on a spin mutex.
2002-05-21 21:27:05 +00:00
Andrew R. Reiter 1515cd22e1 - OR the flag variable with M_ZERO so that the uma_zalloc() handles the
zero'ing out of the allocated memory.  Also removed the logical bzero
  that followed.
2002-05-21 21:18:41 +00:00
John Baldwin e6302957fe Whitespace fixup, properly indent the body of an else clause. 2002-05-21 21:13:27 +00:00
John Baldwin 2498cf8c42 Add code to make default mutexes adaptive if the ADAPTIVE_MUTEXES kernel
option is used (not on by default).

- In the case of trying to lock a mutex, if the MTX_CONTESTED flag is set,
  then we can safely read the thread pointer from the mtx_lock member while
  holding sched_lock.  We then examine the thread to see if it is currently
  executing on another CPU.  If it is, then we keep looping instead of
  blocking.
- In the case of trying to unlock a mutex, it is now possible for a mutex
  to have MTX_CONTESTED set in mtx_lock but to not have any threads
  actually blocked on it, so we need to handle that case.  In that case,
  we just release the lock as if MTX_CONTESTED was not set and return.
- We do not adaptively spin on Giant as Giant is held for long times and
  it slows SMP systems down to a crawl (it was taking several minutes,
  like 5-10 or so for my test alpha and sparc64 SMP boxes to boot up when
  they adaptively spinned on Giant).
- We only compile in the code to do this for SMP kernels, it doesn't make
  sense for UP kernels.

Tested on:	i386, alpha, sparc64
2002-05-21 20:47:11 +00:00
Poul-Henning Kamp a05068c0d6 Update to match kernel side.
Sponsored by: DARPA & NAI Labs.
2002-05-21 20:42:51 +00:00
John Baldwin e8fdcfb57a Optimize spin mutexes for UP kernels without debugging to just enter and
exit critical sections.  We only contest on a spin mutex on an SMP kernel
running on an SMP machine.
2002-05-21 20:34:28 +00:00
Poul-Henning Kamp 07107de9bc Introduce the concept of "magic spaces", and implement them in most of
the relevant classes.

Some methods may implement various "magic spaces", this is reserved
or magic areas on the disk, set a side for various and sundry purposes.
A good example is the BSD disklabel and boot code on i386 which occupies
a total of four magic spaces: boot1, the disklabel, the padding behind
the disklabel and boot2.  The reason we don't simply tell people to
write the appropriate stuff on the underlying device is that (some of)
the magic spaces might be real-time modifiable.  It is for instance
possible to change a disklabel while partitions are open, provided
the open partitions do not get trampled in the process.

Sponsored by:	DARPA & NAI Labs.
2002-05-21 20:33:49 +00:00
Juli Mallett 21b8b7cb3c Make ReadMakefile() operate using the realpath(3) name for the file handed to
it, which means that relative paths will be expanded to absolute paths, and
filenames without a path will end up with their absolute path included as
well.  This aids tremendously in debugging a build using our make(1) with
multiple Makefile's, such as when there is a syntax error in a file in a
sub-directory as per <bsd.subdir.mk>.  Normally we'd end up with just
"Makefile" known about the Makefile in question, which means that an error
would be useless for someone trying to debug their build system, now we
end up with a complete real pathname for the Makefile.

So mostly this is useful in a debugging context, but possibly others too
(I haven't thought of them yet, but they probably are more useful if you
make Dir_FindFile use realpath(3), but that's another story).

Reviewed by:	-current
MFC after:	2 weeks
2002-05-21 20:24:46 +00:00
John Baldwin bb0d293f15 Add an inline function cpu_pause() for the IA32 'pause' instruction. 2002-05-21 20:21:53 +00:00
Poul-Henning Kamp 3abe4a80a5 Remove the "-class" suffix from classes, they will not be ambiguous.
Sponsored by:	DARPA & NAI Labs.
2002-05-21 19:50:04 +00:00
Andrew R. Reiter db40007d42 - Change the newly turned INVARIANTS #ifdef blocks (they were changed from
DIAGNOSTIC yesterday) into KASSERT()'s as these help to increase code
  readability.
2002-05-21 18:52:24 +00:00
Hajimu UMEMOTO 720bbc8244 Allow prefix/prefixlen syntax for IPv6 to have consistency
with IPv4.
2002-05-21 18:11:31 +00:00
Semen Ustimenko 96b825e7ca Fix null_lock() not unlocking vp->v_interlock if LK_THISLAYER.
Reviewed by:	bp@FreeBSD.org
MFC after:	1 week
2002-05-21 18:07:33 +00:00
Tom Rhodes 69cc776cd6 Reword a small part of the uniq(1) manual page to help reduce word
duplication (ie: fields fields).

PR:		38161
Reviewed by:	keramida
MFC after:	3 days
2002-05-21 16:54:58 +00:00
Ruslan Ermilov 66c795d4f4 Added support for ia64 and sparc64. 2002-05-21 15:36:29 +00:00
Yoshihiro Takahashi 93bb160832 Fixed to conflict labels.
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
2002-05-21 12:53:48 +00:00
Yoshihiro Takahashi 9b96eed728 Remove unneeded ## for GCC 3.1 2002-05-21 12:50:20 +00:00
Hajimu UMEMOTO 188450c746 Have RTF_HOST for /128 destionation. 2002-05-21 11:43:53 +00:00
Brian Somers 3eaa768da0 Mention our support of the authentication side of rfc2548 2002-05-21 10:54:07 +00:00
Yoshihiro Takahashi b827692436 MFi386: revision 1.22 2002-05-21 09:44:52 +00:00
Mark Murray 95f435e76a Remove ptx. It is not used anywhere in the base system, has not been
maintained for years and is very old code. If there is any need for
it, I suspect that ports would be a better place.

No objection from:	current@freebsd.org
2002-05-21 09:20:34 +00:00
Peter Wemm 1f777d8747 Do not guess what a bool is, just use it. 2002-05-21 08:34:18 +00:00
Peter Wemm 42d4025c74 Make this a little easier to build standalone. (same change as libpanel) 2002-05-21 07:08:30 +00:00
Peter Wemm 3e1a1dd23d This commit was generated by cvs2svn to compensate for changes in r97055,
which included commits to RCS files with non-trunk default branches.
2002-05-21 06:52:47 +00:00