From ab90ba3a7ce1bc5f607bf9f72ce935e4a1e8d65a Mon Sep 17 00:00:00 2001 From: purplerain Date: Mon, 15 May 2023 03:54:51 +0000 Subject: [PATCH] sync --- distrib/sets/lists/base/mi | 1 + include/rpc/auth_unix.h | 4 +-- include/rpc/clnt.h | 16 ++++----- include/rpc/pmap_clnt.h | 16 ++++----- include/rpc/pmap_prot.h | 2 +- include/rpc/pmap_rmt.h | 2 +- include/rpc/rpc.h | 4 +-- include/rpc/rpc_des.h | 16 ++++----- include/rpc/svc.h | 12 +++---- include/rpc/xdr.h | 12 +++---- lib/check_sym | 2 +- lib/libc/regex/engine.c | 2 +- lib/libc/regex/regerror.c | 2 +- lib/libc/rpc/auth_none.c | 6 ++-- lib/libc/rpc/auth_unix.c | 12 +++---- lib/libc/rpc/clnt_generic.c | 8 ++--- lib/libc/rpc/clnt_raw.c | 4 +-- lib/libc/rpc/clnt_simple.c | 6 ++-- lib/libc/rpc/clnt_tcp.c | 2 +- lib/libc/rpc/clnt_udp.c | 16 ++++----- lib/libc/rpc/get_myaddress.c | 2 +- lib/libc/rpc/pmap_prot.c | 4 +-- lib/libc/rpc/pmap_prot2.c | 12 +++---- lib/libc/rpc/pmap_rmt.c | 4 +-- lib/libc/rpc/rpc_commondata.c | 2 +- lib/libc/rpc/svc.c | 34 +++++++++---------- lib/libc/rpc/svc_auth.c | 12 +++---- lib/libc/rpc/svc_auth_unix.c | 2 +- lib/libc/rpc/svc_raw.c | 4 +-- lib/libc/rpc/svc_simple.c | 8 ++--- lib/libc/rpc/svc_tcp.c | 6 ++-- lib/libc/rpc/svc_udp.c | 20 +++++------ lib/libc/rpc/xdr_mem.c | 2 +- lib/libc/rpc/xdr_rec.c | 12 +++---- lib/libc/rpc/xdr_stdio.c | 2 +- lib/libcrypto/bio/bss_bio.c | 2 +- lib/libcrypto/bio/bss_conn.c | 14 ++++---- lib/libcrypto/bio/bss_dgram.c | 6 ++-- lib/libcrypto/bio/bss_fd.c | 12 +++---- lib/libcrypto/bio/bss_file.c | 12 +++---- lib/libcrypto/bio/bss_log.c | 2 +- lib/libcrypto/bio/bss_mem.c | 14 ++++---- lib/libcrypto/bio/bss_null.c | 12 +++---- lib/libcrypto/bio/bss_sock.c | 12 +++---- lib/libcrypto/x509/x509_vfy.c | 10 +++--- regress/Makefile | 2 +- regress/bin/expr/expr.sh | 4 +-- regress/gnu/egcs/gcc-bounds/Makefile | 6 ++-- regress/libexec/ld.so/Makefile | 2 +- .../libexec/ld.so/constructor/prog1/Makefile | 2 +- .../libexec/ld.so/constructor/prog2/Makefile | 2 +- .../ld.so/dependencies/order1/libaa/aa.c | 2 +- .../ld.so/dependencies/order2/libaa/aa.c | 2 +- .../ld.so/dlclose/test1/libaa/shlib_version | 2 +- .../ld.so/dlclose/test1/libbb/shlib_version | 2 +- .../ld.so/dlclose/test2/libaa/shlib_version | 2 +- .../ld.so/dlclose/test2/libbb/shlib_version | 2 +- .../ld.so/dlclose/test2/libcc/shlib_version | 2 +- .../ld.so/dlclose/test2/libzz/shlib_version | 2 +- regress/libexec/ld.so/dlopen/libaa/aa.C | 2 +- regress/libexec/ld.so/dlopen/prog1/Makefile | 2 +- regress/libexec/ld.so/dlopen/prog2/Makefile | 2 +- regress/libexec/ld.so/dlopen/prog3/Makefile | 2 +- regress/libexec/ld.so/dlopen/prog4/Makefile | 4 +-- .../ld.so/dlsym/test1/libaa/shlib_version | 2 +- .../ld.so/dlsym/test2/libaa/shlib_version | 2 +- .../ld.so/dlsym/test2/libbb/shlib_version | 2 +- .../ld.so/dlsym/test2/libcc/shlib_version | 2 +- .../ld.so/dlsym/test3/libaa/shlib_version | 2 +- .../ld.so/dlsym/test3/libbb/shlib_version | 2 +- .../ld.so/dlsym/test3/libcc/shlib_version | 2 +- .../ld.so/dlsym/test3/libdd/shlib_version | 2 +- .../ld.so/dlsym/test3/libee/shlib_version | 2 +- .../libexec/ld.so/edgecases/test1/Makefile | 2 +- .../ld.so/edgecases/test2/libaa/shlib_version | 2 +- .../ld.so/edgecases/test3/libaa/shlib_version | 2 +- .../ld.so/edgecases/test3/libbb/shlib_version | 2 +- regress/libexec/ld.so/elf/elfbug.h | 4 +-- .../initfirst/test1/libif1/shlib_version | 2 +- .../initfirst/test1/libif2/shlib_version | 2 +- .../initfirst/test1/libif3/shlib_version | 2 +- .../initfirst/test1/libnormal/shlib_version | 2 +- .../ld.so/initfirst/test2/prog1/Makefile | 10 +++--- .../ld.so/initfirst/test2/prog2/Makefile | 10 +++--- regress/libexec/ld.so/lazy/libfoo/foo.c | 2 +- regress/libexec/ld.so/nodelete/test1/test1.c | 4 +-- .../libexec/ld.so/subst/libaa/shlib_version | 2 +- sbin/vnconfig/vnconfig.c | 3 +- sys/arch/arm64/stand/efiboot/efidev.c | 14 ++++---- sys/arch/arm64/stand/efiboot/softraid_arm64.c | 4 +-- sys/dev/vnd.c | 6 ++-- sys/dev/vndioctl.h | 17 +++++----- 92 files changed, 264 insertions(+), 259 deletions(-) diff --git a/distrib/sets/lists/base/mi b/distrib/sets/lists/base/mi index d40b3ae4a..19f866052 100644 --- a/distrib/sets/lists/base/mi +++ b/distrib/sets/lists/base/mi @@ -2823,6 +2823,7 @@ ./usr/share/btrace ./usr/share/btrace/kprofile.bt ./usr/share/btrace/runqlat.bt +./usr/share/btrace/uprofile.bt ./usr/share/calendar ./usr/share/calendar/calendar.all ./usr/share/calendar/calendar.birthday diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h index 1ebf92c84..83e859971 100644 --- a/include/rpc/auth_unix.h +++ b/include/rpc/auth_unix.h @@ -72,8 +72,8 @@ __BEGIN_DECLS extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); __END_DECLS -/* - * If a response verifier has flavor AUTH_SHORT, +/* + * If a response verifier has flavor AUTH_SHORT, * then the body of the response verifier encapsulates the following structure; * again it is serialized in the obvious fashion. */ diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 86e2246c2..a1270c041 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -121,7 +121,7 @@ typedef struct __rpc_client { const struct clnt_ops { /* call remote procedure */ enum clnt_stat (*cl_call)(struct __rpc_client *, - unsigned long, xdrproc_t, caddr_t, + unsigned long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, struct timeval); /* abort a call */ void (*cl_abort)(struct __rpc_client *); @@ -134,7 +134,7 @@ typedef struct __rpc_client { /* destroy this structure */ void (*cl_destroy)(struct __rpc_client *); /* the ioctl() of rpc */ - bool_t (*cl_control)(struct __rpc_client *, + bool_t (*cl_control)(struct __rpc_client *, unsigned int, void *); } *cl_ops; caddr_t cl_private; /* private stuff */ @@ -244,7 +244,7 @@ typedef struct __rpc_client { /* * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a + * implementations of client side rpc. They can return NULL if a * creation failure occurs. */ @@ -286,7 +286,7 @@ __END_DECLS * unsigned int recvsz; */ __BEGIN_DECLS -extern CLIENT *clnttcp_create(struct sockaddr_in *, unsigned long, +extern CLIENT *clnttcp_create(struct sockaddr_in *, unsigned long, unsigned long, int *, unsigned int, unsigned int); __END_DECLS @@ -313,9 +313,9 @@ __END_DECLS * unsigned int recvsz; */ __BEGIN_DECLS -extern CLIENT *clntudp_create(struct sockaddr_in *, unsigned long, +extern CLIENT *clntudp_create(struct sockaddr_in *, unsigned long, unsigned long, struct timeval, int *); -extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, unsigned long, +extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, unsigned long, unsigned long, struct timeval, int *, unsigned int, unsigned int); __END_DECLS @@ -330,7 +330,7 @@ __END_DECLS /* * Like clnt_perror(), but is more verbose in its output - */ + */ __BEGIN_DECLS extern void clnt_perrno(enum clnt_stat); /* stderr */ extern char *clnt_sperrno(enum clnt_stat); /* string */ @@ -345,7 +345,7 @@ extern char *clnt_sperror(CLIENT *, char *); /* string */ __END_DECLS -/* +/* * If a creation fails, the following allows the user to figure out why. */ struct rpc_createerr { diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h index 06aa27fc5..22d5759ec 100644 --- a/include/rpc/pmap_clnt.h +++ b/include/rpc/pmap_clnt.h @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI + * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI * @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC */ @@ -48,7 +48,7 @@ * head = pmap_getmaps(address); * clnt_stat = pmap_rmtcall(address, program, version, procedure, * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) + * (works for udp only.) * clnt_stat = clnt_broadcast(program, version, procedure, * xdrargs, argsp, xdrres, resp, eachresult) * (like pmap_rmtcall, except the call is broadcasted to all @@ -67,18 +67,18 @@ #include __BEGIN_DECLS -extern bool_t pmap_set(unsigned long, unsigned long, unsigned int, +extern bool_t pmap_set(unsigned long, unsigned long, unsigned int, int); extern bool_t pmap_unset(unsigned long, unsigned long); extern struct pmaplist *pmap_getmaps(struct sockaddr_in *); -extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, unsigned long, - unsigned long, unsigned long, xdrproc_t, caddr_t, - xdrproc_t, caddr_t, struct timeval, +extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, unsigned long, + unsigned long, unsigned long, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval, unsigned long *); -extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, +extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, unsigned long, xdrproc_t, char *, xdrproc_t, char *, bool_t (*)(caddr_t, struct sockaddr_in *)); -extern unsigned short pmap_getport(struct sockaddr_in *, unsigned long, +extern unsigned short pmap_getport(struct sockaddr_in *, unsigned long, unsigned long, unsigned int); __END_DECLS diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h index 58e4fa77a..b812192bf 100644 --- a/include/rpc/pmap_prot.h +++ b/include/rpc/pmap_prot.h @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: @(#)pmap_prot.h 1.14 88/02/08 SMI + * from: @(#)pmap_prot.h 1.14 88/02/08 SMI * @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC */ diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h index 5d65136d3..29ef197d9 100644 --- a/include/rpc/pmap_rmt.h +++ b/include/rpc/pmap_rmt.h @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI + * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI * @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC */ diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h index be9a3dcfa..97913c4f6 100644 --- a/include/rpc/rpc.h +++ b/include/rpc/rpc.h @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: @(#)rpc.h 1.9 88/02/08 SMI + * from: @(#)rpc.h 1.9 88/02/08 SMI * @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC */ @@ -61,7 +61,7 @@ #include /* protocol for rpc messages */ #include /* protocol for unix style cred */ /* - * Uncomment-out the next line if you are building the rpc library with + * Uncomment-out the next line if you are building the rpc library with * DES Authentication (see the README file in the secure_rpc/ directory). */ #ifdef notdef diff --git a/include/rpc/rpc_des.h b/include/rpc/rpc_des.h index 92f5a8577..f5c393c45 100644 --- a/include/rpc/rpc_des.h +++ b/include/rpc/rpc_des.h @@ -7,21 +7,21 @@ * This package is an SSL implementation written * by Eric Young (eay@mincom.oz.au). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@mincom.oz.au). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -36,10 +36,10 @@ * Eric Young (eay@mincom.oz.au)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence @@ -128,8 +128,8 @@ struct desparams { */ #define DESIOCBLOCK _IOWR(d, 6, struct desparams) -/* +/* * Encrypt of small amount of data, quickly */ -#define DESIOCQUICK _IOWR(d, 7, struct desparams) +#define DESIOCQUICK _IOWR(d, 7, struct desparams) diff --git a/include/rpc/svc.h b/include/rpc/svc.h index ae7ae904b..2f8b681ce 100644 --- a/include/rpc/svc.h +++ b/include/rpc/svc.h @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: @(#)svc.h 1.20 88/02/08 SMI + * from: @(#)svc.h 1.20 88/02/08 SMI * @(#)svc.h 2.2 88/07/29 4.0 RPCSRC */ @@ -167,7 +167,7 @@ struct svc_req { * unsigned long prog; * unsigned long vers; * void (*dispatch)(); - * int protocol; like TCP or UDP, zero means do not register + * int protocol; like TCP or UDP, zero means do not register */ __BEGIN_DECLS extern bool_t svc_register(SVCXPRT *, unsigned long, unsigned long, @@ -211,7 +211,7 @@ __END_DECLS /* * When the service routine is called, it must first check to see if it * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via + * and return. If so, it should deserialize its arguments via * SVC_GETARGS (defined above). If the deserialization does not work, * svcerr_decode should be called followed by a return. Successful * decoding of the arguments should be followed the execution of the @@ -222,7 +222,7 @@ __END_DECLS * Note: do not confuse access-control failure with weak authentication! * * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. + * msg. This message is sent when svc_sendreply is called. * Therefore pure service implementations should always call * svc_sendreply even if the function logically returns void; use * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows @@ -244,7 +244,7 @@ extern void svcerr_auth(SVCXPRT *, enum auth_stat); extern void svcerr_noprog(SVCXPRT *); extern void svcerr_systemerr(SVCXPRT *); __END_DECLS - + /* * Lowest level dispatching -OR- who owns this process anyway. * Somebody has to wait for incoming requests and then call the correct @@ -258,7 +258,7 @@ __END_DECLS /* * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select + * dynamic; must be inspected before each call to select */ #include /* for fd_set */ extern fd_set svc_fdset; diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index baff98248..aed6c9b3b 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -105,10 +105,10 @@ typedef struct __rpc_xdr { /* put a long to " */ bool_t (*x_putlong)(struct __rpc_xdr *, long *); /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t, + bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t, unsigned int); /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t, + bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t, unsigned int); /* returns bytes off from beginning */ unsigned int (*x_getpostn)(struct __rpc_xdr *); @@ -254,16 +254,16 @@ extern bool_t xdr_int64_t(XDR *, int64_t *); extern bool_t xdr_u_int64_t(XDR *, u_int64_t *); extern bool_t xdr_bool(XDR *, bool_t *); extern bool_t xdr_enum(XDR *, enum_t *); -extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int, +extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int, unsigned int, xdrproc_t); extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int); extern bool_t xdr_opaque(XDR *, caddr_t, unsigned int); extern bool_t xdr_string(XDR *, char **, unsigned int); -extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *, +extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t); extern bool_t xdr_char(XDR *, char *); extern bool_t xdr_u_char(XDR *, unsigned char *); -extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int, +extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int, xdrproc_t); extern bool_t xdr_float(XDR *, float *); extern bool_t xdr_double(XDR *, double *); @@ -277,7 +277,7 @@ __END_DECLS * Common opaque bytes objects used by many rpc protocols; * declared here due to commonality. */ -#define MAX_NETOBJ_SZ 1024 +#define MAX_NETOBJ_SZ 1024 struct netobj { unsigned int n_len; char *n_bytes; diff --git a/lib/check_sym b/lib/check_sym index b6130e2ee..8ab01ca32 100755 --- a/lib/check_sym +++ b/lib/check_sym @@ -311,7 +311,7 @@ then fi if $verbose; then - printf "\nReloc counts:\nbefore:\n" + printf "\nReloc counts:\nbefore:\n" grep ^R r1 printf "\nafter:\n" grep ^R r2 diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index 62da73f99..683ba32a1 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -982,7 +982,7 @@ print(struct match *m, const char *caption, states st, int ch, FILE *d) (void)fprintf(d, "\n"); } -/* +/* - at - print current situation */ static void diff --git a/lib/libc/regex/regerror.c b/lib/libc/regex/regerror.c index 692b66681..70a9541ef 100644 --- a/lib/libc/regex/regerror.c +++ b/lib/libc/regex/regerror.c @@ -89,7 +89,7 @@ regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) for (r = rerrs; r->code != 0; r++) if (r->code == target) break; - + if (errcode®_ITOA) { if (r->code != 0) { assert(strlen(r->name) < sizeof(convbuf)); diff --git a/lib/libc/rpc/auth_none.c b/lib/libc/rpc/auth_none.c index b9bd80835..c354228ff 100644 --- a/lib/libc/rpc/auth_none.c +++ b/lib/libc/rpc/auth_none.c @@ -33,8 +33,8 @@ /* * auth_none.c - * Creates a client authentication handle for passing "null" - * credentials and verifiers to remote systems. + * Creates a client authentication handle for passing "null" + * credentials and verifiers to remote systems. */ #include @@ -106,7 +106,7 @@ authnone_marshal(AUTH *client, XDR *xdrs) ap->marshalled_client, ap->mcnt)); } -static void +static void authnone_verf(struct __rpc_auth *none) { } diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c index 32ead395d..cbceb3433 100644 --- a/lib/libc/rpc/auth_unix.c +++ b/lib/libc/rpc/auth_unix.c @@ -32,8 +32,8 @@ */ /* - * auth_unix.c, Implements UNIX style authentication parameters. - * + * auth_unix.c, Implements UNIX style authentication parameters. + * * The system is very weak. The client uses no encryption for its * credentials and only sends null verifiers. The server sends backs * null verifiers or optionally a verifier that suggests a new short hand @@ -133,15 +133,15 @@ authunix_create(char *machname, int uid, int gid, int len, int *aup_gids) * Serialize the parameters into origcred */ xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); - if (!xdr_authunix_parms(&xdrs, &aup)) - goto authfail; + if (!xdr_authunix_parms(&xdrs, &aup)) + goto authfail; au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs); au->au_origcred.oa_flavor = AUTH_UNIX; #ifdef KERNEL au->au_origcred.oa_base = mem_alloc((u_int) len); #else if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) - goto authfail; + goto authfail; #endif memcpy(au->au_origcred.oa_base, mymem, (u_int)len); @@ -270,7 +270,7 @@ authunix_refresh(AUTH *auth) xdrmem_create(&xdrs, au->au_origcred.oa_base, au->au_origcred.oa_length, XDR_DECODE); stat = xdr_authunix_parms(&xdrs, &aup); - if (! stat) + if (! stat) goto done; /* update the time and serialize in place */ diff --git a/lib/libc/rpc/clnt_generic.c b/lib/libc/rpc/clnt_generic.c index 070ee98ee..dbee953c7 100644 --- a/lib/libc/rpc/clnt_generic.c +++ b/lib/libc/rpc/clnt_generic.c @@ -39,7 +39,7 @@ /* * Generic client creation: takes (hostname, program-number, protocol) and - * returns client handle. Default options are set, which the user can + * returns client handle. Default options are set, which the user can * change using the rpc equivalent of ioctl()'s. */ CLIENT * @@ -62,7 +62,7 @@ clnt_create(char *hostname, u_long prog, u_long vers, char *proto) * Only support INET for now */ rpc_createerr.cf_stat = RPC_SYSTEMERROR; - rpc_createerr.cf_error.re_errno = EAFNOSUPPORT; + rpc_createerr.cf_error.re_errno = EAFNOSUPPORT; return (NULL); } memset(&sin, 0, sizeof(sin)); @@ -73,7 +73,7 @@ clnt_create(char *hostname, u_long prog, u_long vers, char *proto) p = getprotobyname(proto); if (p == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; - rpc_createerr.cf_error.re_errno = EPFNOSUPPORT; + rpc_createerr.cf_error.re_errno = EPFNOSUPPORT; return (NULL); } sock = RPC_ANYSOCK; @@ -94,7 +94,7 @@ clnt_create(char *hostname, u_long prog, u_long vers, char *proto) break; default: rpc_createerr.cf_stat = RPC_SYSTEMERROR; - rpc_createerr.cf_error.re_errno = EPFNOSUPPORT; + rpc_createerr.cf_error.re_errno = EPFNOSUPPORT; return (NULL); } return (client); diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c index 59eb0f810..7acc6711f 100644 --- a/lib/libc/rpc/clnt_raw.c +++ b/lib/libc/rpc/clnt_raw.c @@ -103,7 +103,7 @@ clntraw_create(u_long prog, u_long vers) call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = prog; call_msg.rm_call.cb_vers = vers; - xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); + xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); if (!xdr_callhdr(xdrs, &call_msg)) goto fail; clp->mcnt = XDR_GETPOS(xdrs); @@ -131,7 +131,7 @@ fail: return (NULL); } -static enum clnt_stat +static enum clnt_stat clntraw_call(CLIENT *h, u_long proc, xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults, caddr_t resultsp, struct timeval timeout) { diff --git a/lib/libc/rpc/clnt_simple.c b/lib/libc/rpc/clnt_simple.c index ca53644d8..df0424bee 100644 --- a/lib/libc/rpc/clnt_simple.c +++ b/lib/libc/rpc/clnt_simple.c @@ -31,7 +31,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* * clnt_simple.c * Simplified front end to rpc. */ @@ -81,7 +81,7 @@ callrpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, } if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum && strcmp(crp->oldhost, host) == 0) { - /* reuse old client */ + /* reuse old client */ } else { crp->valid = 0; if (crp->socket != -1) { @@ -114,7 +114,7 @@ callrpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, tottimeout.tv_usec = 0; clnt_stat = clnt_call(crp->client, procnum, inproc, in, outproc, out, tottimeout); - /* + /* * if call failed, empty cache */ if (clnt_stat != RPC_SUCCESS) diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c index 86675f8a5..ce4023a3d 100644 --- a/lib/libc/rpc/clnt_tcp.c +++ b/lib/libc/rpc/clnt_tcp.c @@ -83,7 +83,7 @@ struct ct_data { int ct_connected; /* pre-connected */ struct timeval ct_wait; bool_t ct_waitset; /* wait set by clnt_control? */ - struct sockaddr_in ct_addr; + struct sockaddr_in ct_addr; struct rpc_err ct_error; char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */ u_int ct_mpos; /* pos after marshal */ diff --git a/lib/libc/rpc/clnt_udp.c b/lib/libc/rpc/clnt_udp.c index e40347be5..0a87c2fa1 100644 --- a/lib/libc/rpc/clnt_udp.c +++ b/lib/libc/rpc/clnt_udp.c @@ -66,7 +66,7 @@ static const struct clnt_ops udp_ops = { clntudp_control }; -/* +/* * Private data kept per client handle */ struct cu_data { @@ -198,7 +198,7 @@ clntudp_create(struct sockaddr_in *raddr, u_long program, u_long version, } DEF_WEAK(clntudp_create); -static enum clnt_stat +static enum clnt_stat clntudp_call(CLIENT *cl, /* client handle */ u_long proc, /* procedure number */ xdrproc_t xargs, /* xdr routine for args */ @@ -304,11 +304,11 @@ send_again: do { fromlen = sizeof(struct sockaddr); if (cu->cu_connected) { - inlen = recv(cu->cu_sock, cu->cu_inbuf, + inlen = recv(cu->cu_sock, cu->cu_inbuf, (int) cu->cu_recvsz, 0); } else { - inlen = recvfrom(cu->cu_sock, cu->cu_inbuf, + inlen = recvfrom(cu->cu_sock, cu->cu_inbuf, (int) cu->cu_recvsz, 0, (struct sockaddr *)&from, &fromlen); } @@ -320,7 +320,7 @@ send_again: return (cu->cu_error.re_status = RPC_CANTRECV); } if (inlen < sizeof(u_int32_t)) - continue; + continue; /* see if reply transaction id matches sent id */ if (((struct rpc_msg *)(cu->cu_inbuf))->rm_xid != ((struct rpc_msg *)(cu->cu_outbuf))->rm_xid) @@ -359,7 +359,7 @@ send_again: xdrs->x_op = XDR_FREE; (void)xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf)); - } + } } else { /* maybe our credentials need to be refreshed ... */ if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth)) { @@ -398,7 +398,7 @@ clntudp_freeres(CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr) return ((*xdr_res)(xdrs, res_ptr)); } -static void +static void clntudp_abort(CLIENT *clnt) { } @@ -432,7 +432,7 @@ clntudp_control(CLIENT *cl, u_int request, void *info) } return (TRUE); } - + static void clntudp_destroy(CLIENT *cl) { diff --git a/lib/libc/rpc/get_myaddress.c b/lib/libc/rpc/get_myaddress.c index 99c0dabee..4ee693baa 100644 --- a/lib/libc/rpc/get_myaddress.c +++ b/lib/libc/rpc/get_myaddress.c @@ -49,7 +49,7 @@ #include #include -/* +/* * don't use gethostbyname, which would invoke yellow pages * * Avoid loopback interfaces. We return information from a loopback diff --git a/lib/libc/rpc/pmap_prot.c b/lib/libc/rpc/pmap_prot.c index bfa4c251b..3e338bd4f 100644 --- a/lib/libc/rpc/pmap_prot.c +++ b/lib/libc/rpc/pmap_prot.c @@ -45,8 +45,8 @@ bool_t xdr_pmap(XDR *xdrs, struct pmap *regs) { - if (xdr_u_long(xdrs, ®s->pm_prog) && - xdr_u_long(xdrs, ®s->pm_vers) && + if (xdr_u_long(xdrs, ®s->pm_prog) && + xdr_u_long(xdrs, ®s->pm_vers) && xdr_u_long(xdrs, ®s->pm_prot)) return (xdr_u_long(xdrs, ®s->pm_port)); return (FALSE); diff --git a/lib/libc/rpc/pmap_prot2.c b/lib/libc/rpc/pmap_prot2.c index ec1f805b0..a44414044 100644 --- a/lib/libc/rpc/pmap_prot2.c +++ b/lib/libc/rpc/pmap_prot2.c @@ -41,7 +41,7 @@ #include -/* +/* * What is going on with linked lists? (!) * First recall the link list declaration from pmap_prot.h: * @@ -50,11 +50,11 @@ * struct pmaplist *pml_map; * }; * - * Compare that declaration with a corresponding xdr declaration that + * Compare that declaration with a corresponding xdr declaration that * is (a) pointer-less, and (b) recursive: * * typedef union switch (bool_t) { - * + * * case TRUE: struct { * struct pmap; * pmaplist_t foo; @@ -67,8 +67,8 @@ * the C declaration has no bool_t variable. The bool_t can be * interpreted as ``more data follows me''; if FALSE then nothing * follows this bool_t; if TRUE then the bool_t is followed by - * an actual struct pmap, and then (recursively) by the - * xdr union, pamplist_t. + * an actual struct pmap, and then (recursively) by the + * xdr union, pamplist_t. * * This could be implemented via the xdr_union primitive, though this * would cause a one recursive call per element in the list. Rather than do @@ -103,7 +103,7 @@ xdr_pmaplist(XDR *xdrs, struct pmaplist **rp) * before we free the current object ... */ if (freeing) - next = &((*rp)->pml_next); + next = &((*rp)->pml_next); if (! xdr_reference(xdrs, (caddr_t *)rp, (u_int)sizeof(struct pmaplist), xdr_pmap)) return (FALSE); diff --git a/lib/libc/rpc/pmap_rmt.c b/lib/libc/rpc/pmap_rmt.c index 7d971f690..ccfaa1aee 100644 --- a/lib/libc/rpc/pmap_rmt.c +++ b/lib/libc/rpc/pmap_rmt.c @@ -148,7 +148,7 @@ DEF_WEAK(xdr_rmtcallres); /* * The following is kludged-up support for simple rpc broadcasts. - * Someday a large, complicated system will replace these trivial + * Someday a large, complicated system will replace these trivial * routines which only support udp/ip . */ static int @@ -200,7 +200,7 @@ newgetbroadcastnets(struct in_addr **addrsp) typedef bool_t (*resultproc_t)(caddr_t, struct sockaddr_in *); -enum clnt_stat +enum clnt_stat clnt_broadcast(u_long prog, /* program number */ u_long vers, /* version number */ u_long proc, /* procedure number */ diff --git a/lib/libc/rpc/rpc_commondata.c b/lib/libc/rpc/rpc_commondata.c index a974fa7c1..b1275cf87 100644 --- a/lib/libc/rpc/rpc_commondata.c +++ b/lib/libc/rpc/rpc_commondata.c @@ -34,7 +34,7 @@ #include /* * This file should only contain common data (global data) that is exported - * by public interfaces + * by public interfaces */ struct opaque_auth _null_auth; fd_set svc_fdset; diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c index d913d89c7..f633180be 100644 --- a/lib/libc/rpc/svc.c +++ b/lib/libc/rpc/svc.c @@ -266,11 +266,11 @@ svc_fd_remove(int sock) } /* - * De-activate a transport handle. + * De-activate a transport handle. */ void xprt_unregister(SVCXPRT *xprt) -{ +{ int sock = xprt->xp_sock; if (xports[sock] == xprt) { @@ -368,15 +368,15 @@ done: bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t xdr_results, caddr_t xdr_location) { - struct rpc_msg rply; + struct rpc_msg rply; rply.rm_direction = REPLY; - rply.rm_reply.rp_stat = MSG_ACCEPTED; - rply.acpted_rply.ar_verf = xprt->xp_verf; + rply.rm_reply.rp_stat = MSG_ACCEPTED; + rply.acpted_rply.ar_verf = xprt->xp_verf; rply.acpted_rply.ar_stat = SUCCESS; rply.acpted_rply.ar_results.where = xdr_location; rply.acpted_rply.ar_results.proc = xdr_results; - return (SVC_REPLY(xprt, &rply)); + return (SVC_REPLY(xprt, &rply)); } DEF_WEAK(svc_sendreply); @@ -401,13 +401,13 @@ svcerr_noproc(SVCXPRT *xprt) void svcerr_decode(SVCXPRT *xprt) { - struct rpc_msg rply; + struct rpc_msg rply; - rply.rm_direction = REPLY; - rply.rm_reply.rp_stat = MSG_ACCEPTED; + rply.rm_direction = REPLY; + rply.rm_reply.rp_stat = MSG_ACCEPTED; rply.acpted_rply.ar_verf = xprt->xp_verf; rply.acpted_rply.ar_stat = GARBAGE_ARGS; - SVC_REPLY(xprt, &rply); + SVC_REPLY(xprt, &rply); } DEF_WEAK(svcerr_decode); @@ -417,13 +417,13 @@ DEF_WEAK(svcerr_decode); void svcerr_systemerr(SVCXPRT *xprt) { - struct rpc_msg rply; + struct rpc_msg rply; - rply.rm_direction = REPLY; - rply.rm_reply.rp_stat = MSG_ACCEPTED; + rply.rm_direction = REPLY; + rply.rm_reply.rp_stat = MSG_ACCEPTED; rply.acpted_rply.ar_verf = xprt->xp_verf; rply.acpted_rply.ar_stat = SYSTEM_ERR; - SVC_REPLY(xprt, &rply); + SVC_REPLY(xprt, &rply); } /* @@ -455,7 +455,7 @@ svcerr_weakauth(SVCXPRT *xprt) /* * Program unavailable error reply */ -void +void svcerr_noprog(SVCXPRT *xprt) { struct rpc_msg rply; @@ -496,9 +496,9 @@ DEF_WEAK(svcerr_progvers); * the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and * the "cooked" credentials (rqst->rq_clntcred). * However, this function does not know the structure of the cooked - * credentials, so it make the following assumptions: + * credentials, so it make the following assumptions: * a) the structure is contiguous (no pointers), and - * b) the cred structure size does not exceed RQCRED_SIZE bytes. + * b) the cred structure size does not exceed RQCRED_SIZE bytes. * In all events, all three parameters are freed upon exit from this routine. * The storage is trivially management on the call stack in userland, but * is mallocated in kernel land. diff --git a/lib/libc/rpc/svc_auth.c b/lib/libc/rpc/svc_auth.c index d8b5ffbc5..f39aebb12 100644 --- a/lib/libc/rpc/svc_auth.c +++ b/lib/libc/rpc/svc_auth.c @@ -39,16 +39,16 @@ #include /* - * svcauthsw is the bdevsw of server side authentication. - * + * svcauthsw is the bdevsw of server side authentication. + * * Server side authenticators are called from authenticate by * using the client auth struct flavor field to index into svcauthsw. - * The server auth flavors must implement a routine that looks - * like: - * + * The server auth flavors must implement a routine that looks + * like: + * * enum auth_stat * flavorx_auth(rqst, msg) - * struct svc_req *rqst; + * struct svc_req *rqst; * struct rpc_msg *msg; * */ diff --git a/lib/libc/rpc/svc_auth_unix.c b/lib/libc/rpc/svc_auth_unix.c index e4e7cbf4f..fc96e3cbe 100644 --- a/lib/libc/rpc/svc_auth_unix.c +++ b/lib/libc/rpc/svc_auth_unix.c @@ -120,7 +120,7 @@ DEF_STRONG(_svcauth_unix); * Shorthand unix authenticator * Looks up longhand in a cache. */ -enum auth_stat +enum auth_stat _svcauth_short(struct svc_req *rqst, struct rpc_msg *msg) { return (AUTH_REJECTEDCRED); diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c index cfef6fd06..1b7649e28 100644 --- a/lib/libc/rpc/svc_raw.c +++ b/lib/libc/rpc/svc_raw.c @@ -140,7 +140,7 @@ svcraw_getargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr) static bool_t svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr) -{ +{ struct svcraw_private *srp = svcraw_private; XDR *xdrs; @@ -149,7 +149,7 @@ svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr) xdrs = &srp->xdr_stream; xdrs->x_op = XDR_FREE; return ((*xdr_args)(xdrs, args_ptr)); -} +} static void svcraw_destroy(SVCXPRT *xprt) diff --git a/lib/libc/rpc/svc_simple.c b/lib/libc/rpc/svc_simple.c index 9675332cf..16e9fbde4 100644 --- a/lib/libc/rpc/svc_simple.c +++ b/lib/libc/rpc/svc_simple.c @@ -31,7 +31,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* * svc_simple.c * Simplified front end to rpc. */ @@ -59,7 +59,7 @@ registerrpc(int prognum, int versnum, int procnum, char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc) { struct proglst *pl; - + if (procnum == NULLPROC) return (-1); if (transp == NULL) { @@ -68,7 +68,7 @@ registerrpc(int prognum, int versnum, int procnum, char *(*progname)(), return (-1); } (void) pmap_unset((u_long)prognum, (u_long)versnum); - if (!svc_register(transp, (u_long)prognum, (u_long)versnum, + if (!svc_register(transp, (u_long)prognum, (u_long)versnum, universal, IPPROTO_UDP)) return (-1); pl = malloc(sizeof(struct proglst)); @@ -92,7 +92,7 @@ universal(struct svc_req *rqstp, SVCXPRT *transp) char xdrbuf[UDPMSGSIZE]; struct proglst *pl; - /* + /* * enforce "procnum 0 is echo" convention */ if (rqstp->rq_proc == NULLPROC) { diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index 6339f9a4c..524ce5e84 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -32,7 +32,7 @@ */ /* - * svc_tcp.c, Server side for TCP/IP based RPC. + * svc_tcp.c, Server side for TCP/IP based RPC. * * Actually implements two flavors of transporter - * a tcp rendezvouser (a listener and connection establisher) @@ -199,7 +199,7 @@ makefd_xprt(int fd, u_int sendsize, u_int recvsize) { SVCXPRT *xprt; struct tcp_conn *cd; - + xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); if (xprt == NULL) goto done; @@ -258,7 +258,7 @@ rendezvous_request(SVCXPRT *xprt, struct rpc_msg *ignored) (char *)&opts, &optsize) == 0 && optsize != 0) { for (i = 0; (char *)&opts.ipopt_list[i] - (char *)&opts < - optsize; ) { + optsize; ) { u_char c = (u_char)opts.ipopt_list[i]; if (c == IPOPT_LSRR || c == IPOPT_SSRR) { close(sock); diff --git a/lib/libc/rpc/svc_udp.c b/lib/libc/rpc/svc_udp.c index 7966d256b..5f4b0db27 100644 --- a/lib/libc/rpc/svc_udp.c +++ b/lib/libc/rpc/svc_udp.c @@ -173,7 +173,7 @@ static enum xprt_stat svcudp_stat(SVCXPRT *xprt) { - return (XPRT_IDLE); + return (XPRT_IDLE); } static bool_t @@ -294,7 +294,7 @@ struct cache_node { /* * Next node on the list, if there is a collision */ - cache_ptr cache_next; + cache_ptr cache_next; }; /* @@ -316,11 +316,11 @@ struct udp_cache { * the hashing function */ #define CACHE_LOC(transp, xid) \ - (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size)) + (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size)) /* - * Enable use of the cache. + * Enable use of the cache. * Note: there is no disable. */ int @@ -330,7 +330,7 @@ svcudp_enablecache(SVCXPRT *transp, u_long size) struct udp_cache *uc; if (su->su_cache != NULL) - return(0); + return(0); uc = malloc(sizeof(*uc)); if (uc == NULL) return(0); @@ -358,7 +358,7 @@ svcudp_enablecache(SVCXPRT *transp, u_long size) static void cache_set(SVCXPRT *xprt, u_long replylen) { - cache_ptr victim; + cache_ptr victim; cache_ptr *vicp; struct svcudp_data *su = su_data(xprt); struct udp_cache *uc = (struct udp_cache *) su->su_cache; @@ -372,9 +372,9 @@ cache_set(SVCXPRT *xprt, u_long replylen) victim = uc->uc_fifo[uc->uc_nextvictim]; if (victim != NULL) { loc = CACHE_LOC(xprt, victim->cache_xid); - for (vicp = &uc->uc_entries[loc]; - *vicp != NULL && *vicp != victim; - vicp = &(*vicp)->cache_next) + for (vicp = &uc->uc_entries[loc]; + *vicp != NULL && *vicp != victim; + vicp = &(*vicp)->cache_next) ; if (*vicp == NULL) { return; @@ -406,7 +406,7 @@ cache_set(SVCXPRT *xprt, u_long replylen) victim->cache_prog = uc->uc_prog; victim->cache_addr = uc->uc_addr; loc = CACHE_LOC(xprt, victim->cache_xid); - victim->cache_next = uc->uc_entries[loc]; + victim->cache_next = uc->uc_entries[loc]; uc->uc_entries[loc] = victim; uc->uc_fifo[uc->uc_nextvictim++] = victim; uc->uc_nextvictim %= uc->uc_size; diff --git a/lib/libc/rpc/xdr_mem.c b/lib/libc/rpc/xdr_mem.c index fef897e81..25ee36e67 100644 --- a/lib/libc/rpc/xdr_mem.c +++ b/lib/libc/rpc/xdr_mem.c @@ -85,7 +85,7 @@ static const struct xdr_ops xdrmem_ops_unaligned = { /* * The procedure xdrmem_create initializes a stream descriptor for a - * memory buffer. + * memory buffer. */ void xdrmem_create(XDR *xdrs, caddr_t addr, u_int size, enum xdr_op op) diff --git a/lib/libc/rpc/xdr_rec.c b/lib/libc/rpc/xdr_rec.c index b3445d5cd..51f941389 100644 --- a/lib/libc/rpc/xdr_rec.c +++ b/lib/libc/rpc/xdr_rec.c @@ -42,7 +42,7 @@ * by n bytes of data, where n is contained in the header. The header * is represented as a htonl(u_int32_t). The high order bit encodes * whether or not the fragment is the last fragment of the record - * (1 => fragment is last, 0 => more fragments to follow. + * (1 => fragment is last, 0 => more fragments to follow. * The other 31 bits encode the byte length of the fragment. */ @@ -169,8 +169,8 @@ xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize, caddr_t tcp_handle, (RECSTREAM *)mem_alloc(sizeof(RECSTREAM)); if (rstrm == NULL) { - /* - * This is bad. Should rework xdrrec_create to + /* + * This is bad. Should rework xdrrec_create to * return a handle, and in this case return NULL */ return; @@ -285,7 +285,7 @@ xdrrec_getbytes(XDR *xdrs, caddr_t addr, u_int len) current = (len < current) ? len : current; if (! get_input_bytes(rstrm, addr, current)) return (FALSE); - addr += current; + addr += current; rstrm->fbtbc -= current; len -= current; } @@ -457,7 +457,7 @@ DEF_WEAK(xdrrec_skiprecord); /* * Look ahead function. - * Returns TRUE iff there is no more input in the buffer + * Returns TRUE iff there is no more input in the buffer * after consuming the rest of the current record. */ bool_t @@ -604,7 +604,7 @@ static bool_t flush_out(RECSTREAM *rstrm, int32_t eor) { u_long eormask = (eor == TRUE) ? LAST_FRAG : 0; - u_int32_t len = (u_long)(rstrm->out_finger) - + u_int32_t len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) - sizeof(u_int32_t); *(rstrm->frag_header) = htonl(len | eormask); diff --git a/lib/libc/rpc/xdr_stdio.c b/lib/libc/rpc/xdr_stdio.c index 00984136c..c5c8ea8da 100644 --- a/lib/libc/rpc/xdr_stdio.c +++ b/lib/libc/rpc/xdr_stdio.c @@ -142,7 +142,7 @@ xdrstdio_getpos(XDR *xdrs) static bool_t xdrstdio_setpos(XDR *xdrs, u_int pos) -{ +{ return ((fseeko((FILE *)xdrs->x_private, pos, SEEK_SET) == -1) ? FALSE : TRUE); diff --git a/lib/libcrypto/bio/bss_bio.c b/lib/libcrypto/bio/bss_bio.c index c92d35d11..8e88f2ace 100644 --- a/lib/libcrypto/bio/bss_bio.c +++ b/lib/libcrypto/bio/bss_bio.c @@ -7,7 +7,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in diff --git a/lib/libcrypto/bio/bss_conn.c b/lib/libcrypto/bio/bss_conn.c index 8e30bccd5..56cb006ce 100644 --- a/lib/libcrypto/bio/bss_conn.c +++ b/lib/libcrypto/bio/bss_conn.c @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence @@ -87,7 +87,7 @@ typedef struct bio_connect_st { struct sockaddr_in them; /* int socket; this will be kept in bio->num so that it is - * compatible with the bss_sock bio */ + * compatible with the bss_sock bio */ /* called when the connection is initially made * callback(BIO,state,ret); The callback should return diff --git a/lib/libcrypto/bio/bss_dgram.c b/lib/libcrypto/bio/bss_dgram.c index 0d70daa20..b4b5d6bd1 100644 --- a/lib/libcrypto/bio/bss_dgram.c +++ b/lib/libcrypto/bio/bss_dgram.c @@ -1,7 +1,7 @@ /* $OpenBSD: bss_dgram.c,v 1.44 2022/12/26 07:18:51 jmc Exp $ */ -/* +/* * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. + * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. */ /* ==================================================================== * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. @@ -11,7 +11,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in diff --git a/lib/libcrypto/bio/bss_fd.c b/lib/libcrypto/bio/bss_fd.c index 7d7c42791..2638bbf0d 100644 --- a/lib/libcrypto/bio/bss_fd.c +++ b/lib/libcrypto/bio/bss_fd.c @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence diff --git a/lib/libcrypto/bio/bss_file.c b/lib/libcrypto/bio/bss_file.c index 0c9b75502..78c83ee26 100644 --- a/lib/libcrypto/bio/bss_file.c +++ b/lib/libcrypto/bio/bss_file.c @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence diff --git a/lib/libcrypto/bio/bss_log.c b/lib/libcrypto/bio/bss_log.c index 296c87ff8..344ded32a 100644 --- a/lib/libcrypto/bio/bss_log.c +++ b/lib/libcrypto/bio/bss_log.c @@ -7,7 +7,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in diff --git a/lib/libcrypto/bio/bss_mem.c b/lib/libcrypto/bio/bss_mem.c index 2d0308323..e00821ab0 100644 --- a/lib/libcrypto/bio/bss_mem.c +++ b/lib/libcrypto/bio/bss_mem.c @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence @@ -351,7 +351,7 @@ mem_gets(BIO *bio, char *out, int out_len) /* * i is now the max num of bytes to copy, either out_max or up to and * including the first newline - */ + */ if ((ret = mem_read(bio, out, i)) > 0) out[ret] = '\0'; diff --git a/lib/libcrypto/bio/bss_null.c b/lib/libcrypto/bio/bss_null.c index 8a15b36b3..b81032e61 100644 --- a/lib/libcrypto/bio/bss_null.c +++ b/lib/libcrypto/bio/bss_null.c @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence diff --git a/lib/libcrypto/bio/bss_sock.c b/lib/libcrypto/bio/bss_sock.c index 3b9a87fd8..f9743a9b4 100644 --- a/lib/libcrypto/bio/bss_sock.c +++ b/lib/libcrypto/bio/bss_sock.c @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence diff --git a/lib/libcrypto/x509/x509_vfy.c b/lib/libcrypto/x509/x509_vfy.c index 2410d39b8..6bc06187e 100644 --- a/lib/libcrypto/x509/x509_vfy.c +++ b/lib/libcrypto/x509/x509_vfy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.c,v 1.122 2023/05/08 14:51:00 tb Exp $ */ +/* $OpenBSD: x509_vfy.c,v 1.123 2023/05/14 20:20:40 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2308,8 +2308,8 @@ X509_STORE_CTX_free(X509_STORE_CTX *ctx) LCRYPTO_ALIAS(X509_STORE_CTX_free); int -X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, - STACK_OF(X509) *chain) +X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *leaf, + STACK_OF(X509) *untrusted) { int param_ret = 1; @@ -2337,8 +2337,8 @@ X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, * possible even on early exits. */ ctx->store = store; - ctx->cert = x509; - ctx->untrusted = chain; + ctx->cert = leaf; + ctx->untrusted = untrusted; if (store && store->verify) ctx->verify = store->verify; diff --git a/regress/Makefile b/regress/Makefile index ef9989bf9..007de3d4f 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -36,7 +36,7 @@ MAKE_FLAGS+= _REGRESS_TMP=${_REGRESS_TMP} ${_REGRESS_CLEAN} .END: .SILENT -.if ${.TARGETS:Mall} || ${.TARGETS:Mregress} +.if ${.TARGETS:Mall} || ${.TARGETS:Mregress} echo ==================================================================== .if empty(REGRESS_MAIL) || empty(_REGRESS_TMP) echo You can set REGRESS_LOG to point to a file and mail it manually. diff --git a/regress/bin/expr/expr.sh b/regress/bin/expr/expr.sh index c0a665df8..4628caea7 100755 --- a/regress/bin/expr/expr.sh +++ b/regress/bin/expr/expr.sh @@ -11,7 +11,7 @@ function test_expr { exit 1 fi } - + # The first arg will get eval'd so escape any meta characters # The 2nd arg is an expected string/response from expr for that op. @@ -98,7 +98,7 @@ test_expr '1 - -5' '6' # More complex math test for precedence test_expr '-3 + -1 \* 4 + 3 / -6' '-7' -# The next two are messy but the shell escapes cause that. +# The next two are messy but the shell escapes cause that. # Test precendence test_expr 'X1/2/3 : X\\\(.\*[^/]\\\)//\*[^/][^/]\*/\*$ \| . : \\\(.\\\)' '1/2' diff --git a/regress/gnu/egcs/gcc-bounds/Makefile b/regress/gnu/egcs/gcc-bounds/Makefile index e48f14f95..df9663f17 100644 --- a/regress/gnu/egcs/gcc-bounds/Makefile +++ b/regress/gnu/egcs/gcc-bounds/Makefile @@ -26,7 +26,7 @@ REGRESS_TARGETS= ${C_TARGETS} ${CPP_TARGETS} .for i in ${C_MODULES} . for j in ${C_${i:U}} -C_TARGETS+= c-${i}-${j} +C_TARGETS+= c-${i}-${j} c-${i}-${j}: ${TCC} ${TCFLAGS} -o /dev/null ${i}-${j}.c 2>&1 | sed '/^\/tmp\//d;s/(\.text+0x[0-9a-f]*)//' | diff -u - ${.CURDIR}/${i}-${j}.c${EXP} . endfor @@ -59,9 +59,9 @@ NOOBJ= Yes REGRESS_EXPECTED_FAILURES= c-getcwd-1 .endif -.if ${BUILD_GCC3:L} == "yes" +.if ${BUILD_GCC3:L} == "yes" EXP= .exp.gcc3 -.elif ${BUILD_GCC4:L} == "yes" +.elif ${BUILD_GCC4:L} == "yes" EXP= .exp.gcc4 .else regress: diff --git a/regress/libexec/ld.so/Makefile b/regress/libexec/ld.so/Makefile index e4c908dda..ec8d983e6 100644 --- a/regress/libexec/ld.so/Makefile +++ b/regress/libexec/ld.so/Makefile @@ -1,7 +1,7 @@ # $OpenBSD: Makefile,v 1.19 2022/08/20 14:13:48 sthen Exp $ SUBDIR+= elf hidden weak dlsym dlopen dlclose lazy -SUBDIR+= constructor +SUBDIR+= constructor SUBDIR+= link-order edgecases initfirst SUBDIR+= df_1_noopen randomdata subst dependencies SUBDIR+= init-env nodelete noload diff --git a/regress/libexec/ld.so/constructor/prog1/Makefile b/regress/libexec/ld.so/constructor/prog1/Makefile index 11728afc5..523fbb80d 100644 --- a/regress/libexec/ld.so/constructor/prog1/Makefile +++ b/regress/libexec/ld.so/constructor/prog1/Makefile @@ -27,7 +27,7 @@ LDADD= LDADD+=-lab LDADD+=-laa LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/constructor/prog2/Makefile b/regress/libexec/ld.so/constructor/prog2/Makefile index 760b52451..fa3136aaf 100644 --- a/regress/libexec/ld.so/constructor/prog2/Makefile +++ b/regress/libexec/ld.so/constructor/prog2/Makefile @@ -27,7 +27,7 @@ LDADD= LDADD+=-laa LDADD+=-lab LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/dependencies/order1/libaa/aa.c b/regress/libexec/ld.so/dependencies/order1/libaa/aa.c index cadd6cf38..ccbc848b0 100644 --- a/regress/libexec/ld.so/dependencies/order1/libaa/aa.c +++ b/regress/libexec/ld.so/dependencies/order1/libaa/aa.c @@ -20,4 +20,4 @@ int funaa(void) { return 1 + symbb; } - + diff --git a/regress/libexec/ld.so/dependencies/order2/libaa/aa.c b/regress/libexec/ld.so/dependencies/order2/libaa/aa.c index cadd6cf38..ccbc848b0 100644 --- a/regress/libexec/ld.so/dependencies/order2/libaa/aa.c +++ b/regress/libexec/ld.so/dependencies/order2/libaa/aa.c @@ -20,4 +20,4 @@ int funaa(void) { return 1 + symbb; } - + diff --git a/regress/libexec/ld.so/dlclose/test1/libaa/shlib_version b/regress/libexec/ld.so/dlclose/test1/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlclose/test1/libaa/shlib_version +++ b/regress/libexec/ld.so/dlclose/test1/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlclose/test1/libbb/shlib_version b/regress/libexec/ld.so/dlclose/test1/libbb/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlclose/test1/libbb/shlib_version +++ b/regress/libexec/ld.so/dlclose/test1/libbb/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlclose/test2/libaa/shlib_version b/regress/libexec/ld.so/dlclose/test2/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlclose/test2/libaa/shlib_version +++ b/regress/libexec/ld.so/dlclose/test2/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlclose/test2/libbb/shlib_version b/regress/libexec/ld.so/dlclose/test2/libbb/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlclose/test2/libbb/shlib_version +++ b/regress/libexec/ld.so/dlclose/test2/libbb/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlclose/test2/libcc/shlib_version b/regress/libexec/ld.so/dlclose/test2/libcc/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlclose/test2/libcc/shlib_version +++ b/regress/libexec/ld.so/dlclose/test2/libcc/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlclose/test2/libzz/shlib_version b/regress/libexec/ld.so/dlclose/test2/libzz/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlclose/test2/libzz/shlib_version +++ b/regress/libexec/ld.so/dlclose/test2/libzz/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlopen/libaa/aa.C b/regress/libexec/ld.so/dlopen/libaa/aa.C index 4956a3573..75ebd8191 100644 --- a/regress/libexec/ld.so/dlopen/libaa/aa.C +++ b/regress/libexec/ld.so/dlopen/libaa/aa.C @@ -9,7 +9,7 @@ #include "aa.h" char strbuf[512]; -extern "C" { +extern "C" { const char *libname = "libaa"; }; diff --git a/regress/libexec/ld.so/dlopen/prog1/Makefile b/regress/libexec/ld.so/dlopen/prog1/Makefile index f9820d029..dc569339d 100644 --- a/regress/libexec/ld.so/dlopen/prog1/Makefile +++ b/regress/libexec/ld.so/dlopen/prog1/Makefile @@ -27,7 +27,7 @@ LDADD= #LDADD+=-lab #LDADD+=-laa #LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) NOMAN= CC=c++ LD_LIBRARY_PATH=$(AA_OBJDIR):$(AB_OBJDIR) diff --git a/regress/libexec/ld.so/dlopen/prog2/Makefile b/regress/libexec/ld.so/dlopen/prog2/Makefile index dd5dd6ee6..8a7484cf9 100644 --- a/regress/libexec/ld.so/dlopen/prog2/Makefile +++ b/regress/libexec/ld.so/dlopen/prog2/Makefile @@ -27,7 +27,7 @@ LDADD= LDADD+=-laa LDADD+=-lab LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/dlopen/prog3/Makefile b/regress/libexec/ld.so/dlopen/prog3/Makefile index e294d7d58..a13c66676 100644 --- a/regress/libexec/ld.so/dlopen/prog3/Makefile +++ b/regress/libexec/ld.so/dlopen/prog3/Makefile @@ -27,7 +27,7 @@ LDADD= #LDADD+=-lac LDFLAGS=-L$(AA_OBJDIR) -L$(AC_OBJDIR) LDFLAGS+= -Wl,-disable-new-dtags -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/dlopen/prog4/Makefile b/regress/libexec/ld.so/dlopen/prog4/Makefile index b23cdc30f..25f844c7d 100644 --- a/regress/libexec/ld.so/dlopen/prog4/Makefile +++ b/regress/libexec/ld.so/dlopen/prog4/Makefile @@ -26,9 +26,9 @@ LDADD= #LDADD+=-laa #LDADD+=-lac LDFLAGS=-L$(AA_OBJDIR) -L$(AC_OBJDIR) -#LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR) +#LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR) # This intentionally leaves out AA_OBJDIR from -rpath -LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/dlsym/test1/libaa/shlib_version b/regress/libexec/ld.so/dlsym/test1/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test1/libaa/shlib_version +++ b/regress/libexec/ld.so/dlsym/test1/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test2/libaa/shlib_version b/regress/libexec/ld.so/dlsym/test2/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test2/libaa/shlib_version +++ b/regress/libexec/ld.so/dlsym/test2/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test2/libbb/shlib_version b/regress/libexec/ld.so/dlsym/test2/libbb/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test2/libbb/shlib_version +++ b/regress/libexec/ld.so/dlsym/test2/libbb/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test2/libcc/shlib_version b/regress/libexec/ld.so/dlsym/test2/libcc/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test2/libcc/shlib_version +++ b/regress/libexec/ld.so/dlsym/test2/libcc/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test3/libaa/shlib_version b/regress/libexec/ld.so/dlsym/test3/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test3/libaa/shlib_version +++ b/regress/libexec/ld.so/dlsym/test3/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test3/libbb/shlib_version b/regress/libexec/ld.so/dlsym/test3/libbb/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test3/libbb/shlib_version +++ b/regress/libexec/ld.so/dlsym/test3/libbb/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test3/libcc/shlib_version b/regress/libexec/ld.so/dlsym/test3/libcc/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test3/libcc/shlib_version +++ b/regress/libexec/ld.so/dlsym/test3/libcc/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test3/libdd/shlib_version b/regress/libexec/ld.so/dlsym/test3/libdd/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test3/libdd/shlib_version +++ b/regress/libexec/ld.so/dlsym/test3/libdd/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/dlsym/test3/libee/shlib_version b/regress/libexec/ld.so/dlsym/test3/libee/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/dlsym/test3/libee/shlib_version +++ b/regress/libexec/ld.so/dlsym/test3/libee/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/edgecases/test1/Makefile b/regress/libexec/ld.so/edgecases/test1/Makefile index be8f1c583..bec5d5a41 100644 --- a/regress/libexec/ld.so/edgecases/test1/Makefile +++ b/regress/libexec/ld.so/edgecases/test1/Makefile @@ -1,3 +1,3 @@ -SUBDIR=libaa_g libaa_b prog1 +SUBDIR=libaa_g libaa_b prog1 .include diff --git a/regress/libexec/ld.so/edgecases/test2/libaa/shlib_version b/regress/libexec/ld.so/edgecases/test2/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/edgecases/test2/libaa/shlib_version +++ b/regress/libexec/ld.so/edgecases/test2/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/edgecases/test3/libaa/shlib_version b/regress/libexec/ld.so/edgecases/test3/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/edgecases/test3/libaa/shlib_version +++ b/regress/libexec/ld.so/edgecases/test3/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/edgecases/test3/libbb/shlib_version b/regress/libexec/ld.so/edgecases/test3/libbb/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/edgecases/test3/libbb/shlib_version +++ b/regress/libexec/ld.so/edgecases/test3/libbb/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/elf/elfbug.h b/regress/libexec/ld.so/elf/elfbug.h index 77a30b5db..95abfc3ba 100644 --- a/regress/libexec/ld.so/elf/elfbug.h +++ b/regress/libexec/ld.so/elf/elfbug.h @@ -1,6 +1,6 @@ -/* +/* * Public domain - Matthieu Herrb 2002 - * + * * $OpenBSD: elfbug.h,v 1.1 2002/02/05 21:47:23 matthieu Exp $ */ extern int (*func)(void); diff --git a/regress/libexec/ld.so/initfirst/test1/libif1/shlib_version b/regress/libexec/ld.so/initfirst/test1/libif1/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/initfirst/test1/libif1/shlib_version +++ b/regress/libexec/ld.so/initfirst/test1/libif1/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/initfirst/test1/libif2/shlib_version b/regress/libexec/ld.so/initfirst/test1/libif2/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/initfirst/test1/libif2/shlib_version +++ b/regress/libexec/ld.so/initfirst/test1/libif2/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/initfirst/test1/libif3/shlib_version b/regress/libexec/ld.so/initfirst/test1/libif3/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/initfirst/test1/libif3/shlib_version +++ b/regress/libexec/ld.so/initfirst/test1/libif3/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/initfirst/test1/libnormal/shlib_version b/regress/libexec/ld.so/initfirst/test1/libnormal/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/initfirst/test1/libnormal/shlib_version +++ b/regress/libexec/ld.so/initfirst/test1/libnormal/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/regress/libexec/ld.so/initfirst/test2/prog1/Makefile b/regress/libexec/ld.so/initfirst/test2/prog1/Makefile index f5a66e21a..56b9c640b 100644 --- a/regress/libexec/ld.so/initfirst/test2/prog1/Makefile +++ b/regress/libexec/ld.so/initfirst/test2/prog1/Makefile @@ -44,11 +44,11 @@ AE_OBJDIR!= if [ -d $(AE_DIR)/${__objdir} ]; then \ LDADD=-laa LDFLAGS= -L$(AA_OBJDIR) LDFLAGS+= -Wl,--disable-new-dtags -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/initfirst/test2/prog2/Makefile b/regress/libexec/ld.so/initfirst/test2/prog2/Makefile index bcdda3b71..df5e4889f 100644 --- a/regress/libexec/ld.so/initfirst/test2/prog2/Makefile +++ b/regress/libexec/ld.so/initfirst/test2/prog2/Makefile @@ -44,11 +44,11 @@ AE_OBJDIR!= if [ -d $(AE_DIR)/${__objdir} ]; then \ LDADD=-laa LDFLAGS= -L$(AA_OBJDIR) LDFLAGS+= -Wl,--disable-new-dtags -LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR) -LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR) NOMAN= CC=c++ diff --git a/regress/libexec/ld.so/lazy/libfoo/foo.c b/regress/libexec/ld.so/lazy/libfoo/foo.c index bf82a8572..66fedbd90 100644 --- a/regress/libexec/ld.so/lazy/libfoo/foo.c +++ b/regress/libexec/ld.so/lazy/libfoo/foo.c @@ -24,6 +24,6 @@ foo(void) { if (h == NULL) foo_init(); - + return bar(); } diff --git a/regress/libexec/ld.so/nodelete/test1/test1.c b/regress/libexec/ld.so/nodelete/test1/test1.c index 75dd8a5a8..8b22e21ce 100644 --- a/regress/libexec/ld.so/nodelete/test1/test1.c +++ b/regress/libexec/ld.so/nodelete/test1/test1.c @@ -16,7 +16,7 @@ int checksym(const char *name) { void *sym = dlsym(RTLD_DEFAULT, name); - + if (sym != NULL) { printf("symbol present: %s\n", name); return 1; @@ -35,7 +35,7 @@ main(int argc, char *argv[]) /* symbol should not be here at startup */ if (checksym(SYMBOL) == 1) errx(1, "symbol found: %s", SYMBOL); - + printf("opening\n"); if ((h1 = dlopen(LIBNAME, RTLD_GLOBAL)) == NULL) errx(1, "dlopen: h1: %s: %s", LIBNAME, dlerror()); diff --git a/regress/libexec/ld.so/subst/libaa/shlib_version b/regress/libexec/ld.so/subst/libaa/shlib_version index 987ef7469..1edea46de 100644 --- a/regress/libexec/ld.so/subst/libaa/shlib_version +++ b/regress/libexec/ld.so/subst/libaa/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=0 diff --git a/sbin/vnconfig/vnconfig.c b/sbin/vnconfig/vnconfig.c index c50389812..76ee44f66 100644 --- a/sbin/vnconfig/vnconfig.c +++ b/sbin/vnconfig/vnconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnconfig.c,v 1.12 2022/10/04 06:52:52 kn Exp $ */ +/* $OpenBSD: vnconfig.c,v 1.13 2023/05/14 18:34:02 krw Exp $ */ /* * Copyright (c) 1993 University of Utah. * Copyright (c) 1990, 1993 @@ -300,6 +300,7 @@ config(char *file, char *dev, struct disklabel *dp, char *key, size_t keylen) memset(&vndio, 0, sizeof vndio); vndio.vnd_file = file; + vndio.vnd_type = (dp && dp->d_type) ? dp->d_type : DTYPE_VND; vndio.vnd_secsize = (dp && dp->d_secsize) ? dp->d_secsize : DEV_BSIZE; vndio.vnd_nsectors = (dp && dp->d_nsectors) ? dp->d_nsectors : 100; vndio.vnd_ntracks = (dp && dp->d_ntracks) ? dp->d_ntracks : 1; diff --git a/sys/arch/arm64/stand/efiboot/efidev.c b/sys/arch/arm64/stand/efiboot/efidev.c index cb2ada5c9..8fc36a7d1 100644 --- a/sys/arch/arm64/stand/efiboot/efidev.c +++ b/sys/arch/arm64/stand/efiboot/efidev.c @@ -176,7 +176,7 @@ gpt_chk_mbr(struct dos_partition *dp, u_int64_t dsize) } /* - * Try to find the disk address of the first MBR OpenBSD partition. + * Try to find the disk address of the first MBR SecBSD partition. * * N.B.: must boot from a partition within first 2^32-1 sectors! * @@ -210,7 +210,7 @@ again: return (-1); } - /* Search for OpenBSD partition */ + /* Search for SecBSD partition */ nextebr = 0; for (i = 0; i < NDOSPART; i++) { dp = &mbr.dmbr_parts[i]; @@ -253,7 +253,7 @@ again: } /* - * Try to find the disk address of the first GPT OpenBSD partition. + * Try to find the disk address of the first GPT SecBSD partition. * * N.B.: must boot from a partition within first 2^32-1 sectors! * @@ -275,7 +275,7 @@ findopenbsd_gpt(efi_diskinfo_t ed, const char **err) static struct uuid *openbsd_uuid = NULL, openbsd_uuid_space; static u_char buf[4096]; - /* Prepare OpenBSD UUID */ + /* Prepare SecBSD UUID */ if (openbsd_uuid == NULL) { /* XXX: should be replaced by uuid_dec_be() */ memcpy(&openbsd_uuid_space, openbsd_uuid_code, @@ -368,7 +368,7 @@ findopenbsd_gpt(efi_diskinfo_t ed, const char **err) lba = letoh64(gp.gp_lba_start); /* Bootloaders do not current handle addresses > UINT_MAX! */ if (lba > UINT_MAX || EFI_SECTOBLK(ed, lba) > UINT_MAX) { - *err = "OpenBSD Partition LBA > 2**32 - 1"; + *err = "SecBSD Partition LBA > 2**32 - 1"; return (-1); } return (u_int)lba; @@ -414,14 +414,14 @@ efi_getdisklabel(efi_diskinfo_t ed, struct disklabel *label) if (start == (u_int)-1) { if (err != NULL) return (err); - return ("no OpenBSD GPT partition"); + return ("no SecBSD GPT partition"); } } else { start = findopenbsd(ed, &err); if (start == (u_int)-1) { if (err != NULL) return (err); - return "no OpenBSD MBR partition\n"; + return "no SecBSD MBR partition\n"; } } diff --git a/sys/arch/arm64/stand/efiboot/softraid_arm64.c b/sys/arch/arm64/stand/efiboot/softraid_arm64.c index 80a83157a..d9aaec418 100644 --- a/sys/arch/arm64/stand/efiboot/softraid_arm64.c +++ b/sys/arch/arm64/stand/efiboot/softraid_arm64.c @@ -548,11 +548,11 @@ sr_getdisklabel(struct sr_boot_volume *bv, struct disklabel *label) if (start == (u_int)-1) { if (err != NULL) return (err); - return "no OpenBSD partition\n"; + return "no SecBSD partition\n"; } } else if (mbr.dmbr_sign == DOSMBR_SIGNATURE) { - /* Search for OpenBSD partition */ + /* Search for SecBSD partition */ for (i = 0; i < NDOSPART; i++) { dp = &mbr.dmbr_parts[i]; if (!dp->dp_size) diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 947561ee6..591d6fa67 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.180 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: vnd.c,v 1.181 2023/05/14 18:34:02 krw Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -85,6 +85,7 @@ struct vnd_softc { char sc_file[VNDNLEN]; /* file we're covering */ int sc_flags; /* flags */ + uint16_t sc_type; /* d_type we are emulating */ size_t sc_size; /* size of vnd in sectors */ size_t sc_secsize; /* sector size in bytes */ size_t sc_nsectors; /* # of sectors per track */ @@ -224,7 +225,7 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp, lp->d_ncylinders = sc->sc_size / lp->d_secpercyl; strncpy(lp->d_typename, "vnd device", sizeof(lp->d_typename)); - lp->d_type = DTYPE_VND; + lp->d_type = sc->sc_type; strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname)); DL_SETDSIZE(lp, sc->sc_size); lp->d_version = 1; @@ -502,6 +503,7 @@ fail: } /* Set geometry for device. */ + sc->sc_type = vio->vnd_type; sc->sc_secsize = vio->vnd_secsize; sc->sc_ntracks = vio->vnd_ntracks; sc->sc_nsectors = vio->vnd_nsectors; diff --git a/sys/dev/vndioctl.h b/sys/dev/vndioctl.h index 9c196305b..d8c90ceab 100644 --- a/sys/dev/vndioctl.h +++ b/sys/dev/vndioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vndioctl.h,v 1.11 2019/11/18 22:32:45 jca Exp $ */ +/* $OpenBSD: vndioctl.h,v 1.12 2023/05/14 18:34:02 krw Exp $ */ /* $NetBSD: vndioctl.h,v 1.5 1995/01/25 04:46:30 cgd Exp $ */ /* @@ -48,13 +48,14 @@ * Ioctl definitions for file (vnode) disk pseudo-device. */ struct vnd_ioctl { - char *vnd_file; /* pathname of file to mount */ - size_t vnd_secsize; /* sector size in bytes */ - size_t vnd_nsectors; /* number of sectors in a track */ - size_t vnd_ntracks; /* number of tracks per cylinder (i.e. heads) */ - off_t vnd_size; /* (returned) size of disk */ - u_char *vnd_key; - int vnd_keylen; + char *vnd_file; /* pathname of file to mount */ + size_t vnd_secsize; /* sector size in bytes */ + size_t vnd_nsectors; /* number of sectors in a track */ + size_t vnd_ntracks; /* number of tracks per cylinder */ + off_t vnd_size; /* (returned) size of disk */ + u_char *vnd_key; + int vnd_keylen; + uint16_t vnd_type; /* DTYPE being emulated */ }; /*