Also do some markup fixes to recently-added items so that they don't
try to use entities for manpages that have been removed, in the spirit
of rev. 1.359.
Juli Mallett [Fri, 21 Jun 2002 10:56:44 +0000 (10:56 +0000)]
Clean up hex() and octal() to return and work with unsigned integers since
they scan values of unsigned types, and since they do not need otherwise,
have them take const char * arguments.
Mark Murray [Fri, 21 Jun 2002 10:14:57 +0000 (10:14 +0000)]
Modernise this code by rounding up the usual suspects: register keyword,
consts, ANSIfication of functions, proper use of __FBSDID() and so on.
This commit is non-functional from a code-execution perspective, but
pr(1) now compiles WARNS=6 clean.
Bruce Evans [Fri, 21 Jun 2002 09:57:34 +0000 (09:57 +0000)]
Don't say that an umounted filesystem is required for -n. An unmounted
filesystem is no more or less required for -n than for any other option.
The previous commit clarified the actual requirement.
Tim J. Robbins [Fri, 21 Jun 2002 07:08:34 +0000 (07:08 +0000)]
Newline characters should not participate in line comparisons. Only apparent
when -s is used or the last line of the file is missing a newline.
Noticed by the textutils test suite.
Kirk McKusick [Fri, 21 Jun 2002 06:18:05 +0000 (06:18 +0000)]
This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.
Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).
Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
Luigi Rizzo [Thu, 20 Jun 2002 21:29:55 +0000 (21:29 +0000)]
Add some #define's for mbuf annotations.
As the comment in the code says, eventually there will be a proper
data structure (e.g NetBSD's struct m_tag) to store chains of
annotations, and mbuf-handling procedures will handle these chains
in the correct way.
Right now, these chains do not exist, and we just use the constants
defined here to implement simple ad-hoc solutions to remove some global
variables used so far to pass around informations about packets
being processed.
Global variables are not only ugly and make the code unreadable, they
also prevent from using parallelism in network stack processing.
(the 3-days MFC only refers to this commit, i.e. the PACKET_TAG_*
constants; the full mechanism will be committed and MFC'ed on a
longer timescale).
Bruce A. Mah [Thu, 20 Jun 2002 21:19:49 +0000 (21:19 +0000)]
Provide a way to keep out old ("historic") release notes from bloating
the size of the rendered release notes. By default, any element with
a role="historic" attribute won't get rendered in the output unless
the INCLUDE_HISTORIC Makefile variable is defined.
Maxime Henrion [Thu, 20 Jun 2002 20:03:42 +0000 (20:03 +0000)]
Change the way we internally store the mount options to
a linked list. This is to allow the merging of the mount
options in the MNT_UPDATE case, as the current data structure
is unsuitable for this.
There are no functional differences in this commit.
Juli Mallett [Thu, 20 Jun 2002 19:51:13 +0000 (19:51 +0000)]
Fix a bug fixed by NetBSD in revision 1.42 of parse.c by christos which caused
an example Makefile I was showing someone just last night to report a variable
as being recursive.
Alan Cox [Thu, 20 Jun 2002 18:38:28 +0000 (18:38 +0000)]
o Remove an incorrect cast from obreak(). This cast would,
for example, break an sbrk(>=4GB) on 64-bit architectures
even if the resource limit allowed it.
o Correct an off-by-one error.
o Correct a spelling error in a comment.
o Reorder an && expression so that the commonly FALSE expression
comes first.
Maxim Sobolev [Thu, 20 Jun 2002 14:55:53 +0000 (14:55 +0000)]
Don't try to decode old-style options if the argv[1] begins with `-' and the
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:
$ ps -Ufoobar1234
the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.
Reported by: Vladimir Sotnikov <vovan@kyivstar.net>
MFC after: 2 weeks
Ian Dowse [Thu, 20 Jun 2002 14:03:36 +0000 (14:03 +0000)]
Display the mutex name in the ^T status line if the selected thread
is blocked on a mutex. Prepend a '*' to distinguish this case as
is done in top(1).
Juli Mallett [Thu, 20 Jun 2002 10:37:43 +0000 (10:37 +0000)]
It seems the hard lock on m4(1) is viewed as superfluous. Okay. It's gone.
I'm sick of waiting on OpenBSD to make a number of changes anyway. If someone
else wants to take over fixing m4(1), I'll be glad to make them aware of the
existing issues.
Bruce Evans [Thu, 20 Jun 2002 09:04:33 +0000 (09:04 +0000)]
Quick fix for the type of the bitmap in sigset_t. It was an array of
4 u_ints but needs to be an array of 4 uint32_t's to work, at least
if unsigned ints have less than 32 bits. It should be a non-array of
1 uint128_t on 128-bit machines, especially if u_int has 128 bits.
The headers that declare uint32_t (actually __uint32_t) are intentionally
not included here since this header should only be included by other
headers.
Fixed some style bugs (space instead of tab after #ifndef and #endif).
Peter Wemm [Thu, 20 Jun 2002 07:23:08 +0000 (07:23 +0000)]
Use suword16/fuword16 instead of susword/fusword - this has two different
definitions so far.. 16 bit on x86 and appears to be 32 bit on sparc64.
Be explicit to avoid suprises.
Juli Mallett [Thu, 20 Jun 2002 07:15:55 +0000 (07:15 +0000)]
Bogusness may have happened using a variable assignment here before, but
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.
Peter Wemm [Thu, 20 Jun 2002 07:08:43 +0000 (07:08 +0000)]
Remove UIO_USERISPACE - we do not support any split instruction/data
address space machines (eg: pdp-11) and are not likely to ever do so.
Nothing in our kernel sets this.
Tim J. Robbins [Thu, 20 Jun 2002 07:07:00 +0000 (07:07 +0000)]
Make it obvious that command line arguments may be specified for the utility
that is to be invoked on the command line. Use "utility" instead of "command"
in manual page and usage message for consistency with POSIX.
Peter Wemm [Thu, 20 Jun 2002 06:29:42 +0000 (06:29 +0000)]
Add boot_serial and boot_multicons variables to set RB_SERIAL and
RB_MULTIPLE since this seems to be the easiest way to add these flags
for non-forth loaders etc.
Peter Wemm [Thu, 20 Jun 2002 06:25:22 +0000 (06:25 +0000)]
panic rather than fault and explode if we fail to contigmalloc a kernel
stack. This is still bad(TM), but at least we have a clue when we get
hit when contigmalloc fails.
Peter Wemm [Thu, 20 Jun 2002 06:23:40 +0000 (06:23 +0000)]
Use the canonical pmap_{new,dispose,swapin,swapout}_proc() functions,
in this case cut/pasted from sparc64 instead of messing with
contigmalloc where it is not needed.
Peter Wemm [Thu, 20 Jun 2002 06:21:20 +0000 (06:21 +0000)]
Move the "- 1" into the RQB_FFS(mask) macro itself so that
implementations can provide a base zero ffs function if they wish.
This changes
#define RQB_FFS(mask) (ffs64(mask))
foo = RQB_FFS(mask) - 1;
to
#define RQB_FFS(mask) (ffs64(mask) - 1)
foo = RQB_FFS(mask);
On some platforms we can get the "- 1" for free, eg: those that use the
C code for ffs64().
Juli Mallett [Thu, 20 Jun 2002 06:00:51 +0000 (06:00 +0000)]
Use size_t consistently and complete some uncompleted code resulting in a
memory leak by assigning and freeing a variable appropriately as well as
keeping track of the amount of allocated ram properly.
Add a warning regarding the SENDMAIL_*_MC make.conf variable values.
Using /etc/mail/sendmail.mc will create /etc/mail/sendmail.cf during
a buildworld.
Alan Cox [Thu, 20 Jun 2002 02:04:55 +0000 (02:04 +0000)]
o Acquire and release the vm_map lock instead of Giant in obreak().
Consequently, use vm_map_insert() and vm_map_delete(), which expect
the vm_map to be locked, instead of vm_map_find() and vm_map_remove(),
which do not.
Peter Wemm [Thu, 20 Jun 2002 01:27:40 +0000 (01:27 +0000)]
Solve the 'unregistered netisr 18' information notice with a sledgehammer.
Register the ISR early, but do not actually kick off the timer until we
see some activity. This still saves us from running the arp timers on
a system with no network cards.
Jeff Roberson [Wed, 19 Jun 2002 23:49:57 +0000 (23:49 +0000)]
- Move the computation of pflags out of the page allocation loop in
kmem_malloc()
- zero fill pages if PG_ZERO bit is not set after allocation in kmem_malloc()
Andrew R. Reiter [Wed, 19 Jun 2002 21:25:59 +0000 (21:25 +0000)]
- Remove the lock(9) protecting the kernel linker system.
- Added a mutex, kld_mtx, to protect the kernel_linker system. Note that
while ``classes'' is global (to that file), it is only read only after
SI_SUB_KLD, SI_ORDER_ANY.
- Add a SYSINIT to flip a flag that disallows class registration after
SI_SUB_KLD, SI_ORDER_ANY.
Idea for ``classes'' read only by: jake
Reviewed by: jake
Jeff Roberson [Wed, 19 Jun 2002 20:49:44 +0000 (20:49 +0000)]
- Remove bogus use of kmem_alloc that was inherited from the old zone
allocator.
- Properly set M_ZERO when talking to the back end page allocators for
non malloc zones. This forces us to zero fill pages when they are first
brought into a cache.
- Properly handle M_ZERO in uma_zalloc_internal. This fixes a problem where
per cpu buckets weren't always getting zeroed.
Juli Mallett [Wed, 19 Jun 2002 18:57:04 +0000 (18:57 +0000)]
Add a test for what was fixed in revision 1.27 and 1.28 of make(1)'s var.c,
expansion of embedded variables in the left-hand-side of an assignment
expression, using the simplest case - hiding recursion using nil-expanded
variables.
Juli Mallett [Wed, 19 Jun 2002 17:39:36 +0000 (17:39 +0000)]
Fix a memory leak from previous commit by freeing the possibly expanded
string at the first opportunity, being sure to now always allocate the
new string from VarPossiblyExpand. Oops.