Commit Graph

8697 Commits

Author SHA1 Message Date
imp
48aadec12a Some systems need the types defined in sys/types.h, but lack the
sys/types.h polution  that FreeBSD  has in one  of its  include files.
Since  this  is  a  bootstrap  tool, include  more  than  is  strictly
necessary for FreeBSD.
2007-12-29 05:15:54 +00:00
des
5679753564 List all environment variables supported by libfetch, along with a reference
to the fetch(3) man page.

MFC after:	1 week
2007-12-28 19:47:37 +00:00
edwin
3919ec2a10 Add the ability to clean up all shared memory segments which are
unused in one go.

From the original PR:

	I've observed that linux apps running under the linuxulator
	have a habit of leaving behind shared memory segments which
	are unused, but which eventually cause the system to run
	out of free segments and these apps will stop working.
	ipcrm(1) currently only allows removal of unused message
	queues, shared memory segments and semaphores on an individual
	basis, or those having a matching (non-zero) key. However
	it would often be convenient to just do a complete cleanup
	of everything, usually as root.

PR:		bin/118292
Submitted by:	Callum Gibson <callumgibson@optusnet.com.au>
Not reviewed by:	grog@
Approved by:	grog@
2007-12-25 00:52:24 +00:00
imp
88bf38f550 usbhidctl appears to not report features and write size correctly
This turns out to be due to an argument botch for hid_report_size.
The PR contained patches to fix the argument botch.

Submitted by: Maurice Castro
PR: usb/118915
2007-12-21 03:40:36 +00:00
ru
97f09b1799 Fix disorder introduced in previous commit. 2007-12-20 16:40:25 +00:00
phk
15fcf19d2f Pull ministat into the installed system and write it a man-page.
(Repocopied from src/tools/tools/ministat)
2007-12-20 10:17:07 +00:00
ru
ff8db90dd7 Fix printing of the number of syncache entries added. 2007-12-18 12:07:10 +00:00
edwin
75ddc3d235 Stylify ipcs/ipcs.c and ipcrm/ipcrm in preparation of the upcoming
changes as proposed in bin/118292.

Feel free to mention any I have missed, there is much to learn with
regarding to style(9).

Approved by:	grog@
2007-12-18 09:39:47 +00:00
maxim
9251d75b01 o Fix a holiday to reflect a reality.
Submitted by:	Andrey V. Elsukov
MFC after:	1 week
2007-12-17 07:36:39 +00:00
edwin
172a6bf061 Give a better description when a install of multiple files fails
because of the absence of a destination directory or if the
"destination directory" is not a directory.

PR:		bin/11826
Submitted by:	Denis Eremenko <moonshade@pnhz.kz>
Approved by:	grog@
X-MFC after:	various freezes
2007-12-14 08:46:57 +00:00
peter
8348a2e294 Add the -H, -h and -P flags to vmstat. -P causes per-cpu output of
user/system/idle stats.  -h feeds the memory column through
humanize_number() to reduce the amount of column overflowing.  -H turns
this off.  -h is turned on by default if stdout is a tty.
2007-12-13 02:36:11 +00:00
rwatson
8bc41fcc02 Add 'COMM' column to a few more output modes of procstat(1). The only
one it's missing from is the VM display, where there's really not room,
and the file output display is looking quite cramped.
2007-12-10 20:55:43 +00:00
imp
3f2bc4767d Use a clever definition of __FBSDID to allow building on !FreeBSD systems. 2007-12-09 16:48:51 +00:00
jhb
2e2fe0271f Add several missing comma's in the fancy syscall parsing case before
some arguments that are parsed (e.g., semctl command names).

MFC after:	3 days
2007-12-06 08:49:43 +00:00
rwatson
6d8cbbd3e8 Display per-thread command line in TDNAME field for -k and -t; if
no per-thread name is available or the name is identical to the
process name, display "-" instead.  Very slightly shrink the COMM
entry to make a bit more room, although this doesn't help with
stack traces much.

Suggested by:	thompsa
2007-12-03 21:21:15 +00:00
rwatson
b039548864 Connect procstat(1) to the build. 2007-12-02 23:32:03 +00:00
rwatson
88563131a0 Add procstat(1), a process inspection utility. This provides both some
of the missing functionality from procfs(4) and new functionality for
monitoring and debugging specific processes.  procstat(1) operates in
the following modes:

  -b  Display binary information for the process.
  -c  Display command line arguments for the process.
  -f  Display file descriptor information for the process.
  -k  Display the stacks of kernel threads in the process.
  -s  Display security credential information for the process.
  -t  Display thread information for the process.
  -v  Display virtual memory mappings for the process.

Further revision and modes are expected.

Testing, ideas, etc:	cognet, sam, Skip Ford <skip at menantico dot com>
			Wesley Shields <wxs at atarininja dot org>
2007-12-02 23:31:45 +00:00
philip
1c2ba698b3 Add a cross-reference to newgrp(1).
Every time I need newgrp, I forget its name but I remember it's like
login for groups - newgrp(1) already cross-references login(1).

MFC after:	2 days
2007-11-30 11:02:36 +00:00
jb
769c37d0ba Remove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSD
headers. All OpenSolaris compatibility comes via the set of specific
compatibility headers in src/compat/opensolaris and
src/sys/compat/opensolaris.
2007-11-28 22:58:09 +00:00
fjoe
5864a96165 Fix -jX when makefiles are remade. 2007-11-25 20:43:27 +00:00
avatar
5fe104598e Nuking the temporary pointer once it is properly tracked in local storage.
This should fix the double free() bug where there's no tailing newline(\n)
character:

	current# echo -n test | tail
	testAssertion failed: (run->magic == ARENA_RUN_MAGIC), function
	arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2448.
	Abort (core dumped)

Reviewed by:	kib
MFC after:	3 days
2007-11-22 01:51:46 +00:00
jb
5582e69034 These are the things that the tinderbox has problems with because it
doesn't use the default CFLAGS which contain -fno-strict-aliasing.

Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.
2007-11-20 02:07:30 +00:00
jb
9b945d63ed Generate code that doesn't fail gcc 4.2's strict aliasing test. 2007-11-20 01:46:12 +00:00
jb
218b125e30 Reduce the WARNS levels in a couple of places so that we can enable
-Werror at higher WARNS levels like we did before gcc4 was imported.
2007-11-18 00:29:36 +00:00
jb
804a2cd238 Use variable types which match the function prototypes. 2007-11-17 23:21:38 +00:00
delphij
12ee5edf2f Resolve conflicts; Update defines.h to reflect latest change. 2007-11-16 22:24:31 +00:00
se
1746409d96 Fix (uncritical) potential buffer overflow: the length of "buf" was not
extended when "jaiL" was added to fmt_flags().
MFC after:	1 week
2007-11-15 07:31:11 +00:00
ru
f026c7be94 - Steal short description from POSIX; it's more technical and was
easier to translate.
- Fix some markup nits.
2007-11-13 11:34:20 +00:00
jhb
ae69575f80 write(1) needs to strip off the leading /dev/ from the tty name for the
current tty as returned from ttyname(3) so it can try to avoid writing to
the current tty if possible.  Previously, it did this by trimming off any
leading directory (effectively performing a basename(3) on the path
returned from ttyname(3)).  However, this chopped off too much of the path
for ttys who have directories in their name such as pts(4).  Instead, just
strip off the leading /dev/ from the path returned by ttyname(3).  This
fixes write(1) when using pts(4).

MFC after:	1 week
Reported by:	rwatson
2007-11-12 20:02:21 +00:00
ru
3cba516a54 Fix a typo. 2007-11-09 16:31:47 +00:00
ru
6ac82cfa9e - Fix documentation to match code. Specifically, -c doesn't have
to be specified together with either -u or -t to have an effect,
  and exit status of 2 is not possible after a Perl->C conversion.

- While here, fix markup.
2007-11-09 16:02:10 +00:00
ru
1a8465da88 Fix numerous bugs when parsing options and arguments. 2007-11-09 15:14:08 +00:00
dds
5ea072fa21 Use static storage-class specifier where appropriate.
Found by: CScout
2007-11-08 11:13:03 +00:00
dds
bb2ff1033f Make function's definition follow its declared visibility.
Found by: CScout
2007-11-08 09:09:02 +00:00
dds
8f74341105 Fix visibility of "inplace".
Found by: CScout
2007-11-08 08:57:51 +00:00
kevlo
cb1577dadc setenv(3) sets errno on failure, use warn() instead
Pointed out by: ru
2007-11-08 01:24:31 +00:00
rafan
0e5790193d - Include runefile.h for _CACHED_RUNES 2007-11-07 14:46:22 +00:00
ru
29dcd05010 Markup nits. 2007-11-07 07:59:38 +00:00
ru
cec1358ab6 Fix markup. 2007-11-07 07:56:57 +00:00
kevlo
80e691eb7f Check return value for setenv() 2007-11-06 10:35:50 +00:00
lulf
c55024b789 - Add ZFS-support to fstat(1). This allows ZFS-filsystems to be including in
the open file-listing. It is added as a separate source file, so it can
  respect WITH_/WITHOUT_CDDL as compile-flags.
- The warnlevel of the Makefile was decreased to quell solaris #pragma
  warnings.
- Expect that fstat(1) doesn't work with kernel compiled with
  DEBUG_VFS_LOCKS/DEBUG_LOCKS for now.

Approved by:	pjd (mentor)
2007-11-05 23:15:03 +00:00
charnier
f991a17523 initialize variables, WARNS=6 compliant 2007-11-02 18:06:51 +00:00
ru
ecd0890251 Markup revision. 2007-11-02 12:07:07 +00:00
brix
f99a913488 Add my birthday to the calendar.
Approved by:	erwin (mentor)
2007-11-01 21:56:09 +00:00
ru
c98af9169a Also fix a "blank line" issue that sneaked in from rev. 1.19.
Submitted by:	John Hein
2007-10-31 19:26:01 +00:00
yar
402e21e0f9 Give more details on the following topics:
o How global, command-line, and environment variables relate.
o What peculiarities the -f option has WRT ${MAKEFLAGS}.
2007-10-31 08:20:09 +00:00
ru
21b82a0c29 Remove newly acquired hard sentence breaks. 2007-10-30 19:23:42 +00:00
ru
cfcb49a9b0 Apply style(9) to usage(), fix markup of the manpage. 2007-10-30 17:49:00 +00:00
kevlo
9a9592dceb Never use getenv("HOME") without checking for NULL and non-zero
Obtained from: OpenBSD
2007-10-30 03:44:10 +00:00
julian
11e1aa0d18 Introduce a way to make pure kernal threads.
kthread_add() takes the same parameters as the old kthread_create()
plus a pointer to a process structure, and adds a kernel thread
to that process.

kproc_kthread_add() takes the parameters for kthread_add,
plus a process name and a pointer to a pointer to a process instead of just
a pointer, and if the proc * is NULL, it creates the process to the
specifications required, before adding the thread to it.

All other old kthread_xxx() calls return, but act on (struct thread *)
instead of (struct proc *). One reason to change the name is so that
any old kernel modules that are lying around and expect kthread_create()
to make a process will not just accidentally link.

fix top to show  kernel threads by their thread name in -SH mode
add a tdnam formatting option to ps to show thread names.

make all idle threads actual kthreads and put them into their own idled process.
make all interrupt threads kthreads and put them in an interd process
(mainly for aesthetic and accounting reasons)
rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper'

man page fixes to follow.
2007-10-26 08:00:41 +00:00