Ian Dowse [Sun, 22 Jul 2001 18:58:44 +0000 (18:58 +0000)]
Attach the miibus for Linksys/Dlink cards from the attach routine,
not from the probe routine. This was an oversight when I originally
ported the miibus support to -current, though it was mostly harmless.
We now set the vendor code to the new value ED_VENDOR_LINKSYS in
ed_pccard_Linksys() at probe time. Then ed_pccard_attach() checks
the vendor code, and sets up the miibus if appropriate.
Matthew Dillon [Sun, 22 Jul 2001 18:47:31 +0000 (18:47 +0000)]
As per further discussions on hackers redo the SIGCHLD patch to not generate
an unexpected user-visible side effect with the sigaction flags. Also cleanup
a minor union issue.
Submitted by: Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
MFC addendum: MFC will be combined w/ original commit
MFC after: 3 days
- Fix "off by one" error in VT_WAITACTIVATE. Correctly accept
0 as meaning the requesting vty.
- Accept 0 as the requesting vty in VT_ACTIVATE as in VT_WAITACTIVE.
Ian Dowse [Sun, 22 Jul 2001 12:17:51 +0000 (12:17 +0000)]
Fix some bugs and general brain damage in mounttab:
- Declare mtabhead as an extern in mounttab.h and define it only in
mounttab.c.
- Remove shared global `verbose' and instead pass it as a parameter.
- Remove the `mtabp' argument to read_mtab(). It served no purpose
whatsoever, although read_mtab() did use it as a temporary local
variable.
- Don't check for impossible conditions when parsing mounttab, and
do detect zero-length fields.
- Correctly test for strtoul() failures - just testing ERANGE is wrong.
- Include a field name in syslog errors, and avoid passing NULL to
a syslog %s field.
- Don't test if arrays are NULL.
- If there are duplicates when writing out mounttab, keep the last
entry instead of the first, as it will have a later timestamp.
- Fix a few formatting issues.
Update rpc.umntall and umount to match the mounttab interface changes.
Change the errx() example. Error messages passed to the err(3)
functions shouldn't have the first word capitalized, and shouldn't
have a period at the end. This is how most of our programs, and most
(all?) of the 4.4BSD programs, are. In the past, we've even done
sweeps to change things to comply to this.
Don't put a shell prompt in the example since none of the other man
pages do it. Also, don't use brackets to indicate optional options in
the example; instead, add a paragraph below the example explaining it.
Crist J. Clark [Sun, 22 Jul 2001 06:40:11 +0000 (06:40 +0000)]
Error messaging in ipfw(8) was out of hand, almost 50 lines of usage
information for any command line error, the actual error message
almost always (and sometimes irretrievably) lost scrolling off the top
of the screen. Now just print the error. Give ipfw(8) no arguments for
the old usage summary.
Thanks to Lyndon Nerenberg <lyndon@orthanc.ab.ca> for the patch and
PR, but I had already done this when ru pointed out the PR.
Ian Dowse [Sun, 22 Jul 2001 01:25:25 +0000 (01:25 +0000)]
Fix a selection of bugs, and improve code layout:
- Remove unnecessary and unused local variables.
- Include useful information in error and warning messages.
- Fix the logic for expiring mounttab entries.
- Remove calls to getaddrinfo - the results were not used.
- Simplify some string handling by using snprintf.
- Fix usage.
Rename the -w option to be -W. The recently-added -w option is different
than the long-standing -w option in NetBSD, so change it before anyone in
FreeBSD gets used to it. For now, -w is still accepted, but prints out
some warnings via syslog.
Ian Dowse [Sun, 22 Jul 2001 00:45:29 +0000 (00:45 +0000)]
Include the remote hostname in RPC-related warning messages. Exit
immediately if a host specified by the -h flag cannot be parsed
instead of attempting to unmount all NFS filesystems, which was
bad.
Add a missing return statement at the end of checkname(); this
could result in a non-zero exit status in some cases even if the
unmount succeeded.
Group two separate NFS-related operations into one block to make
it more obvious that a variable (hostp) is not dereferenced when
uninitialised. Initialise it to NULL anyway to avoid a warning.
Pass in the read_mtab()'s bogus argument as NULL instead of messing
with a local variable to achieve the same effect. A later commit
will clean up this mounttab interface.
- Allow link-local multicast traffic for client.
- Allow ICMPv6 destination unreach, packet too big and NS/NA.
- RIPng also uses link-local to link-local.
David E. O'Brien [Sat, 21 Jul 2001 17:55:38 +0000 (17:55 +0000)]
I think this is OK for PC98, someone please check.
As was done to i386/boot_crunch.conf:
+ Build with `lint' defined to cut out some of the `rcsid's (binaries' code
only, the libs will still have the `rcsid's in them).
+ mount_mfs is OBE.
+ Do not need libipx as I have conditionally diked that functional out of
ifconfig(8).
David E. O'Brien [Sat, 21 Jul 2001 17:38:46 +0000 (17:38 +0000)]
Fix the install kernel on a 1.44MB floppy again.
I had to be aggressively Draconian to succeed.
I diked out:
+ Multia, NoName, PC/EB 64, Aspen Alpine support.
+ SCSI tape support
+ AMI MegaRAID controller support
+ All parallel bus support (includes PLIP)
+ vx (3c590, 3c595), pcn (AMD Am79C97x PCI 10/100), sf (Adaptec AIC-6915),
sis (SiS 900/SiS 7016), ste (Sundance ST201 (D-Link DFE-550TX)),
wb (Winbond W89C840F) support.
If the removal of any of this support causes heartburn, please let me know.
David E. O'Brien [Sat, 21 Jul 2001 17:28:21 +0000 (17:28 +0000)]
+ Build with `lint' defined to cut out some of the `rcsid's (binaries' code
only, the libs will still have the `rcsid's in them).
+ mount_mfs is OBE.
+ Do not need libipx as I have conditionally diked that functional out of
ifconfig(8).
David E. O'Brien [Sat, 21 Jul 2001 17:26:55 +0000 (17:26 +0000)]
+ Build with `lint' defined to cut out some of the `rcsid's (binaries' code
only, the libs will still have the `rcsid's in them).
+ mount_mfs is OBE.
+ The Alpha install does not support SLIP, PCCARD or USB installs; so we do
not need the associated userland utils.
+ Do not need libipx as I have conditionally diked that functional out of
ifconfig(8).
Another hangup bugfix from Juha:
Problem 1 is that the config entry hangup flag is zeroed only at
CONNECT_ACTIVE_IND in msghdl.c. If any (other) call is disconnected
after EV_MDO and before CONNECT_ACTIVE_IND, the cleanup routine will
disconnect the in-progress dialout as well, if its hangup flag is
nonzero (which it is likely to be) after the previous incarnation of the
cfg entry. Patch-1 fixes this by clearing the hangup flag as soon as a
cfg entry is reserved for the call.
Fix hangup bug; Juha writes:
Problem 2 is that doing a local hangup (eg. by writing "H" to the
dialout device) to a call which is already disconnected results in isdnd
moving the cfg entry to an illegal state, from which there is no
recovery. This is tricky because there is no way to synchronize local
hangup with the remote end (ie. the callee can always hang up at an
inconvenient time)! Hence, patch-2 alters fsm.c's EV_DRQ state table
such that the local hangup request is processed or ignored in most
states, even for disconnected calls.
Ian Dowse [Sat, 21 Jul 2001 15:38:37 +0000 (15:38 +0000)]
Change the foreground mount behaviour so that we keep retrying
forever by default. This matches what mount_nfs did before revision
1.40, and it is the generally expected behaviour for NFS mounts.
Document the current defaults near the start of the man page and
mention the options that can be used to change them.
Add a patch from the isdn mailinglist, Juha writes:
ppp in 4.x apparently does a close(2) after opening the tun device;
i4brunppp starts up with only file descriptors 0 and 1 open (to the rbch
device) -> tun gets opened as 2 -> tun gets closed -> later use results
in EBADF. A quick fix to i4brunppp.c makes the thing work (I know, this
is ugly, but I needed it up quick...):
After being port- and addressscanned continously from several sources where
my line stayed open for more than eight hours i decided to implement a
maximum connection time; see keyword maxconnecttime in the manual page.
David E. O'Brien [Sat, 21 Jul 2001 05:01:50 +0000 (05:01 +0000)]
Show an example of how to sort a file listing by size. Hopefully this
will reduce the number of people calling for this functionality to be
added to ls(1).
Mike Smith [Sat, 21 Jul 2001 04:04:03 +0000 (04:04 +0000)]
The API for loading tables changed (we no longer explicitly search for the
RSDP, it's now found via a callback).
AcpiOsSleepUsec() went away, use AcpiOsSleep() instead (we could use
AcpiOsStall() too)
AcpiFormatException() was changed to make more sense (it behaves like
our old acpi_strerror() did), so throw acpi_strerror() away (still
#defined in acpivar.h though, we need to sweep these seperately).
Mike Barcroft [Fri, 20 Jul 2001 16:44:44 +0000 (16:44 +0000)]
o Add phantom's gethostinfo() function to reduce duplicated code.
o Increase readability by creating a wrapper for asprintf(3).
o Cast isdigit(3) argument to unsigned char for future locale
changes.
Submitted by: phantom
Reviewed by: -audit, des
Approved by: des
Return consistent key action codes at key press and release
events. Otherwise you would see unexpected results if shift or
locking keys are defined to give different actions depending
on other shift/locking keys' state.
Please keep the ukbd module and the kernel in sync, otherwise
the USB keyboard won't work after this change.
MFC after: 10 days
Ruslan Ermilov [Fri, 20 Jul 2001 12:02:30 +0000 (12:02 +0000)]
More potential buffer overflow fixes.
o Fixed `nfrontp' calculations in output_data(). If `remaining' is
initially zero, it was possible for `nfrontp' to be decremented.
Noticed by: dillon
o Replaced leaking writenet() with output_datalen():
: * writenet
: *
: * Just a handy little function to write a bit of raw data to the net.
: * It will force a transmit of the buffer if necessary
: *
: * arguments
: * ptr - A pointer to a character string to write
: * len - How many bytes to write
: */
: void
: writenet(ptr, len)
: register unsigned char *ptr;
: register int len;
: {
: /* flush buffer if no room for new data) */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: if ((&netobuf[BUFSIZ] - nfrontp) < len) {
: /* if this fails, don't worry, buffer is a little big */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: netflush();
: }
:
: memmove(nfrontp, ptr, len);
: nfrontp += len;
:
: } /* end of writenet */
David E. O'Brien [Fri, 20 Jul 2001 06:20:32 +0000 (06:20 +0000)]
Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
Jonathan Chen [Fri, 20 Jul 2001 06:00:02 +0000 (06:00 +0000)]
Fix setting serial baud rate under ibcs2 emulation by moving a line to the
right place. Reported by Jonathan Chen <jonc@pinnacle.co.nz> (someone with
the same name who's not me)
Jason Evans [Fri, 20 Jul 2001 04:23:11 +0000 (04:23 +0000)]
Implement pthread_attr_[gs]etguardsize(). Non-default-size stacks used to
be malloc()ed, but they are now allocated using mmap(), just as the
default-size stacks are. A separate cache of stacks is kept for
non-default-size stacks.