summaryrefslogtreecommitdiff
path: root/usr/src/uts/common
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2017-05-30 12:09:28 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2017-05-30 12:09:28 +0000
commit539be8d67e75fbd3dbdebfb93ba8ec220779f0dc (patch)
tree216317390a6e9baedf41b054985ce3860227bc17 /usr/src/uts/common
parenteb851a777c457362e68a9c4505129bd23d595b7a (diff)
parent8186848379535a7535e73f719d8d947abf86522d (diff)
downloadillumos-joyent-539be8d67e75fbd3dbdebfb93ba8ec220779f0dc.tar.gz
[illumos-gate merge]
commit 8186848379535a7535e73f719d8d947abf86522d 8271 loader: Replacing iterating over rootpath by strsep commit 1a1df1dbef1b5c57672433301a296dfe4311e6db 8247 uts: Remove archaic register keyword from zmod commit 45681b8b0e59cad83c1547d78e25d4b7f218d635 8238 xdr_callmsg() should clear residual bytes commit d1aea6f139360e9e7f1504facb24f8521047b15c 7768 Avoid vgatext dependency on agpmaster commit d3d32e94615bd7b44139c48d97167020d74fa5b0 8262 sadp is neither built nor used commit b521c41bc9226e79d6dea569da64cfe5def2ea19 8279 socketpair(AF_UNIX, SOCK_DGRAM,...) broken after 7590 commit d0d16abc1e2ce70cfd8468614a702b20e1fc7e78 8194 kmfcfg: case value not in enumerated type commit 84e6955df14dc7f06618ed336ac0a78ba258feb6 8171 loader: distinguish NFS versus TFTP boot by rootpath commit d993cb83958d44b76c7c56393113c24811dde5f7 8202 doors man pages contain extra whitespace 5180 door_server_create(3c): Incomplete return type commit 6cf138763efaab6b5998bc1ed6849459e376684d 8170 update CLDR data to v31 commit dea58231324dba08972c488dcdedbab5c528ac8a 8263 pkgchk has unused -Q flag
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r--usr/src/uts/common/fs/sockfs/socktpi.c11
-rw-r--r--usr/src/uts/common/rpc/rpc_calmsg.c25
-rw-r--r--usr/src/uts/common/zmod/adler32.c2
-rw-r--r--usr/src/uts/common/zmod/crc32.c10
-rw-r--r--usr/src/uts/common/zmod/crc32.h2
-rw-r--r--usr/src/uts/common/zmod/deflate.c32
-rw-r--r--usr/src/uts/common/zmod/deflate.h2
-rw-r--r--usr/src/uts/common/zmod/inffast.c2
-rw-r--r--usr/src/uts/common/zmod/inffast.h2
-rw-r--r--usr/src/uts/common/zmod/inffixed.h2
-rw-r--r--usr/src/uts/common/zmod/inflate.c2
-rw-r--r--usr/src/uts/common/zmod/inflate.h2
-rw-r--r--usr/src/uts/common/zmod/inftrees.c2
-rw-r--r--usr/src/uts/common/zmod/inftrees.h2
-rw-r--r--usr/src/uts/common/zmod/trees.c4
-rw-r--r--usr/src/uts/common/zmod/zconf.h2
-rw-r--r--usr/src/uts/common/zmod/zlib.h2
-rw-r--r--usr/src/uts/common/zmod/zlib_lint.c2
-rw-r--r--usr/src/uts/common/zmod/zmod_subr.c2
-rw-r--r--usr/src/uts/common/zmod/zutil.c2
-rw-r--r--usr/src/uts/common/zmod/zutil.h2
21 files changed, 44 insertions, 70 deletions
diff --git a/usr/src/uts/common/fs/sockfs/socktpi.c b/usr/src/uts/common/fs/sockfs/socktpi.c
index aaad07d5d3..bbeee8ce4b 100644
--- a/usr/src/uts/common/fs/sockfs/socktpi.c
+++ b/usr/src/uts/common/fs/sockfs/socktpi.c
@@ -2388,13 +2388,16 @@ sotpi_connect(struct sonode *so,
if (so->so_family == AF_UNIX) {
if (sti->sti_faddr_noxlate) {
/*
- * Already have a transport internal address. Do not
- * pass any (transport internal) source address.
+ * sti_faddr is a transport-level address, so
+ * don't pass it as an option. Do save it in
+ * sti_ux_faddr, used for connected DG send.
*/
- addr = sti->sti_faddr_sa;
- addrlen = (t_uscalar_t)sti->sti_faddr_len;
src = NULL;
srclen = 0;
+ addr = sti->sti_faddr_sa;
+ addrlen = (t_uscalar_t)sti->sti_faddr_len;
+ bcopy(addr, &sti->sti_ux_faddr,
+ sizeof (sti->sti_ux_faddr));
} else {
/*
* Pass the sockaddr_un source address as an option
diff --git a/usr/src/uts/common/rpc/rpc_calmsg.c b/usr/src/uts/common/rpc/rpc_calmsg.c
index aab72d1ab4..0094de6df4 100644
--- a/usr/src/uts/common/rpc/rpc_calmsg.c
+++ b/usr/src/uts/common/rpc/rpc_calmsg.c
@@ -32,8 +32,6 @@
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* rpc_calmsg.c
*/
@@ -55,18 +53,21 @@
bool_t
xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg)
{
- int32_t *buf;
+ rpc_inline_t *buf;
struct opaque_auth *oa;
if (xdrs->x_op == XDR_ENCODE) {
+ uint_t credrndup;
+ uint_t verfrndup;
+
if (cmsg->rm_call.cb_cred.oa_length > MAX_AUTH_BYTES)
return (FALSE);
if (cmsg->rm_call.cb_verf.oa_length > MAX_AUTH_BYTES)
return (FALSE);
+ credrndup = RNDUP(cmsg->rm_call.cb_cred.oa_length);
+ verfrndup = RNDUP(cmsg->rm_call.cb_verf.oa_length);
buf = XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT +
- RNDUP(cmsg->rm_call.cb_cred.oa_length) +
- 2 * BYTES_PER_XDR_UNIT +
- RNDUP(cmsg->rm_call.cb_verf.oa_length));
+ credrndup + 2 * BYTES_PER_XDR_UNIT + verfrndup);
if (buf != NULL) {
IXDR_PUT_INT32(buf, cmsg->rm_xid);
IXDR_PUT_ENUM(buf, cmsg->rm_direction);
@@ -83,13 +84,21 @@ xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg)
IXDR_PUT_INT32(buf, oa->oa_length);
if (oa->oa_length) {
bcopy(oa->oa_base, buf, oa->oa_length);
- buf += RNDUP(oa->oa_length) / sizeof (int32_t);
+ buf += credrndup / BYTES_PER_XDR_UNIT;
+ if ((credrndup -= oa->oa_length) > 0)
+ bzero((char *)buf - credrndup,
+ credrndup);
}
oa = &cmsg->rm_call.cb_verf;
IXDR_PUT_ENUM(buf, oa->oa_flavor);
IXDR_PUT_INT32(buf, oa->oa_length);
- if (oa->oa_length)
+ if (oa->oa_length) {
bcopy(oa->oa_base, buf, oa->oa_length);
+ buf += verfrndup / BYTES_PER_XDR_UNIT;
+ if ((verfrndup -= oa->oa_length) > 0)
+ bzero((char *)buf - verfrndup,
+ verfrndup);
+ }
return (TRUE);
}
}
diff --git a/usr/src/uts/common/zmod/adler32.c b/usr/src/uts/common/zmod/adler32.c
index 59d84632ed..e151bd700b 100644
--- a/usr/src/uts/common/zmod/adler32.c
+++ b/usr/src/uts/common/zmod/adler32.c
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#define ZLIB_INTERNAL
#include "zlib.h"
diff --git a/usr/src/uts/common/zmod/crc32.c b/usr/src/uts/common/zmod/crc32.c
index 61ad581ef5..e887a5336c 100644
--- a/usr/src/uts/common/zmod/crc32.c
+++ b/usr/src/uts/common/zmod/crc32.c
@@ -14,8 +14,6 @@
* factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
protection on the static variables used to control the first-use generation
@@ -269,8 +267,8 @@ local unsigned long crc32_little(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ u4 c;
+ const u4 FAR *buf4;
c = (u4)crc;
c = ~c;
@@ -309,8 +307,8 @@ local unsigned long crc32_big(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ u4 c;
+ const u4 FAR *buf4;
c = REV((u4)crc);
c = ~c;
diff --git a/usr/src/uts/common/zmod/crc32.h b/usr/src/uts/common/zmod/crc32.h
index 495c83e031..8053b6117c 100644
--- a/usr/src/uts/common/zmod/crc32.h
+++ b/usr/src/uts/common/zmod/crc32.h
@@ -2,8 +2,6 @@
* Generated automatically by crc32.c
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
local const unsigned long FAR crc_table[TBLS][256] =
{
{
diff --git a/usr/src/uts/common/zmod/deflate.c b/usr/src/uts/common/zmod/deflate.c
index 7847e40ba3..59beb0c78c 100644
--- a/usr/src/uts/common/zmod/deflate.c
+++ b/usr/src/uts/common/zmod/deflate.c
@@ -8,8 +8,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* ALGORITHM
*
@@ -1035,9 +1033,9 @@ local uInt longest_match(s, cur_match)
IPos cur_match; /* current match */
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
+ Bytef *scan = s->window + s->strstart; /* current string */
+ Bytef *match; /* matched string */
+ int len; /* length of current match */
int best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@@ -1052,13 +1050,13 @@ local uInt longest_match(s, cur_match)
/* Compare two bytes at a time. Note: this is not always beneficial.
* Try with and without -DUNALIGNED_OK to check.
*/
- register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
- register ush scan_start = *(ushf*)scan;
- register ush scan_end = *(ushf*)(scan+best_len-1);
+ Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
+ ush scan_start = *(ushf*)scan;
+ ush scan_end = *(ushf*)(scan+best_len-1);
#else
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
- register Byte scan_end1 = scan[best_len-1];
- register Byte scan_end = scan[best_len];
+ Bytef *strend = s->window + s->strstart + MAX_MATCH;
+ Byte scan_end1 = scan[best_len-1];
+ Byte scan_end = scan[best_len];
#endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@@ -1182,10 +1180,10 @@ local uInt longest_match_fast(s, cur_match)
deflate_state *s;
IPos cur_match; /* current match */
{
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+ Bytef *scan = s->window + s->strstart; /* current string */
+ Bytef *match; /* matched string */
+ int len; /* length of current match */
+ Bytef *strend = s->window + s->strstart + MAX_MATCH;
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
* It is easy to get rid of this optimization if necessary.
@@ -1272,8 +1270,8 @@ local void check_match(s, start, match, length)
local void fill_window(s)
deflate_state *s;
{
- register unsigned n, m;
- register Posf *p;
+ unsigned n, m;
+ Posf *p;
unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size;
diff --git a/usr/src/uts/common/zmod/deflate.h b/usr/src/uts/common/zmod/deflate.h
index d01a3c10e4..ada017d9bd 100644
--- a/usr/src/uts/common/zmod/deflate.h
+++ b/usr/src/uts/common/zmod/deflate.h
@@ -11,8 +11,6 @@
#ifndef _DEFLATE_H
#define _DEFLATE_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "zutil.h"
/* define NO_GZIP when compiling if you want to disable gzip header and
diff --git a/usr/src/uts/common/zmod/inffast.c b/usr/src/uts/common/zmod/inffast.c
index a6dcf3f5c8..bbee92ed1e 100644
--- a/usr/src/uts/common/zmod/inffast.c
+++ b/usr/src/uts/common/zmod/inffast.c
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
diff --git a/usr/src/uts/common/zmod/inffast.h b/usr/src/uts/common/zmod/inffast.h
index 2d214efa29..1e88d2d97b 100644
--- a/usr/src/uts/common/zmod/inffast.h
+++ b/usr/src/uts/common/zmod/inffast.h
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
diff --git a/usr/src/uts/common/zmod/inffixed.h b/usr/src/uts/common/zmod/inffixed.h
index ed55df8991..75ed4b5978 100644
--- a/usr/src/uts/common/zmod/inffixed.h
+++ b/usr/src/uts/common/zmod/inffixed.h
@@ -2,8 +2,6 @@
* Generated automatically by makefixed().
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/* WARNING: this file should *not* be used by applications. It
is part of the implementation of the compression library and
is subject to change. Applications should only use zlib.h.
diff --git a/usr/src/uts/common/zmod/inflate.c b/usr/src/uts/common/zmod/inflate.c
index 023e7a121c..64ebf874fb 100644
--- a/usr/src/uts/common/zmod/inflate.c
+++ b/usr/src/uts/common/zmod/inflate.c
@@ -8,8 +8,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Change history:
*
diff --git a/usr/src/uts/common/zmod/inflate.h b/usr/src/uts/common/zmod/inflate.h
index 4d28b22177..07bd3e78a7 100644
--- a/usr/src/uts/common/zmod/inflate.h
+++ b/usr/src/uts/common/zmod/inflate.h
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
diff --git a/usr/src/uts/common/zmod/inftrees.c b/usr/src/uts/common/zmod/inftrees.c
index 2d37167530..db4c30bf85 100644
--- a/usr/src/uts/common/zmod/inftrees.c
+++ b/usr/src/uts/common/zmod/inftrees.c
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "zutil.h"
#include "inftrees.h"
diff --git a/usr/src/uts/common/zmod/inftrees.h b/usr/src/uts/common/zmod/inftrees.h
index 546e8c082f..b1104c87e7 100644
--- a/usr/src/uts/common/zmod/inftrees.h
+++ b/usr/src/uts/common/zmod/inftrees.h
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
diff --git a/usr/src/uts/common/zmod/trees.c b/usr/src/uts/common/zmod/trees.c
index ce0cebc030..b6f5dc2b9f 100644
--- a/usr/src/uts/common/zmod/trees.c
+++ b/usr/src/uts/common/zmod/trees.c
@@ -3,8 +3,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* ALGORITHM
*
@@ -1147,7 +1145,7 @@ local unsigned bi_reverse(code, len)
unsigned code; /* the value to invert */
int len; /* its bit length */
{
- register unsigned res = 0;
+ unsigned res = 0;
do {
res |= code & 1;
code >>= 1, res <<= 1;
diff --git a/usr/src/uts/common/zmod/zconf.h b/usr/src/uts/common/zmod/zconf.h
index ccce7b2742..bf91b5cd08 100644
--- a/usr/src/uts/common/zmod/zconf.h
+++ b/usr/src/uts/common/zmod/zconf.h
@@ -27,8 +27,6 @@
#ifndef _ZCONF_H
#define _ZCONF_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/types.h>
diff --git a/usr/src/uts/common/zmod/zlib.h b/usr/src/uts/common/zmod/zlib.h
index 9b971a0f57..d9f3464c66 100644
--- a/usr/src/uts/common/zmod/zlib.h
+++ b/usr/src/uts/common/zmod/zlib.h
@@ -31,8 +31,6 @@
#ifndef _ZLIB_H
#define _ZLIB_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "zconf.h"
#ifdef __cplusplus
diff --git a/usr/src/uts/common/zmod/zlib_lint.c b/usr/src/uts/common/zmod/zlib_lint.c
index abc9d25624..231d936966 100644
--- a/usr/src/uts/common/zmod/zlib_lint.c
+++ b/usr/src/uts/common/zmod/zlib_lint.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/zmod.h>
diff --git a/usr/src/uts/common/zmod/zmod_subr.c b/usr/src/uts/common/zmod/zmod_subr.c
index 000925753f..8dcbd53152 100644
--- a/usr/src/uts/common/zmod/zmod_subr.c
+++ b/usr/src/uts/common/zmod/zmod_subr.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/systm.h>
#include <sys/cmn_err.h>
#include <sys/kobj.h>
diff --git a/usr/src/uts/common/zmod/zutil.c b/usr/src/uts/common/zmod/zutil.c
index 7d46e30b3e..5b71613e1b 100644
--- a/usr/src/uts/common/zmod/zutil.c
+++ b/usr/src/uts/common/zmod/zutil.c
@@ -8,8 +8,6 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "zutil.h"
#ifndef NO_DUMMY_DECL
diff --git a/usr/src/uts/common/zmod/zutil.h b/usr/src/uts/common/zmod/zutil.h
index 1d02c1d097..8bb8f06a79 100644
--- a/usr/src/uts/common/zmod/zutil.h
+++ b/usr/src/uts/common/zmod/zutil.h
@@ -16,8 +16,6 @@
#ifndef _ZUTIL_H
#define _ZUTIL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#define ZLIB_INTERNAL
#include "zlib.h"