Commit Graph

81711 Commits

Author SHA1 Message Date
Kirk McKusick
bc7bdd50c1 When the number of dirty buffers rises too high, the buf_daemon runs
to help clean up. After selecting a potential buffer to write, this
patch has it acquire a lock on the vnode that owns the buffer before
trying to write it. The vnode lock is necessary to avoid a race with
some other process holding the vnode locked and trying to flush its
dirty buffers. In particular, if the vnode in question is a snapshot
file, then the race can lead to a deadlock. To avoid slowing down the
buf_daemon, it does a non-blocking lock request when trying to lock
the vnode. If it fails to get the lock it skips over the buffer and
continues down its queue looking for buffers to flush.

Sponsored by:	DARPA & NAI Labs.
2002-10-18 01:29:59 +00:00
Kirk McKusick
ef6c0bb296 With the revised single-lock method used in snapshots, the
BA_NOWAIT flag is no longer needed.

Sponsored by:	DARPA & NAI Labs.
2002-10-18 01:17:28 +00:00
Giorgos Keramidas
8a7c201103 Typo in verb: zeros -> zeroes. 2002-10-18 01:05:46 +00:00
Sam Leffler
52dee23d90 not sure if this correct, but it compiles again 2002-10-18 00:26:34 +00:00
Maxim Sobolev
2e307eb8c9 Separate fiels reported by disk_err() with spaces, so that output doesn't
look cryptic.

MFC after:	1 week
2002-10-17 23:48:29 +00:00
Maxim Sobolev
119b9f09e9 Fix silly typo: loacal --> local. 2002-10-17 23:46:32 +00:00
Jim Pirzyk
c463814756 Changed the scsi mode command to use 10 bytes scsi commands instead
of the 6 byte ones.  This helps with using a IDE cdrom behind a USB
interface.

PR: kern/43885
2002-10-17 23:37:03 +00:00
Tim J. Robbins
505b28166c Style: use sa_handler instead of __sigaction_u.__sa_handler. 2002-10-17 23:32:44 +00:00
Chris Costello
6dde49132e Activate ugidfw.8 man page.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-17 22:43:11 +00:00
Robert Drehmel
f9067a4978 Replace the conventional usage of strncpy() by using strlcpy(). 2002-10-17 22:27:21 +00:00
Robert Drehmel
75e8f2dad8 - Use strlcpy() rather than strncpy() to copy NUL terminated
strings.
 - Pass the correct buffer size to getcredhostname().
2002-10-17 22:00:30 +00:00
Poul-Henning Kamp
37e7c03d19 Be consistent and return the NUL at the end of kern.geom.conf{xml,dot}.
Spotted by:	sam
2002-10-17 21:39:06 +00:00
Robert Drehmel
bb8992b32c Instead of (sizeof(source_buffer) - 1) bytes, copy at most
(sizeof(destination_buffer) - 1) bytes into the destination buffer.
This was not harmful because they currently both provide space for
(MAXCOMLEN + 1) bytes.
2002-10-17 21:02:02 +00:00
Juli Mallett
4aba47f7ce FD locking is not enabled anymore, so the table which contains the owner
of a file descriptor has NULL entries, so don't dereference the table entries
to get the owners ever -- don't print the owners when processing a thread_dump
request as a result of SIGINFO.

Reviewed by:	deischen
2002-10-17 20:26:26 +00:00
Robert Drehmel
e80fb43467 Use strlcpy() instead of strncpy() to copy NUL terminated strings
for safety and consistency.
2002-10-17 20:03:38 +00:00
Andrey A. Chernov
34c763eff1 Add Dutch ISO keymap
PR: 17699
Submitted by: Edwin Groothuis <mavetju@chello.nl>
2002-10-17 19:56:00 +00:00
Poul-Henning Kamp
aed99af2a3 NUL terminate sysctl kern.disks 2002-10-17 19:27:02 +00:00
Sam Leffler
c1623066ca o ioctl DIOCGDINFO error wasn't checked
o memory wasn't reclaimed in certain cases
o add more msgs under #ifdef DEBUG
o rewrite tangle of for loops for clarity

NB: Open_Disk should redo how it malloc's memory so the caller can free
    everything.  Documentation says the caller can free the disk list to
    reclaim everything but this leaks the indirect strings.  Fixing this
    is simple for the sysctl case but adds complexity to the fallback,
    non-sysctl, case.
2002-10-17 18:34:32 +00:00
Sam Leffler
dda5b5a58a correct arg order to strlcpy/strlcat under #ifdef alpha 2002-10-17 18:23:21 +00:00
Jim Pirzyk
b2eb172cc3 Add the !define(COMPILING_LINT)
pass the pointy hat...

Requested by: Juli Mallett <jmallett@FreeBSD.org>
2002-10-17 18:17:28 +00:00
Thomas Moestl
61ef27e978 When entering the firmware mappings into the kernel tlb, clear all 'soft'
bits that might be set in the firmware tte data field, and set the soft
flag TD_EXEC to mark the page executable. Failing to do the latter would
cause fatal instruction faults in the prom in certain situations.

Reviewed by:	jake
2002-10-17 18:16:21 +00:00
Thomas Moestl
b08cb104df Allocate major 177 for the OpenFirmware control device, which I have
ported from NetBSD and plan to commit soon.
2002-10-17 18:11:49 +00:00
Sam Leffler
f7525b1de0 Add mount_devfs so we can remove MAKEDEV from the fixit floppy. These
two changes make stuff fit in a floppy image again.

Note: tested only for i386, but (blindly) applied to all machines
2002-10-17 18:04:53 +00:00
Nate Lawson
9dbcd1ae75 Quirk for HP 315 USB Digital Camera
Submitted by:	Keith White <kwhite@uottawa.ca>
PR:		kern/41010

MFC after:	1 week
2002-10-17 18:04:41 +00:00
Sam Leffler
77cfe20dfa Strip splash, tun, and COMPAT_FREEBSD4 from the config used to build
the BOOTMFS kernel.  These help reduce the kernel size so things fit
in a floppy image.  There are more low-hanging fruit to be had here
if things fail to fit again.
2002-10-17 18:02:27 +00:00
Sam Leffler
39820c9674 Mark more drivers as going on the (nonexistent) drivers.flp floppy
to reduce the size of the bootstrap kernels.  This is needed to make
stuff fit in primary floppy images.  Specific drivers moved: RAID
support, tx Ethernet, and wi (wireless).  Probably want to revisit
at least the last two drivers before release.

Submitted by:	jhay (mostly)
2002-10-17 18:00:30 +00:00
Hajimu UMEMOTO
b6e2845324 last arg of in6?_gif_output() is not used any more.
Obtained from:	KAME
MFC after:	3 weeks
2002-10-17 17:47:55 +00:00
Hajimu UMEMOTO
3bb61ca669 - drop too short IPv6 frame
- NULL != 0

Obtained from:	KAME
MFC after:	3 weeks
2002-10-17 17:42:46 +00:00
Hajimu UMEMOTO
21fb391fdb s/gifp/ifp/
Obtained from:	KAME
MFC after:	3 weeks
2002-10-17 17:39:56 +00:00
Sam Leffler
3b132a615f fix kldload error return when a module is rejected because it's statically
linked in the kernel.  When this condition is detected deep in the linker
internals the EEXIST error code that's returned is stomped on and instead
an ENOEXEC code is returned.  This makes apps like sysinstall bitch.
2002-10-17 17:28:57 +00:00
Josef Karthauser
555b7ddc31 Fix a bug that showed up when trying to produce a database for
subdirectories, and ended up making us loop forever.

Add the username to the md5 of the commit to make it slightly more
unique.

Make the 'cvs' run quietly.
2002-10-17 16:29:26 +00:00
John Baldwin
fbfed1cf09 Fix compile with options SC_NO_SUSPEND_VTYSWITCH. 2002-10-17 16:09:13 +00:00
Robert Drehmel
55c8556834 - Allocate only enough space for a temporary buffer to hold
the path including the terminating NUL character from
   `struct sockaddr_un' rather than SOCK_MAXADDRLEN bytes.
 - Use strlcpy() instead of strncpy() to copy strings.
2002-10-17 15:52:42 +00:00
Maxim Sobolev
d3d67116a6 my(4) requires miibus, so that move it into proper section and also add a
verbose description into comment area.
2002-10-17 15:32:03 +00:00
Yoshihiro Takahashi
ab014f15fa Switch from the bs driver to the ct driver. 2002-10-17 13:57:57 +00:00
Mitsuru IWASAKI
0ebefa8c4e 1. Fix a comment. Locking _is_ needed (but not done).
2. Update a comment.  We now restore much more than RTC updates and
   interrupts.
3. Order change.  Stop interrupts by writing to RTC_STATUSB,
   restore rate bits for the interrupts by writing to RTC_STATUSA,
   then enable interrupts again.
   This seems to be done perfectly backwards in startrtclock().
   Otherwise, the idea for this change was obtained from
   startrtclock().
4. Don't stop the clock (RTCB_HALT).  We only program some control bits
   and don't want to stop the clock.
5. (Not really related.)  Add caveats to the comment about timer_restore().
   The update is non-atomic since locking is not done.

On locking:
6. rtcin() and writertc() are locked() adequately by splhigh() in RELENG_4,
   but this locking is null in -current.
7. Doing things in the correct order in (3) combined with (6) is probably
   enough locking for rtcrestore() in RELENG_4.  In -current, the
   writertc()'s race with rtcintr() unless the BIOS disables RTC interrupts.

Submitted by:	bde (including commit message)
MFC after:	1 week
2002-10-17 13:55:39 +00:00
Ruslan Ermilov
ccc4bab104 Added the new variable CTAGS which, if set to "ctags", reverts
to creating the tags file using ctags(1).  Defaults to "gtags".
Made GTAGSFLAGS and HTAGSFLAGS overrideable, added CTAGSFLAGS.
Folded bsd.prog.mk version of `tags' into bsd.dep.mk.

PR:		bin/42852
2002-10-17 13:48:13 +00:00
Bruce Evans
25388b6cc4 Fixed the quoting of the value of SC_CUT_SEPCHARS. The double quotes
needed to be quoted (to get a C string literal), not the value itself.

Fixed the value of SC_CUT_SEPCHARS.  Setting this value would have had no
effect even if it were used, since the value was the same as the default.

The above bugs had no effect except to set bad examples, since test
coverage of SC_CUT_SEPCHARS is broken by enabling a negative option.

Removed (unquoted) double quotes for all options.  They were all bogus
since they had no effect except to make non-strings look like strings.
Most of the non-strings were expressions.  The value of INIT_PATH is
a non-string since it is stringified later (unlike SC_CUT_SEPCHARS).

Fixed parenthesization errors inside bogus quotes (parenthesize values
if they have more than one token in them but don't parenthesize single
tokens).
2002-10-17 13:47:31 +00:00
Philippe Charnier
b51547cf62 Remove unused #includes. Eliminate castings by using size_t instead of int. 2002-10-17 13:19:47 +00:00
Philippe Charnier
b9a86ec995 Use .Fl/Ar for flags and arguments. 2002-10-17 13:04:49 +00:00
Tim J. Robbins
0145ba86d1 Fix off-by-one error when pushing back a multibyte sequence in
wide character class (%l[) and wide string (%ls) conversions.
2002-10-17 13:04:00 +00:00
Philippe Charnier
44f219ea75 Introduce option enumeration the standard way. 2002-10-17 12:58:14 +00:00
Yoshihiro Takahashi
971475a2da Merged from sys/isa/syscons_isa.c revision 1.19. 2002-10-17 12:54:51 +00:00
Yoshihiro Takahashi
1f47349cf1 Merged from sys/dev/syscons/syscons.c revision 1.390. 2002-10-17 12:51:43 +00:00
Tim J. Robbins
63b01047f4 Make part of the previous change clearer; check flags for SUPPRESS directly
instead of checking whether we're using a temporary buffer.
2002-10-17 12:06:29 +00:00
Tim J. Robbins
bd25c6f476 The field width for single-byte string conversions (%c, %s, %[) is the
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
2002-10-17 12:02:36 +00:00
Mitsuru IWASAKI
c42946c4c1 Add new syscons option SC_NO_SUSPEND_VTYSWITCH.
This disables vty switch during suspend/resume.
2002-10-17 07:04:31 +00:00
Jim Pirzyk
c8c1cf0ca7 put an #error directive when SMP and CPU_DISABLE_CMPXCHG are set
together.

Requested by: Lars Eggart <larse@isi.edu>
Enlighted how to do it by: John Baldwin <jhb@freebsd.org>
2002-10-17 05:51:36 +00:00
Kelly Yancey
30c0d52181 Make kqueue(2) work for virtual terminals.
PR:		40486
Submitted by:	Jilles Tjoelker <jilles+fbsd-bugs@stack.nl>
2002-10-17 05:48:56 +00:00
Marcel Moolenaar
271e5003bd Do not emit values as var=value while everything else looks like
XML. Emit the values as <var>value</var> for consistency.
2002-10-17 05:41:10 +00:00