Commit graph

59113 commits

Author SHA1 Message Date
Kris Kennaway 19476d5cac Add back missing arguments to format strings.
Reviewed by:	hm
2001-04-26 08:40:35 +00:00
Kris Kennaway 778766fe4d Reduce diffs with OpenBSD:
#if __STDC__ -> #ifdef __STDC__
  pax_warn() -> paxwarn()
  sys_warn() -> syswarn()
  (foo *)NULL -> NULL
  bcopy -> memmove()/memcpy()
  bzero -> memset()
  Typo fixes
  sprintf() -> snprintf()
  rindex() -> strrchr()
  index() -> strchr()
  sys_errlist[] -> strerror()

Obtained from:	OpenBSD
2001-04-26 08:37:00 +00:00
Kris Kennaway ffbef1cd72 Use mkstemp() for secure tempfile creation instead of tempnam()
Obtained from:	OpenBSD
Reviewed by:	mikeh
2001-04-26 07:32:27 +00:00
Andrey A. Chernov f39162a2e1 Fix typo in prev commit - add missing comma 2001-04-26 06:48:59 +00:00
Dima Dorfman ea0aee1233 mdoc(7) police: remove hard sentence breaks. 2001-04-26 06:10:46 +00:00
Bill Fenner b9d92bf53e Add missing break when printing IPv6 multicast addresses.
Use the sockaddr_dl sdl_type, not ifnet.if_type, to decide what type
 a multicast sockaddr_dl is.
2001-04-26 06:02:03 +00:00
Will Andrews 40adb1a63b Remove GCC-ism (-Wall).
Submitted by:	bde
2001-04-26 04:40:57 +00:00
Mike Smith ed1c82f450 More new Dell PCI IDs.
Submitted by:	"Marty Moll" <martym@arbor.edu>
2001-04-26 01:14:37 +00:00
Kirk McKusick c9509f5865 Rather than copying all the indirect blocks of the snapshot,
simply mark them as BLK_NOCOPY. This trick cuts the initial
size of the snapshot in half and cuts the time to take a
snapshot by a third.
2001-04-26 00:50:53 +00:00
Mike Smith 71665b0add The PERC 3/Di in the Dell PowerEdge 2250 has a new subdevice ID.
Submitted by:	Chris Csanady <cc@ameslab.gov>
2001-04-26 00:32:02 +00:00
Alfred Perlstein 06336fb26d Sendfile is documented to return 0 on success, however if when a
sf_hdtr is used to provide writev(2) style headers/trailers on the
sent data the return value is actually either the result of writev(2)
from the trailers or headers of no tailers are specified.

Fix sendfile to comply with the documentation, by returning 0 on
success.

Ok'd by: dg
2001-04-26 00:14:14 +00:00
Paul Richards 9ca3a84af2 A bogus check for a char device also matched symbolic links.
Replace it with a correct check using S_ISCHR()

Symbolic links will now work again in linux compatibility.
2001-04-25 22:07:16 +00:00
Steve Price 4b21204b19 - Add some environment variables that need to be present when using packages
from the build cluster.  These are required to get the dependencies the
  same as the parallel builds.
- Add an optional second argument that allows you to specific an alternate
  ports directory.
- Remove the temporary file after we are done with it.
- Remove ksh93 because it won't make it on the discs until the license issues
  are resolved.

Approved by:	jkh
2001-04-25 21:40:57 +00:00
David E. O'Brien d6eb63ec62 Reduce the number of $FreeBSD$'s from 3 to 2. I believe both remaining
are needed for proper examples.
2001-04-25 20:58:28 +00:00
David E. O'Brien ea87b3cb61 Don't install KO's with the "schg" flag.
We are way too inconsistent with our setting of the "schg" flag, and in
our default install, it doesn't really offer any additional security.

Reviewed by:	arch@
2001-04-25 20:56:15 +00:00
David E. O'Brien 58c9a20771 Fix SCM ID's and remove tailing blanks. 2001-04-25 20:40:57 +00:00
Jim Mock 20affa347a Document XFREE86_VERSION. 2001-04-25 19:27:39 +00:00
David E. O'Brien f9722b4b48 Add /usr/X11R6/bin to the exported PATH. If /usr/local/bin is there,
/usr/X11R6/bin should be there.  This helps all the ports that need to
run `mkfontdir' and error out as many port maintainers do not realize
`mkfontdir' isn't in the path.

Prompted by:	pkg_add pcemu
2001-04-25 19:11:09 +00:00
Kirk McKusick 145643dbc8 Add support for -F flag (trivial as background check is never possible). 2001-04-25 19:05:23 +00:00
Alfred Perlstein 5f8568ec81 Fix compiling without -O, some dead code was using non-existant functions,
make the code not automatically dead but actually use the debug level
in order to determine if output is needed.  Fix non-existant from_addr()
by #define'ing it to inet_ntoa().

Remove hardcoded -g from Makefile.

Reported by: "John W. De Boskey" <jwd@bsdwins.com>
Tested by: "John W. De Boskey" <jwd@bsdwins.com>
2001-04-25 18:40:38 +00:00
John Baldwin bb61024d88 - Make the dumping of console messages from the secondary CPU's to the
kernel console be #ifdef DIAGNOSTIC.
- Don't set ktr_mask in release_aps().
2001-04-25 17:24:57 +00:00
Ruslan Ermilov 67dd89f344 Backout rev.1.30, as the root of this problem was already fixed
in bsd.obj.mk rev.1.35, and

On Tue, Apr 24, 2001 at 06:29:27AM +1000, Bruce Evans wrote:
>
> This is bogus.  It is normal for sloppy cleaning to cause problems.
> `make depend' after `make depend' should not do anything.  I'm still
> waiting for a similar problem in kdump to be fixed properly :-).
2001-04-25 15:10:36 +00:00
Ruslan Ermilov 9aa8f5f68a Add -Wall. 2001-04-25 14:59:16 +00:00
Ruslan Ermilov f8532548a6 -Wall cleanup. 2001-04-25 14:45:36 +00:00
Ruslan Ermilov 73295d34c7 unifdef -UWANT_ENV_PWD.
No one ever going to use this bugfeature.
2001-04-25 14:44:42 +00:00
Ruslan Ermilov 43403d166a Make ${.OBJDIR} canonical.
Reviewed by:	bde
2001-04-25 14:22:38 +00:00
Andrew Gallatin 7b6630700d alpha_fpstate_save is fairly expensive (critical enter/exit, possibly
saves 32 registers) to do on every context switch.  This is only required
for SMP, so only do it there.

We should also look at moving the critical enter/exit out to the callers
2001-04-25 13:57:33 +00:00
Ruslan Ermilov 2c1f07ae14 Fixed typo.
PR:		bin/26836
Submitted by:	Matthew Seaman <matthew.seaman@tornadogroup.com>
2001-04-25 12:11:54 +00:00
Bruce Evans e8a28f87d8 MFffs ffs_balloc.c 1.5.
Long ago, bread() set b_blkno to the disk block number as a side effect
of doing physical i/o (or it just retained the setting from when the
i/o was done).  The setting is lost when buffers go away and then are
reconsituted from VM.  bread() originally compensated by doing a
VOP_BMAP() to recover b_blkno, but this was no good since it sometimes
caused extra i/o or even deadlock for bread()ing metadata to do the
bmap.  This was fixed in vfs_bio.c 1.33 (1995/03/03) and ffs_balloc.c
1.5, etc., by removing the VOP_BMAP() from bread() and breadn(), and
changing all (?) places that used b_blkno to set it if necessary.

ext2fs was not imported until later in 1995 and was still depending on
the old behaviour of bread() in at least ext2_balloc().  This caused
filesystem and file corruption by clobbering direct block numbers in
inodes.
2001-04-25 10:33:09 +00:00
Seigo Tanimura ebdc3f1d2d Do not leave a process with no credential in zombproc.
Reviewed by:	jhb
2001-04-25 10:22:35 +00:00
Kirk McKusick 112f737245 When closing the last reference to an unlinked file, it is freed
by the inactive routine. Because the freeing causes the filesystem
to be modified, the close must be held up during periods when the
filesystem is suspended.

For snapshots to be consistent across crashes, they must write
blocks that they copy and claim those written blocks in their
on-disk block pointers before the old blocks that they referenced
can be allowed to be written.

Close a loophole that allowed unwritten blocks to be skipped when
doing ffs_sync with a request to wait for all I/O activity to be
completed.
2001-04-25 08:11:18 +00:00
Doug Barton e69b2bc11c Reverse order of from and to in order to match reality.
PR:		26631
Submitted by:	Glenn Johnson, glennpj@charter.net
2001-04-25 07:43:45 +00:00
David E. O'Brien 74c7a2f52b Update for file 3.35. 2001-04-25 07:42:15 +00:00
David E. O'Brien 4af11a9683 This commit was generated by cvs2svn to compensate for changes in r75937,
which included commits to RCS files with non-trunk default branches.
2001-04-25 07:41:21 +00:00
David E. O'Brien 61295bbb39 Virgin import of Christos Zoulas's FILE 3.35. 2001-04-25 07:41:21 +00:00
Kirk McKusick a02a0079ca Add support for running foreground (-F) and background (-B) checks.
Traditionally, fsck is invoked before the filesystems are mounted
and all checks are done to completion at that time. If background
checking is available, fsck is invoked twice. It is first invoked
at the traditional time, before the filesystems are mounted, with
the -F flag to do checking on all the filesystems that cannot do
background checking. It is then invoked a second time, after the
system has completed going multiuser, with the -B flag to do checking
on all the filesystems that can do background checking. Unlike
the foreground checking, the background checking is started
asynchonously so that other system activity can proceed even on
the filesystems that are being checked.

At the moment, only the fast filesystem supports background checking.
To be able to do background checking, a filesystem must have been
running with soft updates, not have been marked as needing a
foreground check, and be mounted and writable when the background
check is to be done (i.e., not listed as `noauto' in /etc/fstab).

These changes are the final piece needed to support background
filesystem checking. They will not have any effect until you update
your /etc/rc to invoke fsck in its new mode of operation. I am
still playing around with exactly what those changes should be
and should be committing them later this week.
2001-04-25 07:18:22 +00:00
Poul-Henning Kamp a13234bb35 Move the netexport structure from the fs-specific mountstructure
to struct mount.

This makes the "struct netexport *" paramter to the vfs_export
and vfs_checkexport interface unneeded.

Consequently that all non-stacking filesystems can use
vfs_stdcheckexp().

At the same time, make it a pointer to a struct netexport
in struct mount, so that we can remove the bogus AF_MAX
and #include <net/radix.h> from <sys/mount.h>
2001-04-25 07:07:52 +00:00
Warner Losh 40afc1048e Ignore chflags errors. This makes installing to nfs mounted target
directories work.
2001-04-25 06:19:58 +00:00
Dima Dorfman bd737b2099 "break", "chdir", "continue", "else", and "while" are sh(1) builtins;
mark them as such.

PR:		26702
2001-04-25 05:53:20 +00:00
Warner Losh 9f474ffc5c Move to using md.
o create a simple wrapper function mount_md that makes it easy to
  move from mount_mfs.

# NOTE: you will need to MAKEDEV md[0123] in order for this to work.

Reviewed by: bsd, keichii
2001-04-25 05:46:40 +00:00
Dima Dorfman 1928e20e95 Teach cut(1) how to handle long lines: convert from fgets(3) to fgetln(3).
PR:		26810
Reviewed by:	dwmalone
2001-04-25 05:42:53 +00:00
Bruce A. Mah 5d9898abd3 New release notes: TCP_COMPAT_42 option gone, labpc(4) gone, client-side
NFS locks, devinfo(8), options REGRESSION.
2001-04-24 22:47:34 +00:00
Chris D. Faulhaber 0f6263079e o Separate acl_t into internal and external representations as
required by POSIX.1e.  This maintains the current 'struct acl'
  in the kernel while providing the generic external acl_t
  interface required to complete the ACL editing library.
o Add the acl_get_entry() function.
o Convert the existing ACL utilities, getfacl and setfacl, to
  fully make use of the ACL editing library.

Obtained from:	TrustedBSD Project
2001-04-24 22:45:41 +00:00
Kirk McKusick 15fca934f6 Add support for the -F flag which determines whether a specified
filesystem needs foreground checking (usually at boot time) or
can defer to background checking (after the system is up and running).
See the manual page, fsck_ffs(8), for details on the -F and -B options.
These options are primarily intended for use by the fsck front end.

All output is directed to stdout so that the output is coherent
when redirected to a file or a pipe. Unify the code with the fsck
front end that allows either a device or a mount point to be
specified as the argument to be checked.
2001-04-24 22:38:08 +00:00
Cameron Grant 15418cf2bb get the parameters to pci_write_config the right way round. this may fix
some non-functional cards/machines
2001-04-24 22:35:11 +00:00
John Baldwin 9e438eb4f5 Add a new field 'md_kernnest' to the alpha machine dependent process
structure.  This field keeps track of how many levels deep we are nested
into the kernel.  The nesting level is bumped at the start of a trap,
interrupt, syscall, or exception and is decremented on return.  This is
used to detect the case when the kernel is returning back to a kernel
context in exception_return().  If we are returning to the kernel we need
to update the globaldata pointer register saved in the stack frame in case
we have switched CPU's between taking the initial interrupt that saved the
frame and returning.  If we don't do this fixup it is possible for a CPU to
use the wrong per-cpu data.  On UP systems this is not a problem, so the
code is conditional on SMP.

A count was used instead of simply checking the process status register in
the frame during exception_return() since there are critical sections at
the very start and end of a trap, exception, or interrupt from userland in
which we could trash the t7 register being used in userland.  The counter
is incremented after adn before these critical sections respectively so
that we will not overwrite the saved t7 register if we are interrupted
during one of these critical sections.
2001-04-24 21:06:53 +00:00
Thomas Moestl a483f58aea Remove bogus assignments of libc syscall stub return values to errno;
the stubs do errno assignments and return -1 in this case, so that errno
would end up with this value.

Approved by:	rwatson
2001-04-24 20:50:42 +00:00
Jeroen Ruigrok van der Werven b94ea15307 Wrap lint calling in a variable.
Set LINT to the obj path, since we need to use the new lint's features
to create .ln files.  We do not want to use the installed version for that,
since that might create files according to the old lint.

This is still a work in progress to clean this all up, but it gets
through buildworld, which was the problem at hand.
2001-04-24 20:23:37 +00:00
Jeroen Ruigrok van der Werven e41281f1d2 Add build-tools target to the description file, requisite of making
lint a build-tool.

Also re-enable llib.
2001-04-24 20:20:41 +00:00
Jeroen Ruigrok van der Werven 1048d3c9eb Add usr.bin/xlint to build-tools. 2001-04-24 20:19:29 +00:00