Commit Graph

2397 Commits

Author SHA1 Message Date
Poul-Henning Kamp
6d4a212d49 Allow specification of which source address to use for encapsulation.
PR:		25847
Submitted by:	Eugene Polovnikov <eugene@brain-fag.org>
2001-03-28 17:30:26 +00:00
David E. O'Brien
b2f6bdeeaa Make rev 1.5 better match the rest of dump(8)'s output. 2001-03-27 19:38:34 +00:00
David E. O'Brien
8cc6e4d84a Do not exit if unable to read /etc/dumpdates or create it.
If one is trying to dump or repair an ill system, give the user a fighting
chance.  Refusing to operate w/o a very non-critical file (feature) is
just plain stupid.
2001-03-27 19:28:00 +00:00
Alfred Perlstein
8f15078110 give the "netgrent" functions a home in netdb.h 2001-03-27 09:49:03 +00:00
Kenneth D. Merry
3393f8daa3 Rewrite of the CAM error recovery code.
Some of the major changes include:

	- The SCSI error handling portion of cam_periph_error() has
	  been broken out into a number of subfunctions to better
	  modularize the code that handles the hierarchy of SCSI errors.
	  As a result, the code is now much easier to read.

	- String handling and error printing has been significantly
	  revamped.  We now use sbufs to do string formatting instead
	  of using printfs (for the kernel) and snprintf/strncat (for
	  userland) as before.

	  There is a new catchall error printing routine,
	  cam_error_print() and its string-based counterpart,
	  cam_error_string() that allow the kernel and userland
	  applications to pass in a CCB and have errors printed out
	  properly, whether or not they're SCSI errors.  Among other
	  things, this helped eliminate a fair amount of duplicate code
	  in camcontrol.

	  We now print out more information than before, including
	  the CAM status and SCSI status and the error recovery action
	  taken to remedy the problem.

	- sbufs are now available in userland, via libsbuf.  This
	  change was necessary since most of the error printing code
	  is shared between libcam and the kernel.

	- A new transfer settings interface is included in this checkin.
	  This code is #ifdef'ed out, and is primarily intended to aid
	  discussion with HBA driver authors on the final form the
	  interface should take.  There is example code in the ahc(4)
	  driver that implements the HBA driver side of the new
	  interface.  The new transfer settings code won't be enabled
	  until we're ready to switch all HBA drivers over to the new
	  interface.

src/Makefile.inc1,
lib/Makefile:		Add libsbuf.  It must be built before libcam,
			since libcam uses sbuf routines.

libcam/Makefile:	libcam now depends on libsbuf.

libsbuf/Makefile:	Add a makefile for libsbuf.  This pulls in the
			sbuf sources from sys/kern.

bsd.libnames.mk:	Add LIBSBUF.

camcontrol/Makefile:	Add -lsbuf.  Since camcontrol is statically
			linked, we can't depend on the dynamic linker
			to pull in libsbuf.

camcontrol.c:		Use cam_error_print() instead of checking for
			CAM_SCSI_STATUS_ERROR on every failed CCB.

sbuf.9:			Change the prototypes for sbuf_cat() and
			sbuf_cpy() so that the source string is now a
			const char *.  This is more in line wth the
			standard system string functions, and helps
			eliminate warnings when dealing with a const
			source buffer.

			Fix a typo.

cam.c:			Add description strings for the various CAM
			error status values, as well as routines to
			look up those strings.

			Add new cam_error_string() and
			cam_error_print() routines for userland and
			the kernel.

cam.h:			Add a new CAM flag, CAM_RETRY_SELTO.

			Add enumerated types for the various options
			available with cam_error_print() and
			cam_error_string().

cam_ccb.h:		Add new transfer negotiation structures/types.

			Change inq_len in the ccb_getdev structure to
			be "reserved".  This field has never been
			filled in, and will be removed when we next
			bump the CAM version.

cam_debug.h:		Fix typo.

cam_periph.c:		Modularize cam_periph_error().  The SCSI error
			handling part of cam_periph_error() is now
			in camperiphscsistatuserror() and
			camperiphscsisenseerror().

			In cam_periph_lock(), increase the reference
			count on the periph while we wait for our lock
			attempt to succeed so that the periph won't go
			away while we're sleeping.

cam_xpt.c:		Add new transfer negotiation code.  (ifdefed
			out)

			Add a new function, xpt_path_string().  This
			is a string/sbuf analog to xpt_print_path().

scsi_all.c:		Revamp string handing and error printing code.
			We now use sbufs for much of the string
			formatting code.  More of that code is shared
			between userland the kernel.

scsi_all.h:		Get rid of SS_TURSTART, it wasn't terribly
			useful in the first place.

			Add a new error action, SS_REQSENSE.  (Send a
			request sense and then retry the command.)
			This is useful when the controller hasn't
			performed autosense for some reason.

			Change the default actions around a bit.

scsi_cd.c,
scsi_da.c,
scsi_pt.c,
scsi_ses.c:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.  Selection
			timeouts shouldn't be covered by a sense flag.

scsi_pass.[ch]:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.

			Get rid of the last vestiges of a read/write
			interface.

libkern/bsearch.c,
sys/libkern.h,
conf/files:		Add bsearch.c, which is needed for some of the
			new table lookup routines.

aic7xxx_freebsd.c:	Define AHC_NEW_TRAN_SETTINGS if
			CAM_NEW_TRAN_CODE is defined.

sbuf.h,
subr_sbuf.c:		Add the appropriate #ifdefs so sbufs can
			compile and run in userland.

			Change sbuf_printf() to use vsnprintf()
			instead of kvprintf(), which is only available
			in the kernel.

			Change the source string for sbuf_cpy() and
			sbuf_cat() to be a const char *.

			Add __BEGIN_DECLS and __END_DECLS around
			function prototypes since they're now exported
			to userland.

kdump/mkioctls:		Include stdio.h before cam.h since cam.h now
			includes a function with a FILE * argument.

Submitted by:	gibbs (mostly)
Reviewed by:	jdp, marcel (libsbuf makefile changes)
Reviewed by:	des (sbuf changes)
Reviewed by:	ken
2001-03-27 05:45:52 +00:00
David E. O'Brien
094ab93715 The common wisdom is to use the largest number of cylinders per group.
So bump the default from `16' to `22', which is the largest value allowed
with the current default block size.  This change increases the the
group size from 32MB/g to 44MB/g on a 4GB SCSI disk.
2001-03-27 01:34:58 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Alfred Perlstein
e0a509bb08 Don't call daemon() and setup our signal handlers until after we check
and do the unregister/reregister work.

Don't call syslog in the unregister/reregister code as we haven't called
openlog() yet.

Be a more conservative about accepting errno values from socket(2),
only EPROTONOSUPPORT means that the kernel isn't supporting it
something like INET6.  The other possible errnos would be returned
if there was a mistake in the socket(2) call so remove them from the
list of "acceptable" return values.
2001-03-25 23:32:55 +00:00
Alfred Perlstein
69444aa31b Disable ipv6 when getnetconfigent("udp6"/"tcp6") fails.
Submitted by: Martin Blapp <mb@imp.ch>
2001-03-25 23:28:03 +00:00
Alfred Perlstein
7b98a1d680 Replace pmap_unset() with rpcb_unset() which fixes the unregistering.
Submitted by: Martin Blapp <mb@imp.ch>
2001-03-25 19:59:07 +00:00
Alfred Perlstein
95b9973991 Deal with lack of IPv6 support gracefully.
Submitted by: Martin Blapp <mb@imp.ch>
2001-03-25 19:57:58 +00:00
Alfred Perlstein
12d6e650c6 fix -o port=xxx 2001-03-25 19:18:43 +00:00
Ollivier Robert
ed873335b7 Respect style(9), one must not include both <sys/types.h> and
<sys/param.h> (the latter includes the former).

Submitted by:	bde
2001-03-22 13:19:32 +00:00
Alfred Perlstein
9eb8ec95f4 Include headers to unbreak world.
Submitted by: Ollivier Robert <roberto@eurocontrol.fr>
2001-03-21 20:30:35 +00:00
Kirk McKusick
7578c6ab98 Additions to run checks on live filesystems. This change will not
affect current systems until fsck is modified to use these new
facilities. To try out this change, set the fsck passno to zero
in /etc/fstab to cause the filesystem to be mounted without running
fsck, then run `fsck_ffs -p -B <filesystem>' after the system has
been brought up multiuser to run a background cleanup on <filesystem>.
Note that the <filesystem> in question must have soft updates enabled.
2001-03-21 09:48:03 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Ian Dowse
85ae580ccb Reboot(8) normally waits 5 seconds after sending SIGTERMs to all
processes and then sends SIGKILLs. If a lot of processes are swapped
out, this delay may not be long enough, so processes such as an X
server may be killed before they have had time to clean up properly.

Make this delay more dynamic by waiting up to 60 seconds for swap
page-in activity to end. While I'm here, ANSIfy and remove a
`register' specifier.
2001-03-20 17:22:48 +00:00
Ruslan Ermilov
a24add3fb3 mdoc(7) police: fixes to the previous revision:
- fixed bad formatting
- avoid using German
- removed hard sentence break
2001-03-20 10:57:25 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Ruslan Ermilov
fe997d964c Fix minor mdoc(7) and spelling nits. 2001-03-19 08:20:34 +00:00
Søren Schmidt
29ad98da92 Activate atacontrol 2001-03-19 07:59:38 +00:00
Søren Schmidt
69658f3595 Some minor cleanups to the code, no new functionality. 2001-03-19 07:58:47 +00:00
Søren Schmidt
3ec5a2774f Incorporate most of Ruslans changes plus minor addtion by me 2001-03-19 07:57:25 +00:00
Hajimu UMEMOTO
e3a50e99c6 Correct typo in usage.
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
2001-03-18 18:45:43 +00:00
Ruslan Ermilov
e1a85079e7 It is the ``nostrictjoliet'' option equivalent to -b.
Reviewed by:	bp
2001-03-16 12:55:54 +00:00
Warner Losh
ab820341c1 Back out ru's changes. Soren has requested this and I see no reason
to not just do it.  It is his new code that is being actively
developed so he has say over it.  ru's direct changes were premature
as they occurred less than 4 hours after it was committed to the tree.
2001-03-16 08:07:00 +00:00
Ruslan Ermilov
7350bb3af1 mdoc(7) police: removed hard sentence break introduced in rev 1.82. 2001-03-16 07:39:46 +00:00
Dima Dorfman
32de505213 Explain that TCP fragments with an offset of 1 are reported as being
dropped by rule -1 if logging is enabled.

PR:		25796
Submitted by:	Crist J. Clark <cjclark@alum.mit.edu>
Approved by:	nik
2001-03-16 01:28:11 +00:00
Ruslan Ermilov
905a2385bf Make this compile with ${BDECFLAGS}, apply style(9), cleanup manpage. 2001-03-15 19:28:58 +00:00
Søren Schmidt
6ad7a0b6f2 Add atacontrol, a util to control variuos aspects of the ATA.4 driver,
please consult atacontrol.8 for usage..
2001-03-15 15:40:53 +00:00
Ruslan Ermilov
3832aecacb mdoc(7) police: add a missing An call. 2001-03-12 09:18:12 +00:00
Boris Popov
8c602ed981 Update userland interface for broken Joilet disks.
Reviewed by:	adrian
2001-03-11 10:06:28 +00:00
Maxim Sobolev
ed23a390c2 In the absence of explicit `-t type'' option assume that `-f file''
implies ``-t vnode''.

Approved by:	phk
2001-03-09 21:15:08 +00:00
Poul-Henning Kamp
e10469fef8 Make md(4) and mdconfig(8) take over the role of vn(4) and vnconfig(8)
entirely as previously advertised.

md(4) adopted all assets of vn(4) some time back and has proper devfs
support and cloning abilities to boot.
2001-03-09 20:09:28 +00:00
Poul-Henning Kamp
83da2a90ae 1) If mdconfig isn't given an action argument, it assumes detach.
2) Running `mdconfig -l` without any attached devices results in
mdconfig printing "md0" to standard output.

Submitted by:	dd [1]

[1] no, not "dd(1)" but "Dima Dorfman"
2001-03-09 20:05:06 +00:00
Ruslan Ermilov
211bfbd228 Add new option -m which allows the user to set IP TTL. 2001-03-09 13:20:23 +00:00
David E. O'Brien
ff7405adba bye-bye documented raw devices 2001-03-09 13:06:53 +00:00
David E. O'Brien
02344806db bye-bye documented raw device 2001-03-09 13:06:09 +00:00
David E. O'Brien
8454c72c24 Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,
and remove leading `r'(aw) from it.
2001-03-08 09:04:40 +00:00
Dag-Erling Smørgrav
867dd03869 Restore the -c option, which was accidentally removed from the getopt
string two revisions ago.
2001-03-06 01:58:30 +00:00
Ruslan Ermilov
7733674e31 mdoc(7) police: misc formatting fixes.
(This page still needs a lot of work.)
2001-03-05 15:33:54 +00:00
Warner Losh
8d3105e8d4 First attempt to not overflow in disk space calculations. Use off_t
for the size variable used to calculate the size of the partition.
Also use ULL suffix for constants to ensure that we use 64 bit math.
2001-03-05 03:39:57 +00:00
David E. O'Brien
9a901d972d Fix style nit. 2001-03-04 13:19:51 +00:00
Kris Kennaway
b5bc4b5cb2 Correct grammar in comment. 2001-03-04 07:14:11 +00:00
David E. O'Brien
801382fa98 Support inheritance of the "nodump" flag down a hierarchy.
Submitted by:	Dima Dorfman <dima@unixfreak.org>
Obtained from:	NetBSD
2001-03-03 11:35:50 +00:00
Jeroen Ruigrok van der Werven
8a8d42eebb Fix typo present since 1997: single used mode -> single user mode. 2001-03-03 08:12:58 +00:00
David E. O'Brien
1d9153d7ad Use _PATH_DEV.
Reviewed by:	grog
2001-02-28 17:50:29 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00