summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1996-03-19 23:14:49 +0000
committerniklas <niklas@openbsd.org>1996-03-19 23:14:49 +0000
commit3fbbad10a5e74a7aaa576a50d86494daddc162b3 (patch)
treebec35e877279413f30916fe46b8c9a5921b002b5 /lib/libc
parentMerging w/ NetBSD 021796. (diff)
downloadwireguard-openbsd-3fbbad10a5e74a7aaa576a50d86494daddc162b3.tar.xz
wireguard-openbsd-3fbbad10a5e74a7aaa576a50d86494daddc162b3.zip
From NetBSD: merge of 960317
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/sparc/gen/_setjmp.S12
-rw-r--r--lib/libc/compat-43/getdtablesize.37
-rw-r--r--lib/libc/net/inet_network.c10
-rw-r--r--lib/libc/rpc/xdr_float.c9
-rw-r--r--lib/libc/stdlib/strtod.c16
-rw-r--r--lib/libc/stdlib/system.38
-rw-r--r--lib/libc/string/strftime.37
-rw-r--r--lib/libc/sys/listen.25
-rw-r--r--lib/libc/sys/mount.244
-rw-r--r--lib/libc/sys/ptrace.2303
-rw-r--r--lib/libc/yp/ypclnt.339
11 files changed, 252 insertions, 208 deletions
diff --git a/lib/libc/arch/sparc/gen/_setjmp.S b/lib/libc/arch/sparc/gen/_setjmp.S
index ed1f542d4f7..b9f82f655fd 100644
--- a/lib/libc/arch/sparc/gen/_setjmp.S
+++ b/lib/libc/arch/sparc/gen/_setjmp.S
@@ -1,4 +1,7 @@
+/* $OpenBSD: _setjmp.S,v 1.2 1996/03/19 23:15:05 niklas Exp $ */
+
/*
+ *
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -35,7 +38,6 @@
* SUCH DAMAGE.
*
* from: Header: _setjmp.s,v 1.1 91/07/06 16:45:53 torek Exp
- * $Id: _setjmp.S,v 1.1.1.1 1995/10/18 08:41:40 deraadt Exp $
*/
#if defined(LIBC_SCCS) && !defined(lint)
@@ -56,8 +58,9 @@
#include "DEFS.h"
ENTRY(_setjmp)
- std %sp, [%o0+0] /* caller's stack pointer and return pc */
- st %fp, [%o0+8] /* store caller's frame pointer */
+ st %sp, [%o0+0] /* store caller's stack pointer */
+ st %o7, [%o0+4] /* ... return pc */
+ st %fp, [%o0+8] /* ... and frame pointer */
retl
clr %o0 ! return 0
@@ -73,7 +76,7 @@ ENTRY(_longjmp)
bl,a 1b ! if below,
restore ! pop frame and loop
be,a 2f ! if there,
- ldd [%g1+0], %o2 ! fetch return %sp and pc, and get out
+ ld [%g1+0], %o2 ! fetch return %sp
Lbotch:
call _longjmperror ! otherwise, went too far; bomb out
@@ -86,5 +89,6 @@ Lbotch:
mov %o2, %sp ! it is OK, put it in place
b,a Lbotch
3:
+ ld [%g1+4], %o3 ! fetch pc
jmp %o3 + 8 ! success, return %g6
mov %g6, %o0
diff --git a/lib/libc/compat-43/getdtablesize.3 b/lib/libc/compat-43/getdtablesize.3
index ac99127a3f0..11ecd7a07a7 100644
--- a/lib/libc/compat-43/getdtablesize.3
+++ b/lib/libc/compat-43/getdtablesize.3
@@ -1,3 +1,5 @@
+.\" $OpenBSD: getdtablesize.3,v 1.2 1996/03/19 23:15:06 niklas Exp $
+.\"
.\" Copyright (c) 1983, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -30,7 +32,6 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)getdtablesize.2 6.5 (Berkeley) 3/10/91
-.\" $Id: getdtablesize.3,v 1.1.1.1 1995/10/18 08:41:46 deraadt Exp $
.\"
.Dd March 10, 1991
.Dt GETDTABLESIZE 3
@@ -52,8 +53,10 @@ returns the size of this table.
.Sh SEE ALSO
.Xr close 2 ,
.Xr dup 2 ,
+.Xr getrlimit 2 ,
.Xr open 2 ,
-.Xr select 2
+.Xr select 2 ,
+.Xr sysconf 3
.Sh HISTORY
The
.Fn getdtablesize
diff --git a/lib/libc/net/inet_network.c b/lib/libc/net/inet_network.c
index 35105fa75a8..3de21a5bac8 100644
--- a/lib/libc/net/inet_network.c
+++ b/lib/libc/net/inet_network.c
@@ -1,4 +1,5 @@
-/* $NetBSD: inet_network.c,v 1.4 1995/02/25 06:20:45 cgd Exp $ */
+/* $OpenBSD: inet_network.c,v 1.2 1996/03/19 23:15:08 niklas Exp $ */
+/* $NetBSD: inet_network.c,v 1.5 1996/02/17 15:35:41 hpeyerl Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +38,8 @@
#if 0
static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$NetBSD: inet_network.c,v 1.4 1995/02/25 06:20:45 cgd Exp $";
+static char rcsid[] = "$OpenBSD: inet_network.c,v 1.2 1996/03/19 23:15:08 niklas Exp $";
+static char rcsid[] = "$NetBSD: inet_network.c,v 1.5 1996/02/17 15:35:41 hpeyerl Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -80,7 +82,7 @@ again:
break;
}
if (*cp == '.') {
- if (pp >= parts + 4)
+ if (pp >= parts + 3)
return (INADDR_NONE);
*pp++ = val, cp++;
goto again;
@@ -89,8 +91,6 @@ again:
return (INADDR_NONE);
*pp++ = val;
n = pp - parts;
- if (n > 4)
- return (INADDR_NONE);
for (val = 0, i = 0; i < n; i++) {
val <<= 8;
val |= parts[i] & 0xff;
diff --git a/lib/libc/rpc/xdr_float.c b/lib/libc/rpc/xdr_float.c
index 84315d4b907..4f621ac2256 100644
--- a/lib/libc/rpc/xdr_float.c
+++ b/lib/libc/rpc/xdr_float.c
@@ -1,4 +1,5 @@
-/* $NetBSD: xdr_float.c,v 1.9 1995/06/05 11:48:26 pk Exp $ */
+/* $OpenBSD: xdr_float.c,v 1.2 1996/03/19 23:15:09 niklas Exp $ */
+/* $NetBSD: xdr_float.c,v 1.10 1996/02/16 21:14:03 mark Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -32,7 +33,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$NetBSD: xdr_float.c,v 1.9 1995/06/05 11:48:26 pk Exp $";
+static char *rcsid = "$OpenBSD: xdr_float.c,v 1.2 1996/03/19 23:15:09 niklas Exp $";
+static char *rcsid = "$NetBSD: xdr_float.c,v 1.10 1996/02/16 21:14:03 mark Exp $";
#endif
/*
@@ -57,7 +59,8 @@ static char *rcsid = "$NetBSD: xdr_float.c,v 1.9 1995/06/05 11:48:26 pk Exp $";
*/
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
- defined(__mips__) || defined(__ns32k__) || defined(__alpha__)
+ defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
+ defined(__arm32__)
#include <machine/endian.h>
#define IEEEFP
#endif
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
index b13fa128f5b..f1c54639335 100644
--- a/lib/libc/stdlib/strtod.c
+++ b/lib/libc/stdlib/strtod.c
@@ -1,3 +1,6 @@
+/* $OpenBSD: strtod.c,v 1.2 1996/03/19 23:15:11 niklas Exp $ */
+/* $NetBSD: strtod.c,v 1.21 1996/02/16 21:19:29 mark Exp $ */
+
/****************************************************************
*
* The author of this software is David M. Gay.
@@ -90,7 +93,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id: strtod.c,v 1.1.1.1 1995/10/18 08:42:19 deraadt Exp $";
+static char *rcsid = "$OpenBSD: strtod.c,v 1.2 1996/03/19 23:15:11 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
@@ -103,6 +106,15 @@ static char *rcsid = "$Id: strtod.c,v 1.1.1.1 1995/10/18 08:42:19 deraadt Exp $"
#endif
#endif
+#ifdef __arm32__
+/*
+ * Although the CPU is little endian the FP has different
+ * byte and word endianness. The byte order is still little endian
+ * but the word order is big endian.
+ */
+#define IEEE_BIG_ENDIAN
+#endif
+
#ifdef vax
#define VAX
#endif
@@ -224,7 +236,7 @@ IBM should be defined.
* An alternative that might be better on some machines is
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/
-#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX)
+#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm32__)
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
((unsigned short *)a)[0] = (unsigned short)c, a++)
#else
diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3
index d77a082545a..b3e3cb8e472 100644
--- a/lib/libc/stdlib/system.3
+++ b/lib/libc/stdlib/system.3
@@ -1,3 +1,6 @@
+.\" $OpenBSD: system.3,v 1.3 1996/03/19 23:15:12 niklas Exp $
+.\" $NetBSD: system.3,v 1.7 1996/02/16 22:30:46 jtc Exp $
+.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -34,7 +37,6 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)system.3 6.5 (Berkeley) 6/29/91
-.\" $Id: system.3,v 1.2 1995/11/01 16:43:27 deraadt Exp $
.\"
.Dd June 29, 1991
.Dt SYSTEM 3
@@ -87,8 +89,8 @@ returns the termination status for a program that terminates with a call of
.Sh SEE ALSO
.Xr sh 1 ,
.Xr execve 2 ,
-.Xr popen 3 ,
-.Xr waitpid 3 ,
+.Xr waitpid 2 ,
+.Xr popen 3
.Sh STANDARDS
The
.Fn system
diff --git a/lib/libc/string/strftime.3 b/lib/libc/string/strftime.3
index f14db4bb13e..a6eecd95e0d 100644
--- a/lib/libc/string/strftime.3
+++ b/lib/libc/string/strftime.3
@@ -1,3 +1,5 @@
+.\" $OpenBSD: strftime.3,v 1.2 1996/03/19 23:15:14 niklas Exp $
+.\"
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -34,7 +36,6 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)strftime.3 5.12 (Berkeley) 6/29/91
-.\" $Id: strftime.3,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $
.\"
.Dd June 29, 1991
.Dt STRFTIME 3
@@ -157,9 +158,9 @@ the week) as a decimal number (00-53).
is replaced by the weekday (Sunday as the first day of the week)
as a decimal number (0-6).
.It Cm \&%X
-is replaced by the locale's appropriate date representation.
-.It Cm \&%x
is replaced by the locale's appropriate time representation.
+.It Cm \&%x
+is replaced by the locale's appropriate date representation.
.It Cm \&%Y
is replaced by the year with century as a decimal number.
.It Cm \&%y
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index ab7c0c5f636..a44a951bd95 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -1,4 +1,5 @@
-.\" $NetBSD: listen.2,v 1.6 1995/02/27 12:34:05 cgd Exp $
+.\" $OpenBSD: listen.2,v 1.2 1996/03/19 23:15:16 niklas Exp $
+.\" $NetBSD: listen.2,v 1.7 1996/02/16 20:38:45 phil Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -95,7 +96,7 @@ The socket is not of a type that supports the operation
.Sh BUGS
The
.Fa backlog
-is currently limited (silently) to 5.
+is currently limited (silently) to 128.
.Sh HISTORY
The
.Fn listen
diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2
index 068cbc87042..048f8301322 100644
--- a/lib/libc/sys/mount.2
+++ b/lib/libc/sys/mount.2
@@ -1,5 +1,5 @@
-.\" $OpenBSD: mount.2,v 1.4 1996/03/09 02:42:59 niklas Exp $
-.\" $NetBSD: mount.2,v 1.11 1996/02/08 18:33:58 mycroft Exp $
+.\" $OpenBSD: mount.2,v 1.5 1996/03/19 23:15:17 niklas Exp $
+.\" $NetBSD: mount.2,v 1.12 1996/02/29 23:47:48 jtc Exp $
.\"
.\" Copyright (c) 1980, 1989, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -88,6 +88,8 @@ Do not allow files to be executed from the file system.
Do not honor setuid or setgid bits on files when executing them.
.It Dv MNT_NODEV
Do not interpret special files on the file system.
+.It Dv MNT_UNION
+Union with underlying filesystem instead of obscuring it.
.It Dv MNT_SYNCHRONOUS
All I/O to the file system should be done synchronously.
.El
@@ -116,32 +118,42 @@ their type specific data are:
.Dv MOUNT_FFS
.Bd -literal -offset indent -compact
struct ufs_args {
- char *fspec; /* Block special file to mount */
- int exflags; /* export related flags */
- uid_t exroot; /* mapping for root uid */
+ char *fspec; /* block special file to mount */
+ struct export_args export; /* network export information */
};
.Ed
.Pp
.Dv MOUNT_NFS
.Bd -literal -offset indent -compact
struct nfs_args {
- struct sockaddr_in *addr; /* file server address */
- nfsv2fh_t *fh; /* File handle to be mounted */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int timeo; /* initial timeout 0.1 secs */
- int retrans; /* times to retry send */
- char *hostname; /* server's name */
+ int version; /* args structure version */
+ struct sockaddr *addr; /* file server address */
+ int addrlen; /* length of address */
+ int sotype; /* Socket type */
+ int proto; /* and Protocol */
+ u_char *fh; /* File handle to be mounted */
+ int fhsize; /* Size, in bytes, of fh */
+ int flags; /* flags */
+ int wsize; /* write size in bytes */
+ int rsize; /* read size in bytes */
+ int readdirsize; /* readdir size in bytes */
+ int timeo; /* initial timeout in .1 secs */
+ int retrans; /* times to retry send */
+ int maxgrouplist; /* Max. size of group list */
+ int readahead; /* # of blocks to readahead */
+ int leaseterm; /* Term (sec) of lease */
+ int deadthresh; /* Retrans threshold */
+ char *hostname; /* server's name */
};
.Ed
.Pp
.Dv MOUNT_MFS
.Bd -literal -offset indent -compact
struct mfs_args {
- char *name; /* name of backing process */
- caddr_t base; /* base address of the file system */
- u_long size; /* size of the file system */
+ char *fspec; /* name to export for statfs */
+ struct export_args export; /* if we can export an MFS */
+ caddr_t base; /* base of file system in mem */
+ u_long size; /* size of file system */
};
.Ed
.Pp
diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2
index 69477e9796f..6a96eaa0ab5 100644
--- a/lib/libc/sys/ptrace.2
+++ b/lib/libc/sys/ptrace.2
@@ -1,4 +1,5 @@
-.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
+.\" $OpenBSD: ptrace.2,v 1.2 1996/03/19 23:15:18 niklas Exp $
+.\" $NetBSD: ptrace.2,v 1.3 1996/02/23 01:39:41 jtc Exp $
.\"
.\" This file is in the public domain.
.Dd November 7, 1994
@@ -74,7 +75,7 @@ and data, which is why there are two requests: conceptually,
.Dv PT_READ_I
reads from the instruction space and
.Dv PT_READ_D
-reads from the data space. In the current NetBSD implementation, these
+reads from the data space. In the current OpenBSD implementation, these
two requests are completely identical. The
.Fa addr
argument specifies the address (in the traced process' virtual address
@@ -92,42 +93,42 @@ and
except that they write rather than read. The
.Fa data
argument supplies the value to be written.
-.It Dv PT_READ_U
-This request reads an
-.Li int
-from the traced process' user structure. The
-.Fa addr
-argument specifies the location of the int relative to the base of the
-user structure; it will usually be an integer value cast to
-.Li caddr_t
-either explicitly or via the presence of a prototype for
-.Eo \&
-.Fn ptrace
-.Ec .
-Unlike
-.Dv PT_READ_I
-and
-.Dv PT_READ_D ,
-.Fa addr
-must be aligned on an
-.Li int
-boundary. The value read is returned as the return value from
-.Eo \&
-.Fn ptrace
-.Ec .
-.It Dv PT_WRITE_U
-This request writes an
-.Li int
-into the traced process' user structure.
-.Fa addr
-specifies the offset, just as for
-.Dv PT_READ_U ,
-and
-.Fa data
-specifies the value to be written, just as for
-.Dv PT_WRITE_I
-and
-.Dv PT_WRITE_D .
+.\" .It Dv PT_READ_U
+.\" This request reads an
+.\" .Li int
+.\" from the traced process' user structure. The
+.\" .Fa addr
+.\" argument specifies the location of the int relative to the base of the
+.\" user structure; it will usually be an integer value cast to
+.\" .Li caddr_t
+.\" either explicitly or via the presence of a prototype for
+.\" .Eo \&
+.\" .Fn ptrace
+.\" .Ec .
+.\" Unlike
+.\" .Dv PT_READ_I
+.\" and
+.\" .Dv PT_READ_D ,
+.\" .Fa addr
+.\" must be aligned on an
+.\" .Li int
+.\" boundary. The value read is returned as the return value from
+.\" .Eo \&
+.\" .Fn ptrace
+.\" .Ec .
+.\" .It Dv PT_WRITE_U
+.\" This request writes an
+.\" .Li int
+.\" into the traced process' user structure.
+.\" .Fa addr
+.\" specifies the offset, just as for
+.\" .Dv PT_READ_U ,
+.\" and
+.\" .Fa data
+.\" specifies the value to be written, just as for
+.\" .Dv PT_WRITE_I
+.\" and
+.\" .Dv PT_WRITE_D .
.It Dv PT_CONTINUE
The traced process continues execution.
.Fa addr
@@ -199,101 +200,101 @@ it loads the traced process' floating-point registers from the
.Aq Pa machine/reg.h )
pointed to by
.Fa addr .
-.It Dv PT_SYSCALL
-This request is like
-.Dv PT_CONTINUE
-except that the process will stop next time it executes any system
-call. Information about the system call can be examined with
-.Dv PT_READ_U
-and potentially modified with
-.Dv PT_WRITE_U
-through the
-.Li u_kproc.kp_proc.p_md
-element of the user structure (see below). If the process is continued
-with another
-.Dv PT_SYSCALL
-request, it will stop again on exit from the syscall, at which point
-the return values can be examined and potentially changed. The
-.Li u_kproc.kp_proc.p_md
-element is of type
-.Dq Li "struct mdproc" ,
-which should be declared by including
-.Aq Pa sys/param.h ,
-.Aq Pa sys/user.h ,
-and
-.Aq Pa machine/proc.h ,
-and contains the following fields (among others):
-.Bl -item -compact -offset indent
-.It
-.Li syscall_num
-.It
-.Li syscall_nargs
-.It
-.Li syscall_args[8]
-.It
-.Li syscall_err
-.It
-.Li syscall_rv[2]
-.El
-When a process stops on entry to a syscall,
-.Li syscall_num
-holds the number of the syscall,
-.Li syscall_nargs
-holds the number of arguments it expects, and
-.Li syscall_args
-holds the arguments themselves. (Only the first
-.Li syscall_nargs
-elements of
-.Li syscall_args
-are guaranteed to be useful.) When a process stops on exit from a
-syscall,
-.Li syscall_num
-is
-.Eo \&
-.Li -1
-.Ec ,
-.Li syscall_err
-holds the error number
-.Po
-see
-.Xr errno 2
-.Pc ,
-or 0 if no error occurred, and
-.Li syscall_rv
-holds the return values. (If the syscall returns only one value, only
-.Li syscall_rv[0]
-is useful.) The tracing process can modify any of these with
-.Dv PT_WRITE_U ;
-only some modifications are useful.
-.Pp
-On entry to a syscall,
-.Li syscall_num
-can be changed, and the syscall actually performed will correspond to
-the new number (it is the responsibility of the tracing process to fill
-in
-.Li syscall_args
-appropriately for the new call, but there is no need to modify
-.Eo \&
-.Li syscall_nargs
-.Ec ).
-If the new syscall number is 0, no syscall is actually performed;
-instead,
-.Li syscall_err
-and
-.Li syscall_rv
-are passed back to the traced process directly (and therefore should be
-filled in). If the syscall number is otherwise out of range, a dummy
-syscall which simply produces an
-.Er ENOSYS
-error is effectively performed.
-.Pp
-On exit from a syscall, only
-.Li syscall_err
-and
-.Li syscall_rv
-can usefully be changed; they are set to the values returned by the
-syscall and will be passed back to the traced process by the normal
-syscall return mechanism.
+.\" .It Dv PT_SYSCALL
+.\" This request is like
+.\" .Dv PT_CONTINUE
+.\" except that the process will stop next time it executes any system
+.\" call. Information about the system call can be examined with
+.\" .Dv PT_READ_U
+.\" and potentially modified with
+.\" .Dv PT_WRITE_U
+.\" through the
+.\" .Li u_kproc.kp_proc.p_md
+.\" element of the user structure (see below). If the process is continued
+.\" with another
+.\" .Dv PT_SYSCALL
+.\" request, it will stop again on exit from the syscall, at which point
+.\" the return values can be examined and potentially changed. The
+.\" .Li u_kproc.kp_proc.p_md
+.\" element is of type
+.\" .Dq Li "struct mdproc" ,
+.\" which should be declared by including
+.\" .Aq Pa sys/param.h ,
+.\" .Aq Pa sys/user.h ,
+.\" and
+.\" .Aq Pa machine/proc.h ,
+.\" and contains the following fields (among others):
+.\" .Bl -item -compact -offset indent
+.\" .It
+.\" .Li syscall_num
+.\" .It
+.\" .Li syscall_nargs
+.\" .It
+.\" .Li syscall_args[8]
+.\" .It
+.\" .Li syscall_err
+.\" .It
+.\" .Li syscall_rv[2]
+.\" .El
+.\" When a process stops on entry to a syscall,
+.\" .Li syscall_num
+.\" holds the number of the syscall,
+.\" .Li syscall_nargs
+.\" holds the number of arguments it expects, and
+.\" .Li syscall_args
+.\" holds the arguments themselves. (Only the first
+.\" .Li syscall_nargs
+.\" elements of
+.\" .Li syscall_args
+.\" are guaranteed to be useful.) When a process stops on exit from a
+.\" syscall,
+.\" .Li syscall_num
+.\" is
+.\" .Eo \&
+.\" .Li -1
+.\" .Ec ,
+.\" .Li syscall_err
+.\" holds the error number
+.\" .Po
+.\" see
+.\" .Xr errno 2
+.\" .Pc ,
+.\" or 0 if no error occurred, and
+.\" .Li syscall_rv
+.\" holds the return values. (If the syscall returns only one value, only
+.\" .Li syscall_rv[0]
+.\" is useful.) The tracing process can modify any of these with
+.\" .Dv PT_WRITE_U ;
+.\" only some modifications are useful.
+.\" .Pp
+.\" On entry to a syscall,
+.\" .Li syscall_num
+.\" can be changed, and the syscall actually performed will correspond to
+.\" the new number (it is the responsibility of the tracing process to fill
+.\" in
+.\" .Li syscall_args
+.\" appropriately for the new call, but there is no need to modify
+.\" .Eo \&
+.\" .Li syscall_nargs
+.\" .Ec ).
+.\" If the new syscall number is 0, no syscall is actually performed;
+.\" instead,
+.\" .Li syscall_err
+.\" and
+.\" .Li syscall_rv
+.\" are passed back to the traced process directly (and therefore should be
+.\" filled in). If the syscall number is otherwise out of range, a dummy
+.\" syscall which simply produces an
+.\" .Er ENOSYS
+.\" error is effectively performed.
+.\" .Pp
+.\" On exit from a syscall, only
+.\" .Li syscall_err
+.\" and
+.\" .Li syscall_rv
+.\" can usefully be changed; they are set to the values returned by the
+.\" syscall and will be passed back to the traced process by the normal
+.\" syscall return mechanism.
.El
.Sh ERRORS
Some requests can cause
@@ -317,22 +318,22 @@ on itself.
The
.Fa request
was not one of the legal requests.
-.It
-The
-.Fa addr
-to
-.Dv PT_READ_U
-or
-.Dv PT_WRITE_U
-was not
-.Li int Ns \&-aligned.
+.\" .It
+.\" The
+.\" .Fa addr
+.\" to
+.\" .Dv PT_READ_U
+.\" or
+.\" .Dv PT_WRITE_U
+.\" was not
+.\" .Li int Ns \&-aligned.
.It
The signal number (in
.Fa data )
to
.Dv PT_CONTINUE
-or
-.Dv PT_SYSCALL
+.\" or
+.\" .Dv PT_SYSCALL
was neither 0 nor a legal signal number.
.It
.Dv PT_GETREGS ,
@@ -386,10 +387,10 @@ to
should be able to sidestep this.
.Pp
Single-stepping is not available.
-.Pp
-When using
-.Dv PT_SYSCALL ,
-there is no easy way to tell whether the traced process stopped because
-it made a syscall or because a signal was sent at a moment that it just
-happened to have valid-looking garbage in its
-.Dq Li "struct mdproc" .
+.\" .Pp
+.\" When using
+.\" .Dv PT_SYSCALL ,
+.\" there is no easy way to tell whether the traced process stopped because
+.\" it made a syscall or because a signal was sent at a moment that it just
+.\" happened to have valid-looking garbage in its
+.\" .Dq Li "struct mdproc" .
diff --git a/lib/libc/yp/ypclnt.3 b/lib/libc/yp/ypclnt.3
index 4a632e64874..1214fd99354 100644
--- a/lib/libc/yp/ypclnt.3
+++ b/lib/libc/yp/ypclnt.3
@@ -1,8 +1,12 @@
-.\" $NetBSD: ypclnt.3,v 1.4 1995/09/12 19:33:03 thorpej Exp $
+.\" $OpenBSD: ypclnt.3,v 1.2 1996/03/19 23:15:20 niklas Exp $
+.\" $NetBSD: ypclnt.3,v 1.5 1996/02/28 00:57:22 thorpej Exp $
.\"
-.\" Copyright (c) 1994 Jason R. Thorpe
+.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Jason R. Thorpe.
+.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@@ -13,22 +17,23 @@
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
-.\" This product includes software developed by Jason Thorpe.
-.\" 4. Neither the name of the author nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
+.\" This product includes software developed by the NetBSD
+.\" Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 26, 1994
.Dt YPCLNT 3