Commit Graph

105170 Commits

Author SHA1 Message Date
Tim Kientzle
ee92911f48 My bad: /dev/sa0, no 'r'
Thanks (and many apologies) to: Cristoph Mallon
2004-07-21 06:43:10 +00:00
Marcel Moolenaar
026c3aaa60 Oops... Add the CS_OWN flag to the trace and where commands so that
db_stack_trace() actually has a chance to parse its own arguments.
2004-07-21 05:55:51 +00:00
Peter Wemm
5476633aed Semi-gratuitous change. Move two refcount operations to their own lines
rather than be buried inside an if (expression).  And now that the if
expression is the same in both exit paths, use the same ordering.
2004-07-21 05:08:10 +00:00
Marcel Moolenaar
fd32d93b97 Unify db_stack_trace_cmd(). All it did was look up the thread given
the thread ID and call db_trace_thread().
Since arm has all the logic in db_stack_trace_cmd(), rename the
new DB_COMMAND function to db_stack_trace to avoid conflicts on
arm.
While here, have db_stack_trace parse its own arguments so that
we can use a more natural radix for IDs. If the ID is not a thread
ID, or more precisely when no thread exists with the ID, try if
there's a process with that ID and return the first thread in it.
This makes it easier to print stack traces from the ps output.

requested by: rwatson@
tested on: amd64, i386, ia64
2004-07-21 05:07:09 +00:00
Marcel Moolenaar
3d4f313695 Add kdb_thr_from_pid(), which given a PID returns the first thread
in the process. This is useful when working from or with a process.
2004-07-21 04:49:48 +00:00
Alan Cox
09281f58ed Add some additional pmap locking and lock assertions. 2004-07-21 03:38:46 +00:00
Mike Silbersack
d895e295d0 Make this test compile again and remove its dependency on sys/pipe.h. 2004-07-21 03:13:53 +00:00
Mike Silbersack
a0c03350a3 An a #error discouraging people from using pipe.h from places outside
the kernel.
2004-07-21 03:11:41 +00:00
Mike Silbersack
27eabced44 Slide pipe.h include after the _KERNEL define in preparation for disallowing
non-_KERNEL inclusions of pipe.h
2004-07-21 03:07:50 +00:00
Peter Wemm
3f25cbddc2 Move the initialization and teardown of pmaps to the vmspace zone's
init and fini handlers.  Our vm system removes all userland mappings at
exit prior to calling pmap_release.  It just so happens that we might
as well reuse the pmap for the next process since the userland slate
has already been wiped clean.

However.  There is a functional benefit to this as well.  For platforms
that share userland and kernel context in the same pmap, it means that
the kernel portion of a pmap remains valid after the vmspace has been
freed (process exit) and while it is in uma's cache.  This is significant
for i386 SMP systems with kernel context borrowing because it avoids
a LOT of IPIs from the pmap_lazyfix() cleanup in the usual case.

Tested on:  amd64, i386, sparc64, alpha
Glanced at by:  alc
2004-07-21 00:29:21 +00:00
Olivier Houchard
f15c92cfe3 Implement ptrace_set_pc().
Add a stub for ptrace_clear_single_step().
2004-07-20 23:00:02 +00:00
Olivier Houchard
7e477511d8 Remove astpending, it has not been used for a long time. 2004-07-20 22:39:56 +00:00
Olivier Houchard
8db19c62a4 Uncomment the vector relocation code. 2004-07-20 22:39:24 +00:00
Olivier Houchard
be687a0dda Nuke disable_intr() and enable_intr(), as it already exists elsewhere. 2004-07-20 22:38:46 +00:00
Max Laier
ca64c799d4 When removing the last reference to a cloner, do not try to unlock twice -
esp. not since the backing memory was just freed.

Reviewed by:	rwatson
2004-07-20 21:44:28 +00:00
Robert Watson
2d01d331c6 M_PREPEND() the IP header on to the front of an outgoing raw IP packet
using M_DONTWAIT rather than M_WAITOK to avoid sleeping on memory
while holding a mutex.
2004-07-20 20:52:30 +00:00
Bill Paul
020732be39 *sigh* Fix source code compatibility with 5.2.1-RELEASE _again_.
(Make kdb stuff conditional.)
2004-07-20 20:28:57 +00:00
Christian S.J. Peron
ef6dea1404 Back out previous commit. Even though statfs(2) can take a regular
file as an argument, it may still fail for the same reasons that
open(2) can.

Pointed out by:	Jilles Tjoelker
Apporived by:	bmilekic (mentor)
2004-07-20 19:30:57 +00:00
Christian S.J. Peron
5b154abc54 Remove reference to ENOTDIR in the documented errors
for statfs(2). This is false, if the pathname specified
is a regular file, then the information for the file
system that the file lives on will be returned.

Approved by:	bmilekic (mentor)
2004-07-20 18:35:33 +00:00
Christian S.J. Peron
239c9e601a Currently if a mount point is not accessible by the calling user,
invalid information will be printed if the -t flag is specified.

$ df -t ufs
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s1a    495726   139944   316124    31%    /
/dev/ad0s1e    253678     6438   226946     3%    /tmp
/dev/ad0s1f  56206340 13594248 38115586    26%    /usr
/dev/ad0s1d    694126    19812   618784     3%    /var
/dev/ad0s1d    694126    19812   618784     3%    /var
$

Note that the mount point which is not accessible shows
up as the previous file system that was printed. The reason
for this is that df -t will call statfs(2) on the pathname
supplied by getfsstat(2).

This is done to refresh the file system statistics in the
event that a previous file system had a long delay in
providing its stats.

This change affects the df utility in the following ways:
o Teach df has to deal with statfs(2) failing. If statfs(2)
  fails, fall back on the possibly stale stats provided by
  the initial call to getfsstat(2).
o Print a warning that the fs stats could possibly be stale
o Modify the man page and document this new behavior
  as a bug.

Approved by:	bmilekic (mentor)
PR:		68165
2004-07-20 18:24:47 +00:00
Julian Elischer
be4252b367 Slight cosmetic changes.
Also introduce a macro to be called by persistent nodes to signal their
persistence during shutdown to hide this mechanism from the node author.

Make node flags have a consistent style in naming.

Document the change.
2004-07-20 17:15:38 +00:00
Hartmut Brandt
01f679a25f The natm sub-command was missing in the TOC of the helpfile. 2004-07-20 16:50:57 +00:00
Poul-Henning Kamp
2d084f1168 Remove reference to fla driver. 2004-07-20 16:25:20 +00:00
Ollivier Robert
bdd2dc6381 Forced to commit to add:
Tested on:	amd64 (sledge), sparc64 (panther), IA-64 (pluto1), alpha (beast)

in addition to my own machine running 5.2-CURRENT.
2004-07-20 15:54:53 +00:00
Ollivier Robert
a6feea2410 Remove an extra '}'. 2004-07-20 15:51:00 +00:00
Ollivier Robert
c98323078d Add missing Makefile from previous commit. 2004-07-20 15:45:04 +00:00
Ollivier Robert
6cb84f0c29 Update our ntpd to the long awaited 4.2.0 version.
This bring us several things:
- updated drivers
- IPv6 support at last
- ntp-genkeys is replaced by ntp-keygen
- ntptrace is now a script (courtesy of John Hay)
- lots of renamed files from .htm to .html (while I prefer .html, I
  find the change a bit gratuitous)
- still no manpages :(

Please test and report.

Commit very much helped by: GNU arch (http://gnuarch.org/)
2004-07-20 15:44:32 +00:00
Ollivier Robert
95d51a965d Update information on build/import. 2004-07-20 15:25:19 +00:00
Ollivier Robert
f0adf7f5cd Merge conflicts.
Lots of added files, some removed and quite a large number of renames :(
2004-07-20 15:19:51 +00:00
Ollivier Robert
4a0fa52fa0 Merge conflicts (see also previous commit).
Reinsert our local changes to ntp_control.c:

1.4:    Do not log every potential exploit attempt since a denial-of-service
        may result
1.5:    int -> unsigned char fixes
2004-07-20 15:18:31 +00:00
Ollivier Robert
9ab5ee2e96 Revert this file to the vendor version, we don't need to have our own
version of it.  Will help further upgrades.
2004-07-20 15:15:00 +00:00
Ollivier Robert
3e986f5ba8 This commit was generated by cvs2svn to compensate for changes in r132451,
which included commits to RCS files with non-trunk default branches.
2004-07-20 15:01:56 +00:00
Ollivier Robert
9c2daa00c2 Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
Gleb Smirnoff
c1eec6c589 In ng_device_newhook():
- Return meaningful return errorcodes.
  - Free previously allocated connection in error cases.

In ng_device_rcvdata():
  - Return meaningful return errorcodes.
  - Detach mbuf from netgraph item, and free the item before
    doing any other actions that may return from method.
  - Do not call strange malloc() for buffer. [1]
  - In case of any error jump to end, where mbuf is freed.

In ng_device_disconnect():
  - Return meaningful return errorcodes.
  - Free disconnected connection.

style(9) in mentioned above functions:
  - Remove '/* NGD_DEBUG */', when only one line is ifdef'ed.
  - Remove extra braces to easier reading.
  - Add space after comma in function calls.

PR:		kern/41881 (part)
Reviewed by:	marks
Approved by:	julian (mentor)
2004-07-20 13:16:17 +00:00
Gleb Smirnoff
31578ac8ae Add ng_device(4) to LINT.
Reviewed by:	marks
Approved by:	julian (mentor)
2004-07-20 12:42:54 +00:00
Gleb Smirnoff
b3e3ef9836 1. Make ng_device.h system include. This fixes module build.
2. Sort includes, while here.
3. s/NULL/0/ in NG_SEND_MSG_HOOK(), since ng_ID_t is integer.

PR:		kern/41881 (part)
Reviewed by:	marks
Approved by:	julian (mentor)
2004-07-20 11:19:46 +00:00
Doug Rabson
2f8e2ebbe2 Temporary fix for interoperability with Windows and OS X. A more complete
fix will follow when its ready.

Submitted by: simokawa
2004-07-20 08:58:27 +00:00
Lukas Ertl
e231995bb9 Fix typos.
PR:            misc/67586
Submitted by:  Paul A. Hoadley <paulh@logicsquad.net>
2004-07-20 08:32:42 +00:00
Lukas Ertl
2a5395ddef Fix whitespace and punctuation.
PR:            misc/49967
Submitted by:  Sean C. Farley <sean-freebsd@farley.org>
2004-07-20 08:28:28 +00:00
Tim J. Robbins
f9ceea9bf1 Call __mbrtowc() and __wcrtomb() directly instead of taking detours
through mbrtowc() and wcrtomb().
2004-07-20 08:27:27 +00:00
Lukas Ertl
efd0e5f49e Remove duplicate fortunes and fix some typos.
PR:            misc/45839
Submitted by:  Philipp Mergenthaler
               <philipp.mergenthaler@stud.uni-karlsruhe.de>
2004-07-20 08:19:51 +00:00
Hartmut Brandt
91540c5b62 Improve make's diagnostic of mistmatched .if-.endif. This patch is
slightly different from the patch in the PR. The problem is, that
make handles .if clauses inside false .if clauses simply by
counting them - it doesn't put them onto the conditional stack, nor even
parses them so we need an extra line number stack for these ifs.

PR:		bin/61257
Submitted by:	Mikhail Teterin <mi@aldan.algebra.com>
2004-07-20 07:42:06 +00:00
Mike Silbersack
9fb02d624f Add a simple regression test for the stat st_size bug just fixed in
sys_pipe.c
2004-07-20 07:17:19 +00:00
Marcel Moolenaar
1701be6ed4 o Support the REL32LSB relocation. It's in the ELF file from which
we construct the EFI image. It doesn't seem to actually end up
   in the EFI image, AFAICT.
o  Replace .quad, .long and .short with data8, data4 and data2 resp.
   The former are gnuisms.
o  Redefine _start_plabel as a data16 with @iplt(_start) as its
   value. This is the preferred way to create user PLT entries.
2004-07-20 07:11:14 +00:00
Mike Silbersack
eb3d2c61b4 Fix a minor error in pipe_stat - st_size was always reported as 0
when direct writes kicked in.  Whether this affected any applications
is unknown.
2004-07-20 07:06:43 +00:00
Marcel Moolenaar
8af8df6452 Fix the creation of EFI images that got broken by the import of
binutils 2.15. The linker now creates a .rela.dyn section for
dynamic relocations, while our script created a .rela section.
Likewise, we copied the .rela section to the EFI image, but not
the .rela.dyn section. The fix is to rename .rela to .rela.dyn
in the linker script so that all relocations end up in the same
section again. This we copy into the EFI image.
2004-07-20 07:01:02 +00:00
Alan Cox
fb7ed0f9cc The previous revision introduced a compilation error, i.e., the use of an
undefined variable.  Correct this error.
2004-07-20 06:32:32 +00:00
Tim J. Robbins
2c61418d05 Use warn() instead of perror(). 2004-07-20 05:52:00 +00:00
Hidetoshi Shimokawa
f9d9941f2d Don't output too many debug messages for bootverbose.
This driver seems to be fairly stable now.
2004-07-20 04:49:44 +00:00
Hidetoshi Shimokawa
f77993e5e0 Initialize ifp->if_output for FreeBSD-4. 2004-07-20 04:29:33 +00:00