Nick Hibma [Sun, 13 Dec 1998 22:27:42 +0000 (22:27 +0000)]
Updated USB kernel sources to NetBSD sources of 1998-12-09.
1 bug fix and several textual changes.
Preparing to feed back changes for port into NetBSD to create one source base.
Don Lewis [Sun, 13 Dec 1998 07:07:51 +0000 (07:07 +0000)]
getpgid() and getsid() were doing a comparision rather than an assignment,
which is fortunate, because otherwise another bug would allow them to be
used to stomp on the syscall return value of another process.
Matthew Dillon [Sun, 13 Dec 1998 06:40:18 +0000 (06:40 +0000)]
PR: bin/9016
Fix bug with od/hd/hexdump. "*" lines are supposed to indicate one or
duplicates of the previous line, but a small file with less then 16
characters of zeros in it will be falsy identified as a repeat of
the (non-existant) previous line. i.e. the first line of output winds
up being a "*". Added a bit of code to handle the degenerate 'there is
no previous line' case for the first line.
Matthew Dillon [Sun, 13 Dec 1998 06:07:38 +0000 (06:07 +0000)]
PR: bin/5572
Prevent cron from going crazy if the time steps. For example, if you
have a system with hundreds of users and lots of different crontabs
and your time steps back an hour, the old cron would then attempt to
run an hours worth of cron jobs in a few seconds.
Matthew Dillon [Sun, 13 Dec 1998 03:42:51 +0000 (03:42 +0000)]
PR: bin/8680
Increase the size of a number of buffers and replace strcpy/strcat/sprintf
with snprintf(). There was a minor and possibly not exploitable security
hole related to one sprintf().
Matthew Dillon [Sun, 13 Dec 1998 02:47:00 +0000 (02:47 +0000)]
PR: docs/9045
Update chpass(1) manual page. Change the definition of the class
field and also reorganize the field list to match that of the
/etc/master.passwd file, to avoid confusion.
Matthew Dillon [Sun, 13 Dec 1998 01:53:50 +0000 (01:53 +0000)]
PR: bin/3478
Have pwd_mkdb lock the source file while rebuilding the database. When
called by programs such as vipw, the source file is a temporary file and
this does not conflict with the lock on /etc/master.passwd already held
by vipw. When run manually, however, master.passwd is typically specified
as the argument and the locking prevents other programs from messing with
master.passwd during the database rebuild.
Also pwd_mkdb uses a blocking exclusive lock as it may be called from
a script. The -N option was added to cause pwd_mkdb to get the lock
non-blocking and exit with an error if the attempt fails, again useful
for scripts.
Matthew Dillon [Sun, 13 Dec 1998 01:36:45 +0000 (01:36 +0000)]
Handle the race condition where vipw may lock a password file which has
just been replaced. After our lock succeeds we check if st_nlink is 0
and if it is we close the descriptor and retry our open/lock sequence.
Matthew Dillon [Sat, 12 Dec 1998 23:05:22 +0000 (23:05 +0000)]
Reviewed by: cvs-current
Delete rc.local from CVS tree, its remaining functionality has been
moved to /etc/rc. /etc/rc still supports an rc.local but it is now
a 100% user-controlled file.
Matthew Dillon [Sat, 12 Dec 1998 23:04:21 +0000 (23:04 +0000)]
Reviewed by: cvs-current
Commit changes to rc and rc.local, removing the remaining minimal
functionality of rc.local into rc and commenting it out of rc.local
prior to the deletion of rc.local from the CVS tree.
John Birrell [Sat, 12 Dec 1998 22:00:49 +0000 (22:00 +0000)]
Back out revs 1.181 and 1.182 which upset a few people. I hope those
(3?) people will make an effort to help those who would have benefitted from
this change. And just telling them that they should read and understand
the significance of each message posted to -current is not really good
enough IMHO.
Matthew Dillon [Sat, 12 Dec 1998 21:45:49 +0000 (21:45 +0000)]
PR: kern/8990
If timer calculation results in degenerate value (0), force it to 1
to avoid divide-by-zero panic later on in calls to IGMP_RANDOM_DELAY().
I considered simply adding 1 to the timer calculation, but was unsure
if the calculation was part of the IGMP standard or not so did not want
to mess with it for all cases.
Matthew Dillon [Sat, 12 Dec 1998 21:07:09 +0000 (21:07 +0000)]
PR: kern/8965
Obtained from: Stephen Clawson <sclawson@cs.utah.edu>
Wakeup anyone waiting on a mount point prior to returning from umount,
whether an error occurs or not. Fixes a stat/NFS-umount race and other
potential future problems. Fix taken from bug/pr which also indicated
that the same fix has already been applied to OpenBSD and NetBSD.
Nick Hibma [Sat, 12 Dec 1998 11:30:04 +0000 (11:30 +0000)]
When no driver was found for a device, the message 'not probed' appeared
This is odd, especially in the case of USB where the driver is found
in several tries: vendor specific, class specific, interface specific.
The mouse driver is found at the interface specific level...
Reviewed by: Doug Rabson (dfr@freebsd.org)
Warner Losh [Sat, 12 Dec 1998 08:16:01 +0000 (08:16 +0000)]
Add support for the YE-Data external PCMCIA floppy driver. This
floppy is used on the toshiba Libretto line of subnotebook computers.
It differs from a normal floppy in that you must use PIO rather than
DMA to transfer the data.
To enable this, you must add options "FDC_YE" to your kernel. I don't
have a machine that has a floppy and a pcmcia slot to test to make
sure that this doesn't impact normal floppy units, so I've left this as
an option.
I have ported this to -current and made an attempt to ensure that the
indentation conforms to style(9), aka the bruce filter.
Reviewed by: nate, markm
Submitted by: David Horwitt (dhorwitt@ucsd.edu)
Satoshi Asami [Sat, 12 Dec 1998 07:39:30 +0000 (07:39 +0000)]
(0) Fast INDEX generation. Only print out the directory name and
don't recurse in "make describe". The new INDEX target in
ports/Makefile invokes a perl script to recurse and convert them
into package names.
While I'm here, change the name of targets and move them around a
little bit for the sake of consistency.
It is also probably worth noting here that the meaning of the
"build dependency" list in INDEX has been changed slightly
changed. The old list was "build depends and its build depends"
-- not particularly useful if you had things like autoconf, which
run-depend on gm4 (you install all the things listed here and
you'll get an autoconf that won't run).
It is now "build depends and its run depends" -- you install
everything listed here, and you'll be able to build the port.
Submitted by: steve
(0') Fast README.html generation. It uses ports/INDEX to find
dependencies instead of embarking on to a recursive loop.
Submitted by: steve
(1) Remove NO_WRKDIR and NO_EXTRACT. Their functionality are easily
replacable with NO_WRKSUBDIR=t and EXTRACT_ONLY= (nothing on right
side), and they get in the way of read-only port trees.
(2) Surround first few variable definitions with ".if !defined()".
This will make cross-compilation easier and also speed up make
processes.
(3) Call sysctl with absolute path. Prefer the one in /sbin over the
one in /usr/sbin.
and use them in PKG_ARGS. Frobbing with PKG_ARGS directly is
strongly discouraged.
(5) Change PKG_SUFX to ".tar" (instead of ".tgz") if PKG_NOCOMPRESS is
defined. This is intended only for our own use.
(6) Add more sites to MASTER_SITE_GNU.
Submitted by: billf
(7) Override MANUAL_PACKAGE_BUILD if PARALLEL_PACKAGE_BUILD is
defined. This is intended only for our own use.
(8) Add new target "ignorelist" which will print out the package name
if the port is not going to be built on this machine. This is
intended only for our own use.
Bruce Evans [Fri, 11 Dec 1998 11:21:47 +0000 (11:21 +0000)]
Merged from Lite2 (one bcopy -> memmove, one significant change:
don't unlink _PATH_NOLOGIN for the -k case even if shutdown terminates
abnormally. NetBSD already has this change).
Matt Jacob [Fri, 11 Dec 1998 07:19:36 +0000 (07:19 +0000)]
Some fixes to handle fixed mode and variable mode more sensibly- and also
incorporate some notion of which revision the device is. If it's < SCSI2, for
example, READ BLOCK LIMITS is not a MANDATORY command.
At any rate, the initial state is to try and read block limits to get a notion
of the smallest and largest record size as well as the granularity. However,
this doesn't mean that the device should actually *in* fixed block mode should
the max && min be equal... *That* choice is (for now) determined by whether
the device comes up with a blocksize of nonzero. If so, then it's a fixed block
preferred device, otherwise not (this will change again soon).
When actually doing I/O, and you're in fixed length mode, the block count is
*not* the byte count divided by the minimum block size- it's the byte count
divided by the current blocksize (or use shift/mask shortcuts if that worked
out...).
Then when you *change* the blocksize via an ioctl, make sure this actually
propagates to the stored notion of blocksize (and update the shift/mask
shortcuts).
Misc Other:
When doing a mode select, only use the SCSI_SAME_DENSITY (0x7f) code if
the device is >= SCSI2- otherwise just use the saved density code.
Recover from the ripple of ILLEGAL REQUEST not being 'retried' in that
RESERVE/RELEASE is not a mandatory command for < SCSI2 (so ignore it if it
fails).
Julian Elischer [Fri, 11 Dec 1998 06:02:06 +0000 (06:02 +0000)]
If we failed to probe/attach somehow, we never have a sc->sc_hcca
but the present PCI probe code still thinks we are there as the pci attach
can't return an error code.
This means we are in the shared interrupt list, but have not been set up.
If we are sharing ints with another device, ohci_intr will be called and will
coredump on a NULL reference. So just return if it is called when not set up.
This fixes the symptom and not the cause.
The right answer is to let the PCI system know that the attach failed,
or to fail earlier (in the PCI probe).
The attach() is a void fn() so it can't return failure..
Justin T. Gibbs [Fri, 11 Dec 1998 03:50:35 +0000 (03:50 +0000)]
Remove unsued variable.
If we are not transfering any data, use a non S/G ccb type that doesn't
return residual information. It seems that some firmware revisions dislike
S/G ccbs with 0 length S/G lists.
Correct bt_cmd() so that we always honor command status that was latched
by our interrupt routine while polling for completion..
Brian Somers [Thu, 10 Dec 1998 18:36:53 +0000 (18:36 +0000)]
Boy, this was tricky to find:
Remove any dial timer that might be hanging around at
datalink_Destroy() time. This timer may be left running
after the link is closed (making sure it's not automatically
opened again too soon).
Brian Somers [Thu, 10 Dec 1998 18:36:30 +0000 (18:36 +0000)]
When using ``set device !someprogram'', when ``someprogram''
exits, it causes a select() exception.
Handle these select() exceptions on link descriptors in pretty
much the same way as loss of carrier rather than dropping out
in confusion.
linux_pipe does not preserve the edx register. Linux and
programs using glibc expect edx to be preserved accross syscalls.
As a result, linux programs running in emulation mode can
have whatever value may be represented by edx clobbered.
PR: 9038
Submitted-By: Richard Seaman, Jr. <dick@tar.com>
John Birrell [Thu, 10 Dec 1998 05:34:11 +0000 (05:34 +0000)]
Add logic to check if any of the BIN1 files do not already exist in
${DESTDIR}/etc and an install target to install the missing ones. This
allows new files like pam.conf to be installed by the first installworld
after the file is added, but avoid clobbering files that might be
customized. This should save some support questions.
Justin T. Gibbs [Thu, 10 Dec 1998 04:14:50 +0000 (04:14 +0000)]
Revamp the way that exceptional message handling is performed so that it
is more robust and common code can be used for both the target and iniator
roles. The mechanism for tracking negotiation state has also been simplified.
Add support for sync/wide negotiation in target mode and fix many of
the target mode bugs running at higher speeds uncovered. Make a first
stab at getting all of the bus skew delays correct. Sync+Wide dataout
transfers still cause problems, but this may be an initiator problem.
Ensure that we exit BITBUCKET mode if the controller is restarted.
Add support for target mode only firmware downloads. This has been
tested on the aic7880, but should mean that we can perform target mode
on any aic7xxx controller. Mixed mode (initiator and target roles in
the same firmware load) is currently only supported on the aic7890, but
with optimization, may fit on chips with less instruction space.
Justin T. Gibbs [Thu, 10 Dec 1998 04:07:42 +0000 (04:07 +0000)]
Convert debugging printfs to the CAM_DEBUG macro.
Allow sync transfers if the controller supports it. Wide will follow
as soon as I get the kinks worked out of wide target transfers in the
aic7xxx driver (currently the only target mode driver in the tree).
Justin T. Gibbs [Thu, 10 Dec 1998 04:05:49 +0000 (04:05 +0000)]
Expand the hba_misc fied in the Path Inquiry ccb to allow a controller driver
to specify that it does not provide initiator services (PIM_NOINITIATOR)
and that the initial bus reset for device probing should be avoided
(PIM_NOBUSRESET).