jmallett [Tue, 7 May 2002 18:32:18 +0000 (18:32 +0000)]
Add a -i option to sed(1) to do inplace editing, to give us an alternative to
Perl for such things. The key difference to Perl is that a backup extension
*MUST* be specified, because on one hand it isn't recommended to have options
which optionally take a parameter, and on the other hand, it'd be slightly
unpleasent to implement proper handling for that.
The difference between this and the version posted to developers@ is that it
does handle multiple files in argv after the getopt(3) handling "correctly",
in that the inplace editing-specific code has been moved out to a function,
and that function is used beyond the first file in our linked list.
This option has been documented as FreeBSD-specific in the manpage.
imp [Tue, 7 May 2002 18:16:39 +0000 (18:16 +0000)]
MFOpenBSD: ibss and ibss-master.
ibss is the modern ad-hoc mode. ibss-master is the same, except that
it creates the ibss network. This distinction is necessary because
some supported cards (symbol) support the former without supporting
the latter.
A seprate commit will introduce a demo-adhoc mode so that we can
disentwingle the multiple, mutually exclusive meandings of adhoc in
the present state of affairs.
keichii [Tue, 7 May 2002 16:50:15 +0000 (16:50 +0000)]
This is two new entries for Taiwanese 16bit PCMCIA cards.
The Blue Concentric CF 802.11b card is a compactflash form-factored card
that does 802.11b, including 128bit encryption.
The Zonet modem pccard is a simple FAX/Modem card.
Both are sold in Guang-Hua Market in Taipei, and functions perfectly
with -current and -stable.
Added internal, non-recursive (SUBDIR) versions of the `all-man'
and `maninstall' targets. This fixes the issue where each subdir
was descended into twice during "make all", and also resurrects
the standardization of `maninstall'.
marcel [Tue, 7 May 2002 05:52:27 +0000 (05:52 +0000)]
o Add ar.lc to the pcb.
o Create pcb_save as the backend for savectx and cpu_switch.
o While here, use explicit bundling for pcb_save and optimize
for compactness (~87% density).
o Not part of the commit is a backend pcb_restore. restorectx()
still jumps halfway into cpu_switch().
jeff [Tue, 7 May 2002 02:44:06 +0000 (02:44 +0000)]
Switch from just holding the interlock to holding the standard lock throughout
getnewvnode(). This is safer. In the future, we should investigate requiring
only the interlock to get the vnode object.
alfred [Mon, 6 May 2002 19:31:28 +0000 (19:31 +0000)]
Make funsetown() take a 'struct sigio **' so that the locking can
be done internally.
Ensure that no one can fsetown() to a dying process/pgrp. We need
to check the process for P_WEXIT to see if it's exiting. Process
groups are already safe because there is no such thing as a pgrp
zombie, therefore the proctree lock completely protects the pgrp
from having sigio structures associated with it after it runs
funsetownlst.
Add sigio lock to witness list under proctree and allproc, but over
proc and pgrp.
ume [Mon, 6 May 2002 16:28:25 +0000 (16:28 +0000)]
Revised MLD-related definitions
- Used mld_xxx and MLD_xxx instead of mld6_xxx and MLD6_xxx according
to the official defintions in rfc2292bis
(macro definitions for backward compatibility were provided)
- Changed the first member of mld_hdr{} from mld_hdr to mld_icmp6_hdr
to avoid name space conflict in C++
This change makes ports/net/pchar compilable again under -CURRENT.
iwasaki [Mon, 6 May 2002 10:55:42 +0000 (10:55 +0000)]
Add suspend/resume code mostly merged from fxp/rl driver.
This is temporary hack, better and generalized solution probably
should be implemented at lower layer(MII or PCI?).
Tested by: shoko.araki@soliton.co.jp
MFC after: 1 week
alc [Mon, 6 May 2002 06:20:04 +0000 (06:20 +0000)]
o Header files shouldn't depend on options: Provide prototypes
for uiomoveco(), uioread(), and vm_uiomove() regardless
of whether ENABLE_VFS_IOOPT is defined or not.
jeff [Mon, 6 May 2002 04:47:43 +0000 (04:47 +0000)]
Hold the currently selected vnode's lock across the call to VOP_GETVOBJECT.
Don't try to create a vm object before the file system has a chance to finish
initializing it. This is incorrect for a number of reasons. Firstly, that
VOP requires a lock which the file system may not have initialized yet. Also,
open and others will create a vm object if it is necessary later.
tjr [Mon, 6 May 2002 04:33:04 +0000 (04:33 +0000)]
Affect the first of stdin, stdout and stderr that is attached to a terminal.
Write status information to stdout instead of stderr.
Exit status when an error occurs musn't be 1, that is reserved for
indicating that messages are disabled.
These changes bring mesg(1) up to SUSv3 conformance.
jmallett [Mon, 6 May 2002 03:38:28 +0000 (03:38 +0000)]
-I and -J both set the same variable, replstr, to the string to replace with
a line of input, and both work differently, so prevent them from both being
passed to xargs(1).
bde [Mon, 6 May 2002 03:13:08 +0000 (03:13 +0000)]
Include <sys/queue.h> so that this file provides its own namespace
pollution which is required for its includes of <sys/_lock.h> and
<sys/_mutex.h> to work.
- Properly initialize the count_win when the user turns the info window
back on (and count_win is recreated).
- Create info_win as the same size for all invocations.
bde [Mon, 6 May 2002 00:05:44 +0000 (00:05 +0000)]
Restored db_elf.c from the Attic. This will be used for a quick fix for
the longstanding brokenness of symbols in ddb at boot time. It doesn't
compile and is not attached to the build yet.
alc [Sun, 5 May 2002 22:42:40 +0000 (22:42 +0000)]
o Condition the compilation of uiomoveco() and vm_uiomove()
on ENABLE_VFS_IOOPT.
o Add a comment to the effect that this code is experimental
support for zero-copy I/O.
chris [Sun, 5 May 2002 22:09:12 +0000 (22:09 +0000)]
Begin to turn some of the code in this man page into documentation.
Move the code that I have not yet finished documenting into the
`IMPLEMENTATION NOTES' section.
Sponsored by: DARPA, NAI Labs
Obtained from: TrustedBSD Project
luigi [Sun, 5 May 2002 21:34:10 +0000 (21:34 +0000)]
Fix a couple of problems which could cause panics at runtime:
+ setting a bandwidth too large for a pipe (above 2Gbit/s) could
cause the internal representation (which is int) to wrap to a
negative number, causing an infinite loop in the kernel;
+ (see PR bin/35628): when configuring RED parameters for a queue,
the values are not passed to the kernel resulting in panics at
runtime (part of the problem here is also that the kernel does
not check for valid parameters being passed, but this will be
fixed in a separate commit).
These are both critical fixes which need to be merged into 4.6-RELEASE.
sobomax [Sun, 5 May 2002 21:03:25 +0000 (21:03 +0000)]
New feature: allow origins of all dependencies be recorded into package list
using new `@comment DEPORIGIN:...' directive. This would allow us to make
many neat things including:
- easier binary upgrades;
- source upgrades without using external tools by simply extending
bsd.port.mk and pkg_install tools;
- mixed-mode upgrades (source + binary);
- depreciate and deorbit silly +REQUIRED_BY files in the near future.
This feature is no-op until appropriate bsd.port.mk patch is committed, and
even when it is already committed packages generated will remain 100%
compatible with old set of pkg_install tools (module all those neat
features, of course).
sobomax [Sun, 5 May 2002 20:50:27 +0000 (20:50 +0000)]
In a origin lookup mode (-O) don't bail out when encountering empty package
directory, because this prevent this option from being used from the
package-depends target of bsd.port.mk since it creates such empty dir
during its normal operation.
luigi [Sun, 5 May 2002 20:43:27 +0000 (20:43 +0000)]
Bring in a slightly older version of usr/bin/passwd which does not
require libpam and all the libraries that libpam brings in.
We have no room for those on picobsd images.
mux [Sun, 5 May 2002 13:47:21 +0000 (13:47 +0000)]
Add a KERNELDUMPMAGIC_CLEARED macro to unbreak savecore. Since
it is a "magic" value, what it expands to is not really important.
I set it to "Cleared Kernel Dump", but that can be changed later
if someone thinks it's not good enough.
jmallett [Sun, 5 May 2002 06:42:44 +0000 (06:42 +0000)]
Modify the -p implementation to use a user's locale, so they can respond to
the prompt in their native language.
Also make the prompt fit what POSIX asks for (?...).
This should not affect use of -p with yes(1) [as every locale I know of matches
'y' as YESEXPR as well], but that's what -t is for anyway. -p is meant to be
really used interactively.
alc [Sun, 5 May 2002 05:36:28 +0000 (05:36 +0000)]
o Remove GIANT_REQUIRED from vm_map_lookup() and vm_map_lookup_done().
o Acquire and release Giant around vm_map_lookup()'s call
to vm_object_shadow().
jmallett [Sun, 5 May 2002 04:42:50 +0000 (04:42 +0000)]
Check for possible overflow from sysconf _SC_ARG_MAX and error out in a
correct manner. Revert my incorrect change to use err(3) for malloc(3)
failing. Use a size_t variable to store the size of the argument buffer
we allocate, and remove silly casts as the result of having this around.
Modify the math in some of the paranoid checks for buffer overflow to
account for the fact we now are dealing with the actual size of the
buffer. Remove the static qualifier for arg_max, and the bogus setting
of it to -1.
Include <limits.h> for the definitions we use to check for possible
overflows.
bde [Sun, 5 May 2002 04:33:09 +0000 (04:33 +0000)]
Fixed breakage of binary compatibility of the kern.clockrate sysctl in
sys/time.h rev.1.53, etc. Zero out the entire struct clkinfo and not
just the new spare part of it so that there is no possibility of leaking
kernel stack context to userland.
bde [Sun, 5 May 2002 03:19:48 +0000 (03:19 +0000)]
Fixed checking for VM86 mode in doreti which I broke in rev.1.30. Only
the case of VM86 calls from the kernel was broken, so this bug was not
a security hole.
PR: 36710
Submitted by: David Xu <davidx@viasoft.com.cn> (version for RELENG_4)
MFC after: 3 days
jmallett [Sun, 5 May 2002 02:46:53 +0000 (02:46 +0000)]
In an effort to make this utility easier to work with at a source level, move
out the parse loop to a seperate function, and move local variables around as
is needed. To keep the state of some variables and keep from having huge arg
lists to functions, make a bunch global.
Change use of err(3) in situations where malloc(3) will be setting errno to
errx(3) since assuming malloc(3) sets errno is non-portable, and provides no
more useful information in the context of FreeBSD.
Submitted by: bde (err/errx), Carl Schmidt <cschmidt@slackerbsd.org> (some
of the movement of the input loop to a function)
Approved by: src/tools/regression/usr.bin/xargs