Ruslan Ermilov [Sun, 7 Apr 2002 14:58:12 +0000 (14:58 +0000)]
Fixed the nasty bug where .depend file that exists somewhere in
the .PATH (but not in the ${.OBJDIR}) would result in a leak of
the ${OBJS}: ${SRCS:M*.h} dependency hint.
Spotted by: fixing the broken gnu/usr.bin/cc/cc1obj build
MFC after: 1 day
bbsize and sbsize cannot ever be trusted from the disklabel, in
particular as there may not be one. Remove #if 0'ed code which might
mislead people to think otherwise.
unifdef -ULOSTDIR, fsck can make lost+found on the fly.
revision 1.101
date: 2001/02/20 15:20:32; author: minoura;
Re-initialize some registers after resuming from suspend.
Some APM BIOSes do not restore them.
Reviewd by augustss.
MFNetBSD:
revision 1.97
date: 2000/12/31 14:29:54; author: augustss; state: Exp; lines: +17 -3
Make the controller survive suspend/resume. Thanks to Steve Woodford
<steve@mctavish.co.uk> for testing.
MFNetBSD:
revision 1.95
date: 2000/12/13 03:09:06; author: augustss; state: Exp; lines: +19 -3
Make the ohci driver not hang suspend/resume. It still doesn't resume
correctly. From itohy@netbsd.org (ITOH Yasufumi) PR kern/11714.
MFNetBSD:
revision 1.58
date: 2001/11/20 23:53:26; author: augustss; state: Exp; lines: +61 -33
Create a special kernel thread to run the usb short lived tasks (instead
of using the device discovery threads).
MFNetBSD:
revision 1.62
date: 2002/01/02 20:55:58; author: augustss; state: Exp; lines: +11 -10
Some more usb_proc_ptr changes.
Also some minor stylistic changes.
revision 1.63
date: 2002/01/02 20:58:12; author: augustss; state: Exp; lines: +4 -4
Fix typo in last commit.
MFNetBSD:
revision 1.61
date: 2001/12/31 15:55:51; author: augustss; state: Exp; lines: +3 -5
Delay bus enumeration a little in case the controller is a companion
controller. This way the main controller can gain ownership of the port
before enumeration starts.
date: 2001/11/20 23:53:26; author: augustss; state: Exp; lines: +61 -33
Create a special kernel thread to run the usb short lived tasks (instead
of using the device discovery threads).
The change to usb_port.h is a little hack whilst I address an issue
with NetBSD.
Maxime Henrion [Sun, 7 Apr 2002 13:28:18 +0000 (13:28 +0000)]
Add code to try the nmount(2) syscall when mount(2) failed with
EOPNOTSUPP. This will make things less painful when I will commit
the conversion of devfs, fdescfs and pseudofs to nmount.
MFNetBSD:
revision 1.68
date: 2001/12/24 21:36:16; author: augustss; state: Exp; lines: +2 -1
Add some more DIAGNOSTIC tests.
Make usb_match_device() match on USB_PRODUCT_ANY.
Maxime Henrion [Sun, 7 Apr 2002 13:22:47 +0000 (13:22 +0000)]
o Change kernel_vmount() interface to be more convenient : pass two
separate strings instead of passing "foo=bar".
o Don't forget to clear the VMOUNT flag on the vnode when vfs_nmount()
fails because the fs doesn't implement VFS_NMOUNT (and in vfs_mount()
when the fs doesn't implement VFS_MOUNT) ; also decrement the vfs
refcount in the !MNT_UPDATE case.
MFNetBSD: usbdi.c (1.63), usbdi.h (1.41)
date: 2000/03/02 12:37:51; author: augustss;
Use ratecheck() to limit error messages on disconnect.
Break out some common functionality.
We don't have ratecheck() in our kernel yet, so I've hardcoded
usb_ratecheck() to return true always.
MFNetBSD: ohci.c (1.104), ohcivar.h (1.28)
date: 2001/09/28 23:57:21; author: augustss;
Reenable RHSC interrupt after one second so hot plugging works.
(From OpenBSD.)
MFNetBSD: ohci.c (1.109), uhci.c (1.144), uhub.c (1.56), usb.c (1.57),
usbdi.c (1.86), usbdivar.h (1.66)
[Some partial, because most of this was merged in a while ago]
date: 2001/11/20 13:48:03; author: augustss;
Keep track of device speed for USB 2.0.
MFNetBSD:
revision 1.52
date: 2001/10/26 17:53:59; author: augustss; state: Exp; lines: +8 -2
Compare pointer with NULL instead of using them as a condition.
GCC >= 3 and C99 handle zero-length arrays differently than older
versions of GCC. With this change, sysinstall compiles and works fine
with GCC 3.1 or 2.95.
MFNetBSD:
revision 1.106
date: 2001/11/09 15:01:57; author: augustss; state: Exp; lines: +73 -57
Fix a bug in xfer abort processing when the HC executes ahead of what
the driver aborts.
Don't block RHSC interrupts.
MFNetBSD: ohci.c (1.104), ohcireg.h (1.28)
date: 2001/09/28 23:57:21; author: augustss;
Reenable RHSC interrupt after one second so hot plugging works.
(From OpenBSD.)
MFNetBSD:
revision 1.103
date: 2001/09/11 07:00:19; author: augustss; state: Exp; lines: +4 -1
Don't go top mode OPERATIONAL (before reset) on startup even
if BIOS claims to have initialized the controller.
MFNetBSD:
revision 1.142
date: 2001/10/25 02:08:13; author: augustss; lines: +14 -16
Change reset sequence to get status change bits set right on startup.
A variable had been unnecessarily assigned a bogus value because gcc was
"confused" about it being unassigned. In fact, gcc was right. Fix the
real problem by setting that variable before break-ing out of a select
statement so gcc is happy, and then remove the unnecessary assignment.
Reported by: a user wondering why lpd syslog-ed about "compiler confusion"
MFC after: 12 days
Rearrange all the error returns from sendfile() to make sure the original
input file and any temporary (filter) file are closed upon return, and
that is generally done at the end of the routine. This should make it
easier for a later update (not yet written) to implement a "resend_copies"
option.
Peter Wemm [Sun, 7 Apr 2002 06:28:38 +0000 (06:28 +0000)]
Later versions of gcc object very strongly to the -C flag being passed
as -CC. It makes no difference to gcc in the tree, but this change is
necessary for gcc-3.1 to work.
Re-arrange how output filters (of=) are handled for queues going to
remote machines. Now they really are handled *exactly* the same as
input filters (if=) for remote queues, except that they are started
with a different set of parameters. This should fix a few subtle
bugs in output-filter processing on such queues. It is a pretty
significant re-arranging of sendfile(), moving some of it to a new
execfilter() routine.
PR: 36552
Reviewed by: no screams from freebsd-audit
MFC after: 12 days
When checking the alternate superblock, we used to copy any fields
that might have changed, then did a byte-by-byte comparison with
the alternate. If any unused fields got used, they had to be added
to the exception list. Such changes caused too many false alarms.
So, I have changed the comparison algorithm to compare a selected
set of fields that are not expected to change. This new algorithm
causes far fewer false hits and still does a good job of detecting
problems when they have really occurred. In particular, this change
should ease the transition to kernels supporting UFS2 which make
some significant changes to the superblock.
Fix (for the second time) kvm_getprocs() for the case where no
processes match the given criteria. Since revision 1.60 of malloc.c,
malloc() and friends return an invalid pointer when given a size of 0.
kvm_getprocs() uses sysctl() with a NULL oldp argument to get an
initial size, but does not check whether it's 0 before passing it to
realloc() (via _kvm_realloc()). Before the aforementioned malloc()
change, this resulted in a minimal allocation made and a valid poitner
returned, but now results in an invalid, but non-NULL, pointer being
returned. When this is passed to sysctl(), the latter returns EFAULT
(as it should).
Peter Wemm [Sun, 7 Apr 2002 04:16:35 +0000 (04:16 +0000)]
Fix a relocation bug in the ia64 ld.so. Weak function pointers in shared
objects were not being correctly set to zero. Instead, the function
descriptor pointer was set to the load address of the .so object. This
caused gcc generated binaries to segfault on exit when crtbegin.asm's
_fini code tested the __cxa_finalize() function pointer for zero.
This is a bit of a hack because of a problem nearby workaround for
find_symdef and its quirks (failures) for local symbols. This still
needs to be fixed.
Peter Wemm [Sun, 7 Apr 2002 02:40:55 +0000 (02:40 +0000)]
Add -lstdc++ to the link args for these C++ tools so that they can be
compiled with gcc-3.1. Somebody thought it was a good idea to move
the implementation of new and delete from libgcc to libstdc++. This
change doesn't harm the current compiler in the tree.
Juli Mallett [Sun, 7 Apr 2002 02:29:56 +0000 (02:29 +0000)]
Fix sed(1) in the case where a last line is specified and hold space is not
specified, and then the first part of the pattern space is deleted, when
there are two or more input lines, as this results in subtraction of one from
an unsigned integral value of '0'. That bogus value is used in one case
for a loop (that will run far too many times in this case) and a function to
search for a value within a specified range of memory, however now the range
of memory is obscenely large and a segmentation fault will occur. This is
fixed by checking for and appropriately handling a nil pattern space as if
the specified search in memory failed, as indeed it obviously will with nil
pattern space.
Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
PR: bin/34813
Reviewed by: mike
MFC after: 1 day
Peter Wemm [Sun, 7 Apr 2002 01:44:24 +0000 (01:44 +0000)]
Bandaid for LP64 machines where 'warning: cast to pointer from different
sized integer' bites. The various malloc functions return pointers,
but without any prototype/declarations visible to callers, the compiler
expects them to return int.