]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoReinstate rev 1.36 with an important line that got missed. Note this
Brian Feldman [Tue, 8 Oct 2002 12:09:16 +0000 (12:09 +0000)]
Reinstate rev 1.36 with an important line that got missed.  Note this
also improves the "random undocumented offsets into various memory
spaces" a little bit.

21 years agoDo not strip CTL* escapes from redirection filenames in argstr(); they
Tim J. Robbins [Tue, 8 Oct 2002 11:22:49 +0000 (11:22 +0000)]
Do not strip CTL* escapes from redirection filenames in argstr(); they
are later stripped with rmescapes() in expandarg(). If the filename has
already been unescaped, doing it again in rmescapes() can walk off the
end of the string, leading to memory corruption and eventually SIGSEGV.

Noticed by: kris

21 years agoRemove unused TYPE_WD and TYPE_WFD.
Poul-Henning Kamp [Tue, 8 Oct 2002 10:17:16 +0000 (10:17 +0000)]
Remove unused TYPE_WD and TYPE_WFD.

21 years agoCorrectly calculate dmadat: We need to take the address of _end, it's
Poul-Henning Kamp [Tue, 8 Oct 2002 10:15:42 +0000 (10:15 +0000)]
Correctly calculate dmadat:  We need to take the address of _end, it's
contents is irrelevant and likely to be zero;

This doesn't change the resultant value, but it does save a couple of bytes
because &_end is constant.

21 years agoMake it possible to kldload(8) many modules.
Juli Mallett [Tue, 8 Oct 2002 09:57:03 +0000 (09:57 +0000)]
Make it possible to kldload(8) many modules.

MFC after: 2 months
Sponsored by: Bright Path Solutions
Reviewed by: tjr

21 years agoUnbreak boot2 by backing out rev 1.36 to Makefile, which does not
Poul-Henning Kamp [Tue, 8 Oct 2002 07:52:28 +0000 (07:52 +0000)]
Unbreak boot2 by backing out rev 1.36 to Makefile, which does not
work as advertised:

bang# pwd
/bang/src/sys/boot/i386/boot2
bang# make clean >& /dev/null
bang# cvs -q update -r 1.35 Makefile >& /dev/null
bang# make >& /dev/null
bang# cat /usr/obj/`pwd`/boot2.h
#define XREADORG 0x725
bang# cvs -q update -r 1.36 Makefile > & /dev/null
bang# make clean > & /dev/null
bang# make > & /dev/null
bang# cat /usr/obj/`pwd`/boot2.h
#define XREADORG 0x25
bang#

21 years agoAllow for multiple #includes of this file.
Poul-Henning Kamp [Tue, 8 Oct 2002 07:24:19 +0000 (07:24 +0000)]
Allow for multiple #includes of this file.

21 years agoSave four bytes by shortening a string two chars.
Poul-Henning Kamp [Tue, 8 Oct 2002 07:06:24 +0000 (07:06 +0000)]
Save four bytes by shortening a string two chars.

Sponsored by: DARPA & NAI Labs.

21 years agoFor now, don't wait for drives to stop returning EBUSY. There is too
Poul-Henning Kamp [Tue, 8 Oct 2002 07:03:58 +0000 (07:03 +0000)]
For now, don't wait for drives to stop returning EBUSY.  There is too
much broken harware around it seems.

Sponsored by: DARPA & NAI Labs.

21 years agoFreeBSD 4.7 enters the BSD family tree sometime on October 8, 2002.
Murray Stokely [Tue, 8 Oct 2002 05:25:58 +0000 (05:25 +0000)]
FreeBSD 4.7 enters the BSD family tree sometime on October 8, 2002.

21 years agoTeach pkg_add -r how to find 4.7-RELEASE packages with an appropriate
Bruce A. Mah [Tue, 8 Oct 2002 05:15:21 +0000 (05:15 +0000)]
Teach pkg_add -r how to find 4.7-RELEASE packages with an appropriate
osreldate.

(Actually, due to differences in package compression formats, I'm
not sure that a -CURRENT pkg_add -r will do the right thing in
this case, once it finds them.)

21 years agoWe now use XFree86-4 packages rather than a special XFree86-3
Murray Stokely [Tue, 8 Oct 2002 05:06:05 +0000 (05:06 +0000)]
We now use XFree86-4 packages rather than a special XFree86-3
distribution, so this script is no longer needed.

21 years agoTreat the pathptrn field as a real pattern with the aid of fnmatch().
Dima Dorfman [Tue, 8 Oct 2002 04:21:54 +0000 (04:21 +0000)]
Treat the pathptrn field as a real pattern with the aid of fnmatch().

21 years agoImport the libc fnmatch() into the kernel. This will be used by,
Dima Dorfman [Tue, 8 Oct 2002 04:15:55 +0000 (04:15 +0000)]
Import the libc fnmatch() into the kernel.  This will be used by,
among other things, the DEVFS rule subsystem to match nodes against a
path pattern supplied by the user.

fnmatch.c was repo-copied from src/lib/libc/gen/fnmatch.c, and the
only changes to it are those necessary to make it compile in the
kernel.  The relevant parts of fnmatch.h were imported into libkern.h.

Approved by: -arch

21 years agoMake kldunload cbb work:
Warner Losh [Tue, 8 Oct 2002 03:53:52 +0000 (03:53 +0000)]
Make kldunload cbb work:
o Implement the thread killing interlock as described by jhb in arch@
  while talking to markm.
o Hold Giant around cbb_insert()/cbb_remove().  Deep in the belly of
  the vm code we panic if we don't hold this when we activate the memory
  for reading the CIS.
o If we had to do the kludge alloc, then do a kludge free.

21 years agoAdd device driver for Belkin F5U103 and compatible USB-to-serial adapters.
Alexander Kabaev [Tue, 8 Oct 2002 03:09:57 +0000 (03:09 +0000)]
Add device driver for Belkin F5U103 and compatible USB-to-serial adapters.

Reviewed by: n_hibma
Approved by: obrien

21 years agoRegen after usbdevs rev. 1.102.
Alexander Kabaev [Tue, 8 Oct 2002 03:04:14 +0000 (03:04 +0000)]
Regen after usbdevs rev. 1.102.

Reviewed by: n_hibma
Approved by: obrien

21 years agoAdd entries for:
Alexander Kabaev [Tue, 8 Oct 2002 03:00:37 +0000 (03:00 +0000)]
Add entries for:
Belkin F5U103
Belkin F5U120-PC Hub
GoHubs GoCOM232
Peracom single port
USB-to-serial adapters.

Reviewed by: n_hibma
Approved by: obrien

21 years agoRe-add the code which maps POSIX standard library names into the ones
Tim J. Robbins [Tue, 8 Oct 2002 02:19:54 +0000 (02:19 +0000)]
Re-add the code which maps POSIX standard library names into the ones
FreeBSD uses; f.e. -lpthread -> -pthread, -lxnet -> nothing.

21 years agoIntroducing /dev/devctl. This device reports events in the
Warner Losh [Mon, 7 Oct 2002 23:17:44 +0000 (23:17 +0000)]
Introducing /dev/devctl.  This device reports events in the
configuration device hierarchy.  Device arrival, departure and not
matched are presently reported.  This will be the basis for devd, which
I still need to polish a little more before I commit it.  If you don't
use /dev/devctl, it will be a noop.

21 years agoTwo minor bugfixes:
Warner Losh [Mon, 7 Oct 2002 23:15:40 +0000 (23:15 +0000)]
Two minor bugfixes:
o Allow the bus_debug variable to be set via the bus.debug tunable.
o Return pnpinfo and location info via the devinfo interface to userland.
  devinfo(8) needs to be updated to print it.

21 years agoMFp4:
Warner Losh [Mon, 7 Oct 2002 23:11:29 +0000 (23:11 +0000)]
MFp4:
o Better resume code.  Move the comments around.  Force the socket state to
  be querried.  Ack the interrupts properly.
o Intercept the interrupt requests and keep a list of interrupts to service
  ourselves.  When the card attaches, set its OK bit.  When we get a card
  status change interrupt for that card, clear the OK bit.  Don't call the
  ISR if the OK bit is cleared.  Iwasaki-san and yamamoto-san have both
  sent me patches that fix the same problem this fixes, but at the pccard
  level.
o Try to get the signalling of the thread to actually die.  This might not be
  100% right, but it is less wrong than before.
o Add a SIC next to a TI type that looks like it could be wrong, but isn't.

21 years agoo Add a nomatch routine so we whine when we don't know what to attach to
Warner Losh [Mon, 7 Oct 2002 23:05:33 +0000 (23:05 +0000)]
o Add a nomatch routine so we whine when we don't know what to attach to
  the card.
o Add comments about how we're doing the CIS activation.
o Add location and pnp info functions.
o Add better code to hopefully deal with ata cards better (and other drivers
  that allocate resources that we didn't preallocate from the CIS).  OLDCARD
  used to allow it, but NEWCARD was pickier.  I'm not 100% sure this works,
  but it doesn't break anything.

21 years agoMerge changes from NetBSD through version 1.17 of this file. These
Warner Losh [Mon, 7 Oct 2002 23:03:17 +0000 (23:03 +0000)]
Merge changes from NetBSD through version 1.17 of this file.  These
give us slightly better error checking than before and interpret what
default bits mean better.  See the NetBSD CVS tree for the authors of
these changes (revs 1.10 .. 1.17).

21 years agoo Add routines to return the location and pnpinfo for this card.
Warner Losh [Mon, 7 Oct 2002 23:00:51 +0000 (23:00 +0000)]
o Add routines to return the location and pnpinfo for this card.
  Note, we return the PCI pnp info, but in fact that's wrong to do
  since that data is not defined for CardBus cards.  CardBus says that
  these registers are undefined and one should use the CIS to do
  device matching.  To date, all CardBus cards have had these
  registered defined, no doubt because they are using common silicon
  to produce both the PCI cards and the CardBus cards.  However, it isn't
  any worse than the rest of the system, so just note it in passing and
  move on.
o Also sort prototypes while I'm here.

21 years agoDon't abuse the fact that -a == ~a + 1. Signed vs unsigned checkers
Warner Losh [Mon, 7 Oct 2002 22:58:24 +0000 (22:58 +0000)]
Don't abuse the fact that -a == ~a + 1.  Signed vs unsigned checkers
complain when a is a unsigned type.  So instead use the latter here
and be on our way.

Spotted by: flexlint by way of phk

21 years agoAdd extra set of parens around the barbit macro to make it clear what
Warner Losh [Mon, 7 Oct 2002 22:57:07 +0000 (22:57 +0000)]
Add extra set of parens around the barbit macro to make it clear what
we're intending to shift.

Spotted by: flexlint by way of phk (should fix about 40 messages)

21 years agoCorrect a bug in adding 0x700 to a number.
Brian Feldman [Mon, 7 Oct 2002 22:21:16 +0000 (22:21 +0000)]
Correct a bug in adding 0x700 to a number.

21 years agoConditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.
Poul-Henning Kamp [Mon, 7 Oct 2002 21:36:06 +0000 (21:36 +0000)]
Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.

Conditionalize the "XX bytes left" checks reference on UFS1/UFS12.

Conditionally build the necessary 64bit math for boot2 if UFS12.

Sponsored by: DARPA & NAI Labs.

21 years agoRemove duplicate uninstalled aio.h header.
Mike Barcroft [Mon, 7 Oct 2002 21:18:30 +0000 (21:18 +0000)]
Remove duplicate uninstalled aio.h header.

21 years agoDocument behaviour change in reboot(8) introduced in reboot.c rev. 1.17:
Thomas Quinot [Mon, 7 Oct 2002 21:18:20 +0000 (21:18 +0000)]
Document behaviour change in reboot(8) introduced in reboot.c rev. 1.17:
when using '-p' with reboot, and the power down action failds, reboot
the system normally. The behaviour of 'halt -p' and of shutdown(8) is
unchanged.

Approved by: roberto

21 years agoChange the comment character from # to // in boot1.s and run
Poul-Henning Kamp [Mon, 7 Oct 2002 20:56:09 +0000 (20:56 +0000)]
Change the comment character from # to // in boot1.s and run
it through CPP so we can conditionalized things.

Sponsored by: DARPA & NAI Labs

21 years agoAdd back a fdrop() call at the end of kern_open() that got lost in
Ian Dowse [Mon, 7 Oct 2002 20:49:22 +0000 (20:49 +0000)]
Add back a fdrop() call at the end of kern_open() that got lost in
revision 1.218. This bug caused a "struct file" reference to be
leaked if VOP_ADVLOCK(), vn_start_write(), or mac_check_vnode_write()
failed during the open operation.

PR: kern/43739
Reported by: Arne Woerner <woerner@mediabase-gmbh.de>

21 years agoTrack openbsd changes that don't affect us yet (PK supoprt is
Sam Leffler [Mon, 7 Oct 2002 20:02:34 +0000 (20:02 +0000)]
Track openbsd changes that don't affect us yet (PK supoprt is
currently disabled):

o Don't use constants for the output parameter, use the iparam count as a
  pointer to the first result location.
o Fix bits vs bytes counting problems.
o Split out the hardware and software normalization versions of modexp.
o Enable hardware normalization for chips that support it.
o On reset, disable hardware normalization for 582x and make sure the
  chip is in little endian mode.
o Since sw normalization is now the only option, simplify normalization
  handling.

Also fix RNG harvesting: disabling PK support (for the moment) had disabled
the MCR2 interrupt; consider both KEY support and RNG support when deciding
whether or not to enable it.

Obtained from: openbsd

21 years agoCorrectly adjust for moved start address.
Poul-Henning Kamp [Mon, 7 Oct 2002 19:12:36 +0000 (19:12 +0000)]
Correctly adjust for moved start address.

It seems that the existence of a "depend" target in src/sys/boot is not
to be taken as an indication that it actually does what one would expect,
at least it clearly threw my testing off.

Apologies to: jhb

21 years agoo split crypto_proc into two threads: one for processing requests and one
Sam Leffler [Mon, 7 Oct 2002 18:46:38 +0000 (18:46 +0000)]
o split crypto_proc into two threads: one for processing requests and one
  for processing callbacks.  This closes race conditions caused by locking
  too many things with a single mutex.
o reclaim crypto requests under certain (impossible) failure conditions

21 years agoremove CIOGSSESSION (get software session); it was added only for testing
Sam Leffler [Mon, 7 Oct 2002 18:37:31 +0000 (18:37 +0000)]
remove CIOGSSESSION (get software session); it was added only for testing

21 years agoRemove unneeded <sys/_posix.h> include.
Mike Barcroft [Mon, 7 Oct 2002 17:31:02 +0000 (17:31 +0000)]
Remove unneeded <sys/_posix.h> include.

21 years agoAdded '#include <sys/diskpc98.h>'.
Yoshihiro Takahashi [Mon, 7 Oct 2002 15:26:10 +0000 (15:26 +0000)]
Added '#include <sys/diskpc98.h>'.

Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh)

21 years agoCorrectly compensate for both offset and unoffset on-disk BSD disklabels.
Poul-Henning Kamp [Mon, 7 Oct 2002 13:11:28 +0000 (13:11 +0000)]
Correctly compensate for both offset and unoffset on-disk BSD disklabels.

Sponsored by: DARPA & NAI Labs.

21 years agoMerged from sys/isa/fd.c revisions 1.224 and 1.241.
Yoshihiro Takahashi [Mon, 7 Oct 2002 13:05:45 +0000 (13:05 +0000)]
Merged from sys/isa/fd.c revisions 1.224 and 1.241.

21 years agoMove MEM_USR a page upwards to make space for larger UFS1 boot2.
Poul-Henning Kamp [Mon, 7 Oct 2002 12:15:11 +0000 (12:15 +0000)]
Move MEM_USR a page upwards to make space for larger UFS1 boot2.

Load 4 sectors more than we used to.  This is harmless overhead for
the UFS1_ONLY case, but sufficient for boot2(UFS1+2).

Sponsored by: DARPA & NAI Labs

21 years agoDon't use DPCYL and DPSECT macros. These are not needed.
Yoshihiro Takahashi [Mon, 7 Oct 2002 10:04:07 +0000 (10:04 +0000)]
Don't use DPCYL and DPSECT macros. These are not needed.

Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh)

21 years agoCheck the size of the dos_partition structure.
Yoshihiro Takahashi [Mon, 7 Oct 2002 10:02:11 +0000 (10:02 +0000)]
Check the size of the dos_partition structure.

Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh)

21 years agoAdd the c99(1) utility, which is nothing more than a synonym for
Tim J. Robbins [Mon, 7 Oct 2002 09:37:55 +0000 (09:37 +0000)]
Add the c99(1) utility, which is nothing more than a synonym for
cc -std=iso9899:1999 -pedantic, and is required by SUSv3.

PR; 36087

21 years agoAdded bzip2 variants to the NAME section.
Ruslan Ermilov [Mon, 7 Oct 2002 09:08:07 +0000 (09:08 +0000)]
Added bzip2 variants to the NAME section.
Added missing break.
Remove the statement that -J requires zlib(3).

21 years agoUps, forgot to tell cvs commit about this file.
Poul-Henning Kamp [Mon, 7 Oct 2002 08:14:10 +0000 (08:14 +0000)]
Ups, forgot to tell cvs commit about this file.
Move UFS1_ONLY to Makefiles instead of common/ufsread.c

Sponsored by: DARPA & NAI Labs

21 years agoMove the definition of UFS1_ONLY into the Makefiles where it belongs.
Poul-Henning Kamp [Mon, 7 Oct 2002 08:09:20 +0000 (08:09 +0000)]
Move the definition of UFS1_ONLY into the Makefiles where it belongs.

Sponsored by: DARPA & NAI Labs.

21 years agoCorrectly convert to appropriate blocksize.
Poul-Henning Kamp [Mon, 7 Oct 2002 07:19:14 +0000 (07:19 +0000)]
Correctly convert to appropriate blocksize.

note to self:
Never check block-size sensitive patches on Sun compatible CD drives.

Sponsored by: DARPA & NAI Labs.

21 years agoMFp4:
Warner Losh [Mon, 7 Oct 2002 07:18:32 +0000 (07:18 +0000)]
MFp4:
o Return the right string for CIS4_STR
o kill obsolete comment about not doing something that we now do.

21 years agoCorrectly deal with non-DEVBSIZE drives.
Poul-Henning Kamp [Mon, 7 Oct 2002 07:15:37 +0000 (07:15 +0000)]
Correctly deal with non-DEVBSIZE drives.
Allow BIO_DELETE through too.

This fixes swap-backed md(4) devices.

Sponsored by:   DARPA & NAI Labs.

21 years agoAdd wrappers around the newly created bus_child_pnpinfo_str and
Warner Losh [Mon, 7 Oct 2002 07:08:00 +0000 (07:08 +0000)]
Add wrappers around the newly created bus_child_pnpinfo_str and
bus_child_location_str.

21 years agoMFp4: Comment about not assuming INTA# for 6729
Warner Losh [Mon, 7 Oct 2002 07:02:48 +0000 (07:02 +0000)]
MFp4: Comment about not assuming INTA# for 6729

21 years agoPut a printf under #ifdef DIAGNOSTIC.
Poul-Henning Kamp [Mon, 7 Oct 2002 06:57:00 +0000 (06:57 +0000)]
Put a printf under #ifdef DIAGNOSTIC.

Sponsored by: DARPA & NAI Labs.

21 years agoMinor string handling cleanup that I've had in my tree for a while:
Warner Losh [Mon, 7 Oct 2002 06:50:35 +0000 (06:50 +0000)]
Minor string handling cleanup that I've had in my tree for a while:

Don't use snprintf where strlcpy() will do the job.
Also, a NUL is '\0' not 0 in our style (C doesn't care), so spell it like.
Remove useless {} and () in the general area of this change.

21 years agoBetter comment for the product ID thing.
Warner Losh [Mon, 7 Oct 2002 06:35:04 +0000 (06:35 +0000)]
Better comment for the product ID thing.

21 years agoDon't need to NUL terminate after snprintf
Warner Losh [Mon, 7 Oct 2002 06:26:17 +0000 (06:26 +0000)]
Don't need to NUL terminate after snprintf

21 years agoCopyin and copyout are only possible from a process-native thread,
Poul-Henning Kamp [Mon, 7 Oct 2002 06:25:26 +0000 (06:25 +0000)]
Copyin and copyout are only possible from a process-native thread,
and therefore we need a way for ioctl handlers to run in that thread
in GEOM.  Rather than invent a complicated registration system to
recognize which ioctl handler to use for a given ioctl, we still
schedule all ioctls down the tree as bio transactions but add a
special return code that means "call me directly" and have the
geom_dev layer do that.

Use this for all ioctls that make it as far as a diskdriver to
avoid any backwards compatibility problems.

Requested by:   scottl
Sponsored by:   DARPA & NAI Labs

21 years agoUpdate comments to remind me about power bugs in oldcard.
Warner Losh [Mon, 7 Oct 2002 06:18:50 +0000 (06:18 +0000)]
Update comments to remind me about power bugs in oldcard.

21 years agoOoops. Need to free dc_srom on detach to not leak memory.
Warner Losh [Mon, 7 Oct 2002 05:29:13 +0000 (05:29 +0000)]
Ooops.  Need to free dc_srom on detach to not leak memory.

Pointy Hat to: The Mad Redhead of Niwot

21 years agoDynamically configure the width of the srom. This code comes from
Warner Losh [Mon, 7 Oct 2002 05:26:35 +0000 (05:26 +0000)]
Dynamically configure the width of the srom.  This code comes from
OpenBSD who got the code (or the idea) from the NetBSD tlp driver.

This gets some cardbus dc cards working (either completely or nearly
so).  It also appears to get additional pci cards working, without
breaking working ones.

# Maybe some additional work is needed here.  Also, the cardbus attachment
# might need to match on the CIS rather than on the vendor/device so we have
# a finer level of detail as to what the card is.  Technically, the
# vendor/device fields are undefined for CardBus (even though most cards are
# using common silicon with pci models).

21 years agoo go ahead and route the interupt, even if it is supposedly unique.
Warner Losh [Mon, 7 Oct 2002 05:15:05 +0000 (05:15 +0000)]
o go ahead and route the interupt, even if it is supposedly unique.
  there are some strange machines that seem to need this.
o delete bogus comment.
o don't use the the bios for read/writing config space.  They interact badly
  with SMP and being called from ISR.  This brings -current in line with
  -stable.

# make the latter #ifdef on USE_PCI_BIOS_FOR_READ_WRITE in case we
# need to go back in a hurry.

21 years agoAdd two interfaces to allow for busses to report the pnpinfo for
Warner Losh [Mon, 7 Oct 2002 05:06:38 +0000 (05:06 +0000)]
Add two interfaces to allow for busses to report the pnpinfo for
devices as well as their location on the bus.

21 years agodisable debug output by default.
Alfred Perlstein [Mon, 7 Oct 2002 04:13:21 +0000 (04:13 +0000)]
disable debug output by default.

21 years agowarn about p1003_1b_semaphores
Alfred Perlstein [Mon, 7 Oct 2002 04:09:16 +0000 (04:09 +0000)]
warn about p1003_1b_semaphores

21 years agoDisconnect "sem" module from the build.
Alfred Perlstein [Mon, 7 Oct 2002 04:08:07 +0000 (04:08 +0000)]
Disconnect "sem" module from the build.

21 years agoAdd 'break' to empty 'default' 'switch' statements.
Alfred Perlstein [Mon, 7 Oct 2002 03:56:13 +0000 (03:56 +0000)]
Add 'break' to empty 'default' 'switch' statements.

Requested by: mike

21 years agoWARNS=3 safety (mostly), use __unused for unused params and unsigned where
Alfred Perlstein [Mon, 7 Oct 2002 02:56:59 +0000 (02:56 +0000)]
WARNS=3 safety (mostly), use __unused for unused params and unsigned where
needed to avoid warnings about comparing signed and unsigned values.

21 years agoFix a spelling error in a comment.
Mike Barcroft [Mon, 7 Oct 2002 02:50:44 +0000 (02:50 +0000)]
Fix a spelling error in a comment.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>

21 years agofix line wrap.
Alfred Perlstein [Mon, 7 Oct 2002 01:19:56 +0000 (01:19 +0000)]
fix line wrap.

21 years agocast xdr_rpcblist_ptr to xdrproc_t to silence warnings.
Alfred Perlstein [Mon, 7 Oct 2002 01:16:00 +0000 (01:16 +0000)]
cast xdr_rpcblist_ptr to xdrproc_t to silence warnings.

21 years agoAdd ';' after 'default:' labels to avoid 'deprecated use of label at end
Alfred Perlstein [Mon, 7 Oct 2002 01:09:40 +0000 (01:09 +0000)]
Add ';' after 'default:' labels to avoid 'deprecated use of label at end
of compound statement' warnings.

21 years agoDon't pass a NULL pointer to syslog(3).
Alfred Perlstein [Mon, 7 Oct 2002 00:58:21 +0000 (00:58 +0000)]
Don't pass a NULL pointer to syslog(3).

Submitted by: kris

21 years agoUse strlcpy() instead of strcpy() to not overflow static buffers.
Kris Kennaway [Sun, 6 Oct 2002 23:52:06 +0000 (23:52 +0000)]
Use strlcpy() instead of strcpy() to not overflow static buffers.

21 years agoo Move location of the fpos_t typedef to be closer to other typedefs.
Mike Barcroft [Sun, 6 Oct 2002 22:16:12 +0000 (22:16 +0000)]
o Move location of the fpos_t typedef to be closer to other typedefs.
o Add typedef for va_list.
o Add comment about missing restrict type-qualifiers.
o Move vscanf(), vsscanf() and vfscanf() to the C99-visible block.
o Add note about missing backing function for vfscanf().
o Restrict L_cuserid to only older versions of POSIX, and BSD
  namespaces.
o Conditionalize some BSD-specific foo_unlock() macros.

21 years agoAdd conditionals to allow va_list to be defined in other headers.
Mike Barcroft [Sun, 6 Oct 2002 22:02:06 +0000 (22:02 +0000)]
Add conditionals to allow va_list to be defined in other headers.

21 years agoo Add conditionals to allow va_list to be defined in other headers.
Mike Barcroft [Sun, 6 Oct 2002 22:01:07 +0000 (22:01 +0000)]
o Add conditionals to allow va_list to be defined in other headers.
o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes.
o Restrict the definition of va_copy() to C99 environments.

21 years agoo Use relatively new visibility primitives from <sys/cdefs.h>.
Mike Barcroft [Sun, 6 Oct 2002 21:54:08 +0000 (21:54 +0000)]
o Use relatively new visibility primitives from <sys/cdefs.h>.
o Add typedef for pid_t.
o Add comment about missing restrict type-qualifier.
o Remove unneeded includes (<sys/_posix.h> and <sys/time.h>).

21 years agoDon't depend on <signal.h> to include <sys/time.h>, instead include
Mike Barcroft [Sun, 6 Oct 2002 21:46:04 +0000 (21:46 +0000)]
Don't depend on <signal.h> to include <sys/time.h>, instead include
<sys/time.h> directly.  This is mostly bogus since CLOCK_REALTIME
should be defined in <time.h>, which these files already include.

21 years agoWhen considering temporary files for deletion, don't examine the mtime
Joerg Wunsch [Sun, 6 Oct 2002 18:48:20 +0000 (18:48 +0000)]
When considering temporary files for deletion, don't examine the mtime
and atime only, but also the ctime.  Otherwise, files extracted from
tar or zip archives will immediately be declared stale since they've
got their mtime reset to the original mtime.

Reviewed by: brian
MFC after: 1 week

21 years agoAvoid referencing a removed (and freed) queue entry. This partially reverts
Dag-Erling Smørgrav [Sun, 6 Oct 2002 17:43:04 +0000 (17:43 +0000)]
Avoid referencing a removed (and freed) queue entry.  This partially reverts
revision 1.101 (which did not introduce the bug but made it harder to fix)

PR: misc/40363
Submitted by: David Dunham <dwdunham@isilon.com>
MFC after: 2 weeks

21 years agoSet only the RB_POWEROFF flag (not the RB_HALT flag) when
Thomas Quinot [Sun, 6 Oct 2002 16:24:36 +0000 (16:24 +0000)]
Set only the RB_POWEROFF flag (not the RB_HALT flag) when
'-p' is used on the reboot(8) command line.

This is intended for use when you want to attempt a power down
action, but you want the system to reboot (not halt) if the
power down action fails.

This is typically useful when the power-off action performed by
the kernel consists in signalling an uninterrupted power supply
that it should shut down its inverter if mains power has not returned.

The behaviour of shutdown(8) and init(8) is not modified;
only the behaviour of invoking 'reboot -p' manually is
modified, and then only in the case when a power-down action
fails.

Sounded reasonable to: phk
Approved by: roberto (mentor)

21 years agoIntegrate mac_check_socket_send() and mac_check_socket_receive()
Robert Watson [Sun, 6 Oct 2002 14:39:15 +0000 (14:39 +0000)]
Integrate mac_check_socket_send() and mac_check_socket_receive()
checks from the MAC tree: allow policies to perform access control
for the ability of a process to send and receive data via a socket.
At some point, we might also pass in additional address information
if an explicit address is requested on send.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoWhen reusing a pointer as a number, at least cast it
Maxime Henrion [Sun, 6 Oct 2002 14:02:35 +0000 (14:02 +0000)]
When reusing a pointer as a number, at least cast it
to uintptr_t rather than u_int to avoid warnings on
64 bits architectures.

21 years agoTrim accidentally introduced trailing whitespace.
Robert Watson [Sun, 6 Oct 2002 13:11:01 +0000 (13:11 +0000)]
Trim accidentally introduced trailing whitespace.

21 years agoFix a bunch of s/int */size_t */.
Maxime Henrion [Sun, 6 Oct 2002 12:20:09 +0000 (12:20 +0000)]
Fix a bunch of s/int */size_t */.

21 years agoRoll back to previous version, no need for NO_GEOM when GEOM is
Peter Grehan [Sun, 6 Oct 2002 12:13:12 +0000 (12:13 +0000)]
Roll back to previous version, no need for NO_GEOM when GEOM is
standard.

21 years agoYet another 64 bits warning fix: s/u_int/size_t/.
Maxime Henrion [Sun, 6 Oct 2002 12:07:58 +0000 (12:07 +0000)]
Yet another 64 bits warning fix: s/u_int/size_t/.

21 years agoFix a warning on 64 bits platforms: copyinstr() takes
Maxime Henrion [Sun, 6 Oct 2002 11:45:22 +0000 (11:45 +0000)]
Fix a warning on 64 bits platforms: copyinstr() takes
a size_t *, not an u_int *.

21 years agoFix a warning on 64 bits platforms: copystr() takes a size_t *,
Maxime Henrion [Sun, 6 Oct 2002 11:42:14 +0000 (11:42 +0000)]
Fix a warning on 64 bits platforms: copystr() takes a size_t *,
not an int *.

21 years agoClean up use of <stdarg.h> macros: always call va_end after va_start,
Tim J. Robbins [Sun, 6 Oct 2002 11:14:21 +0000 (11:14 +0000)]
Clean up use of <stdarg.h> macros: always call va_end after va_start,
reset with a call to va_start before each use of the va_list.

Obtained from: NetBSD

21 years agoAdd a note to the Compatiblity section suggesting that these functions
Tim J. Robbins [Sun, 6 Oct 2002 10:15:38 +0000 (10:15 +0000)]
Add a note to the Compatiblity section suggesting that these functions
only be used for byte values. Add cross-references to the wide-char
counterparts.

21 years agoBe consistent WRT function argument names. Other arguments only have
Mark Murray [Sun, 6 Oct 2002 09:56:52 +0000 (09:56 +0000)]
Be consistent WRT function argument names. Other arguments only have
types, so remove these names. This also helps by not polluting
namespace.

21 years agoEnsure all va_starts have a matching va_end.
Tim J. Robbins [Sun, 6 Oct 2002 09:23:58 +0000 (09:23 +0000)]
Ensure all va_starts have a matching va_end.

Obtained from: NetBSD

21 years agoWhile removing a memory leak, rev 1.32 introduced a
Philippe Charnier [Sun, 6 Oct 2002 09:09:27 +0000 (09:09 +0000)]
While removing a memory leak, rev 1.32 introduced a
free-memory-and-reuse-it-after. Correct both problems and
make rcp -r work again under /etc/malloc.conf -> AJ.

21 years agoPut giant locks due to make getaddrinfo(), getnameinfo()
Hajimu UMEMOTO [Sun, 6 Oct 2002 08:43:35 +0000 (08:43 +0000)]
Put giant locks due to make getaddrinfo(), getnameinfo()
and getipnodeby*() thread-safe.
Our res_*() is not thread-safe.  So, we share lock between
getaddrinfo() and getipnodeby*().  Still, we cannot use
getaddrinfo() and getipnodeby*() in conjunction with other
functions which call res_*().

Requested by: many people

21 years agoOops. Actually connect back msdosfs to the build for every platform.
Maxime Henrion [Sun, 6 Oct 2002 08:07:40 +0000 (08:07 +0000)]
Oops.  Actually connect back msdosfs to the build for every platform.

Spotted by: bde

21 years ago/dev/sa0 is the default tape device, not /dev/rst0.
Tim J. Robbins [Sun, 6 Oct 2002 07:56:27 +0000 (07:56 +0000)]
/dev/sa0 is the default tape device, not /dev/rst0.

21 years agoAllow -J to simultaneously do non-bzip2 grepping.
David E. O'Brien [Sun, 6 Oct 2002 07:02:30 +0000 (07:02 +0000)]
Allow -J to simultaneously do non-bzip2 grepping.
Don't allow -J and -Z together.

Partially submitted by: knu

21 years agoDisallow empty condition parts of "if", "while" and "until" compound
Tim J. Robbins [Sun, 6 Oct 2002 06:35:51 +0000 (06:35 +0000)]
Disallow empty condition parts of "if", "while" and "until" compound
commands. Commands like "if then ... fi" and "while do ... done" are no
longer accepted. Bodies of compound commands are still allowed to be
empty, because even though POSIX does not allow them, most shells do.