summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c58
1 files changed, 3 insertions, 55 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c b/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c
index e934668..b38833a 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/rpc/xdr.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,8 +31,6 @@
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* xdr.c, generic XDR routines implementation.
* These are the "generic" xdr routines used to serialize and de-serialize
@@ -116,9 +113,6 @@ xdr_int(XDR *xdrs, int *ip)
if (xdrs->x_op == XDR_FREE)
return (TRUE);
-#ifdef DEBUG
- printf("xdr_int: FAILED\n");
-#endif
return (FALSE);
}
@@ -142,9 +136,6 @@ xdr_u_int(XDR *xdrs, uint_t *up)
if (xdrs->x_op == XDR_FREE)
return (TRUE);
-#ifdef DEBUG
- printf("xdr_int: FAILED\n");
-#endif
return (FALSE);
}
@@ -288,9 +279,6 @@ xdr_u_short(XDR *xdrs, ushort_t *usp)
case XDR_DECODE:
if (!XDR_GETINT32(xdrs, (int32_t *)&l)) {
-#ifdef DEBUG
- printf("xdr_u_short: decode FAILED\n");
-#endif
return (FALSE);
}
*usp = (ushort_t)l;
@@ -299,9 +287,6 @@ xdr_u_short(XDR *xdrs, ushort_t *usp)
case XDR_FREE:
return (TRUE);
}
-#ifdef DEBUG
- printf("xdr_u_short: bad op FAILED\n");
-#endif
return (FALSE);
}
@@ -343,9 +328,6 @@ xdr_bool(XDR *xdrs, bool_t *bp)
case XDR_DECODE:
if (!XDR_GETINT32(xdrs, &i32b)) {
-#ifdef DEBUG
- printf("xdr_bool: decode FAILED\n");
-#endif
return (FALSE);
}
*bp = (i32b == XDR_FALSE) ? FALSE : TRUE;
@@ -354,9 +336,6 @@ xdr_bool(XDR *xdrs, bool_t *bp)
case XDR_FREE:
return (TRUE);
}
-#ifdef DEBUG
- printf("xdr_bool: bad op FAILED\n");
-#endif
return (FALSE);
}
@@ -423,9 +402,6 @@ xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt)
if (xdrs->x_op == XDR_DECODE) {
if (!XDR_GETBYTES(xdrs, cp, cnt)) {
-#ifdef DEBUG
- printf("xdr_opaque: decode FAILED\n");
-#endif
return (FALSE);
}
if (rndup == 0)
@@ -435,9 +411,6 @@ xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt)
if (xdrs->x_op == XDR_ENCODE) {
if (!XDR_PUTBYTES(xdrs, cp, cnt)) {
-#ifdef DEBUG
- printf("xdr_opaque: encode FAILED\n");
-#endif
return (FALSE);
}
if (rndup == 0)
@@ -448,9 +421,6 @@ xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt)
if (xdrs->x_op == XDR_FREE)
return (TRUE);
-#ifdef DEBUG
- printf("xdr_opaque: bad op FAILED\n");
-#endif
return (FALSE);
}
@@ -474,17 +444,10 @@ xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, const uint_t maxsize)
* first deal with the length since xdr bytes are counted
*/
if (!xdr_u_int(xdrs, sizep)) {
-#ifdef DEBUG
- printf("xdr_bytes: size FAILED\n");
-#endif
return (FALSE);
}
nodesize = *sizep;
if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE)) {
-#ifdef DEBUG
- printf("xdr_bytes: bad size (%d) FAILED (%d max)\n",
- nodesize, maxsize);
-#endif
return (FALSE);
}
@@ -509,9 +472,6 @@ xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, const uint_t maxsize)
}
return (TRUE);
}
-#ifdef DEBUG
- printf("xdr_bytes: bad op FAILED\n");
-#endif
return (FALSE);
}
@@ -545,9 +505,6 @@ xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
* we deal with the discriminator; it's an enum
*/
if (!xdr_enum(xdrs, dscmp)) {
-#ifdef DEBUG
- printf("xdr_enum: dscmp FAILED\n");
-#endif
return (FALSE);
}
dscm = *dscmp;
@@ -605,15 +562,9 @@ xdr_string(XDR *xdrs, char **cpp, const uint_t maxsize)
break;
}
if (!xdr_u_int(xdrs, &size)) {
-#ifdef DEBUG
- printf("xdr_string: size FAILED\n");
-#endif
return (FALSE);
}
if (size > maxsize) {
-#ifdef DEBUG
- printf("xdr_string: bad size FAILED\n");
-#endif
return (FALSE);
}
nodesize = size + 1;
@@ -654,9 +605,6 @@ xdr_string(XDR *xdrs, char **cpp, const uint_t maxsize)
*cpp = NULL;
return (TRUE);
}
-#ifdef DEBUG
- printf("xdr_string: bad op FAILED\n");
-#endif
return (FALSE);
}
OpenPOWER on IntegriCloud