Commit Graph

140 Commits

Author SHA1 Message Date
lukem 9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
ad 0565241b89 +#define _KERNEL
+#include <sys/types.h>
+#undef _KERNEL
2008-02-27 15:46:23 +00:00
dyoung d4f4828ee0 Do not #include <sys/device.h> from userland. 2008-02-11 22:43:39 +00:00
ad 64da32e634 Don't decode union vnodes or f_usecount. XXX A lot of this belongs to gdb. 2008-02-11 15:22:43 +00:00
ad 703069c0e9 specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.
2008-01-24 17:32:52 +00:00
ad 22f711b877 Remove reference to VI_XWANT - it will be gone soon. 2007-12-28 18:08:39 +00:00
dogcow f4c8a4cce7 Turns out we don't actually need to include <sys/namei.h>; since it causes
a compile error, away it goes.
2007-12-09 12:04:06 +00:00
ad c60c05b2ef TS_ASLEEP is gone. 2007-11-19 19:00:30 +00:00
briggs 644890e99d If we're printing totals, don't do all the work of allocating and
copying down the vnodes.
2007-10-20 01:38:45 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
christos 9e211aafa1 Kill MFSNAMELEN 2007-07-17 21:50:07 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
he 5bf65cf9c2 Because this program has _KERNEL defined while including some files,
it now needs <stdbool.h> due to the arm ports.  Longer-term, this
program probably ought to be converted so that it no longer needs
to define _KERNEL.
2007-03-04 17:57:20 +00:00
daniel 83aa19e1b0 Correctly retrieve information from an ext2fs inode's dinode. Fixes
PR 21302.

Ack by christos.
2007-01-06 23:06:18 +00:00
xtraeme d9e9fef5b7 More NQNFS fallout (hi yamt!). 2006-12-28 04:17:51 +00:00
christos 9a150e0221 revert debug flags I accidentally committed before. 2006-12-05 03:52:02 +00:00
christos 11c53ad61c kill crypto/rmd160.h and crypto/sha2.h, and instead make symlinks to
/usr/include from /usr/include/sys. This makes all the one way hash
header handling identical.
2006-10-30 20:22:53 +00:00
reinoud 0ce809091d Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.
2006-10-20 18:58:12 +00:00
christos fb0d335338 Coverity CID 3377: Fix memory leak on error. 2006-05-25 01:49:30 +00:00
elad 35ad67c75e Fix off-by-one found by Coverity, CID 1485. 2006-03-17 21:01:02 +00:00
elad 7d1c72d85d Fix off-by-one found by Coverity, CID 1486. 2006-03-17 20:48:09 +00:00
rpaulo 0dc4f15121 Don't print swap information when reading from kernel dumps. Fixes PR
13418 by Andrew Doran <ad@netbsd.org>.
2005-09-11 16:09:51 +00:00
rpaulo 3f51653817 de-__P() and use ANSI function declarations. 2005-09-02 21:26:47 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
christos 68a1fbb811 catch up with kernel's constification. 2005-05-30 07:24:31 +00:00
christos b30695cd1d Use the array of dtype names instead of hand-rolling our own. 2004-12-18 08:43:35 +00:00
snj edb93b858a Bump date for last, new sentence, new line, and kill an extra space. 2004-12-09 06:57:19 +00:00
matt d337725eb3 When dumping the file entry, print the usecount and iflags too. 2004-12-09 01:14:59 +00:00
jdc d853cbbaf4 Make pstat -f work on sparc by adjusting the offset of the buffer passed
to sysctl in getfiles().

XXX: Possibly the correct fix is to make sysctl() not return an array which
contains structs with different alignment constraints.
2004-02-22 12:30:11 +00:00
mrg 61b5ab403f bump date for previous 2003-12-21 02:52:02 +00:00
mrg 9bf440d20b support "-g" and "-m" as well as "-k" and "-h". swapctl & swaplist code
from Martin Weber, adapted for pstat by myself.
2003-12-20 13:31:42 +00:00
mrg 5fd013c40d add a "-h" (humanize_number(3)) option to swapctl(8) and pstat(8), from
Martin Weber in PR#23805.

ps: now we only need someone to do ls(1) :-)
2003-12-20 11:22:25 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
mrg 3b06b649fe revert previous 2003-02-11 00:45:02 +00:00
mrg dcd2b71575 no need for "pstat -T" to copyout() the entire vnode list , which can
take a Long Time on systems with large numbers of vnodes.
2003-02-10 23:58:27 +00:00
christos acc1cc5b41 undo mallocvar.h change! 2003-02-02 02:25:50 +00:00
tron 083ed45586 Include "sys/mallocvar.h" with "_KERNEL" defined in time to avoid
build failure because MALLOC_DECLARE() is not defined.
2003-02-01 21:05:54 +00:00
simonb d7b879c6ec Grrr. So much for my ability to use grep(1) effectively. Pointed out
by Stephen Degler in private mail.
2003-01-20 07:12:12 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
christos 11e29bdcef don't use hand-rolled MNT_FLAGS 2002-12-11 22:19:58 +00:00
jdolecek 01188cb460 constify structs, print also pipes for -f 2002-11-06 09:32:26 +00:00
agc e66e457180 <sys/map.h> is no more - don't try to include it. 2002-09-26 21:30:30 +00:00
lukem 17d72c8a6b use NETBSDSRCDIR as appropriate 2002-09-18 03:54:26 +00:00
enami 878dd0cd17 For pstat -f and -t, make header align with actual data on LP64 system. 2002-02-24 02:02:59 +00:00
enami c4f3ebe67c Make flag bit to character conversion table driven. 2002-02-23 01:06:41 +00:00
enami ae68f729ab Don't use same character for different flags. 2002-02-22 11:25:37 +00:00
enami dd20cf834b Use getprogname(). 2002-02-22 05:43:20 +00:00
enami 53ada2a18e Always free memroy allocated by loadvnodes(). 2002-02-22 05:21:01 +00:00
enami c31a571ef9 Forgot to fix header for union/layer vnode. 2002-02-22 05:04:43 +00:00