Module Name:    src
Committed By:   prlw1
Date:           Thu Mar 26 17:40:16 UTC 2015

Modified Files:
        src/sys/opencrypto: cryptodev.c deflate.c

Log Message:
Trivial printf format changes and typo fix


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.21 -r1.22 src/sys/opencrypto/deflate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/opencrypto/cryptodev.c
diff -u src/sys/opencrypto/cryptodev.c:1.82 src/sys/opencrypto/cryptodev.c:1.83
--- src/sys/opencrypto/cryptodev.c:1.82	Thu Nov 27 20:30:05 2014
+++ src/sys/opencrypto/cryptodev.c	Thu Mar 26 17:40:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptodev.c,v 1.82 2014/11/27 20:30:05 christos Exp $ */
+/*	$NetBSD: cryptodev.c,v 1.83 2015/03/26 17:40:16 prlw1 Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $	*/
 /*	$OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $	*/
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.82 2014/11/27 20:30:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.83 2015/03/26 17:40:16 prlw1 Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1709,7 +1709,7 @@ cryptodev_session(struct fcrypt *fcr, st
 
 	error = crypto_newsession(&sid, crihead, crypto_devallowsoft);
 	if (!error) {
-		DPRINTF(("cyrptodev_session: got session %d\n", (uint32_t)sid));
+		DPRINTF(("cryptodev_session: got session %d\n", (uint32_t)sid));
 		cse = csecreate(fcr, sid, crie.cri_key, crie.cri_klen,
 		    cria.cri_key, cria.cri_klen, (txform ? sop->cipher : 0), sop->mac,
 		    (tcomp ? sop->comp_alg : 0), txform, thash, tcomp);

Index: src/sys/opencrypto/deflate.c
diff -u src/sys/opencrypto/deflate.c:1.21 src/sys/opencrypto/deflate.c:1.22
--- src/sys/opencrypto/deflate.c:1.21	Sun Jul  3 01:01:06 2011
+++ src/sys/opencrypto/deflate.c	Thu Mar 26 17:40:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: deflate.c,v 1.21 2011/07/03 01:01:06 mrg Exp $ */
+/*	$NetBSD: deflate.c,v 1.22 2015/03/26 17:40:16 prlw1 Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/deflate.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: deflate.c,v 1.21 2011/07/03 01:01:06 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: deflate.c,v 1.22 2015/03/26 17:40:16 prlw1 Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -88,7 +88,7 @@ deflate_global(u_int8_t *data, u_int32_t
 	int error, i, j;
 	struct deflate_buf buf[ZBUF];
 
-	DPRINTF(("deflate_global: size %d\n", size));
+	DPRINTF(("deflate_global: size %u\n", size));
 
 	memset(&zbuf, 0, sizeof(z_stream));
 	zbuf.next_in = data;	/* data that is going to be processed */
@@ -236,7 +236,7 @@ gzip_global(u_int8_t *data, u_int32_t si
 	u_int32_t crc;
 	u_int32_t isize = 0, icrc = 0;
 
-	DPRINTF(("gzip_global: decomp %d, size %d\n", decomp, size));
+	DPRINTF(("gzip_global: decomp %d, size %u\n", decomp, size));
 
 	memset(&zbuf, 0, sizeof(z_stream));
 	zbuf.zalloc = ocf_zalloc;
@@ -245,13 +245,13 @@ gzip_global(u_int8_t *data, u_int32_t si
 
 	if (!decomp) {
 		/* compress */
-		DPRINTF(("gzip_global: compress malloc %d + %d + %d = %d\n",
+		DPRINTF(("gzip_global: compress malloc %u + %zu + %u = %zu\n",
 				size, sizeof(gzip_header), GZIP_TAIL_SIZE,
 				size + sizeof(gzip_header) + GZIP_TAIL_SIZE));
 
 		buf[0].size = size;
 		crc = crc32(0, data, size);
-		DPRINTF(("gzip_compress: size %d, crc 0x%x\n", size, crc));
+		DPRINTF(("gzip_compress: size %u, crc 0x%x\n", size, crc));
 		zbuf.avail_in = size;	/* Total length of data to be processed */
 		zbuf.next_in = data;	/* data that is going to be processed */
 	} else {
@@ -259,7 +259,7 @@ gzip_global(u_int8_t *data, u_int32_t si
 		/* check the gzip header */
 		if (size <= sizeof(gzip_header) + GZIP_TAIL_SIZE) {
 			/* Not enough data for the header & tail */
-			DPRINTF(("gzip_global: not enough data (%d)\n",
+			DPRINTF(("gzip_global: not enough data (%u)\n",
 					size));
 			return 0;
 		}
@@ -284,7 +284,7 @@ gzip_global(u_int8_t *data, u_int32_t si
 		memcpy(&icrc, &data[size-2*sizeof(uint32_t)], sizeof(uint32_t));
 		LE32TOH(icrc);
 
-		DPRINTF(("gzip_global: isize = %d (%02x %02x %02x %02x)\n",
+		DPRINTF(("gzip_global: isize = %u (%02x %02x %02x %02x)\n",
 				isize,
 				data[size-4],
 				data[size-3],
@@ -306,7 +306,7 @@ gzip_global(u_int8_t *data, u_int32_t si
 		return 0;
 	zbuf.next_out = buf[0].out;
 	zbuf.avail_out = buf[0].size;
-	DPRINTF(("zbuf avail_in %d, avail_out %d\n",
+	DPRINTF(("zbuf avail_in %u, avail_out %u\n",
 			zbuf.avail_in, zbuf.avail_out));
 	i = 1;
 
@@ -319,11 +319,11 @@ gzip_global(u_int8_t *data, u_int32_t si
 		goto bad2;
 	}
 	for (;;) {
-		DPRINTF(("pre: %s in:%d out:%d\n", decomp ? "deflate()" : "inflate()", 
+		DPRINTF(("pre: %s in:%u out:%u\n", decomp ? "deflate()" : "inflate()", 
 				zbuf.avail_in, zbuf.avail_out));
 		error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
 				 deflate(&zbuf, Z_FINISH);
-		DPRINTF(("post: %s in:%d out:%d\n", decomp ? "deflate()" : "inflate()", 
+		DPRINTF(("post: %s in:%u out:%u\n", decomp ? "deflate()" : "inflate()", 
 				zbuf.avail_in, zbuf.avail_out));
 		if (error == Z_STREAM_END) /* success */
 			break;
@@ -359,7 +359,7 @@ gzip_global(u_int8_t *data, u_int32_t si
 		count = zbuf.total_out;
 	}
 
-	DPRINTF(("gzip_global: in %d -> out %d\n", size, result));
+	DPRINTF(("gzip_global: in %u -> out %u\n", size, result));
 
 	*out = malloc(result, M_CRYPTO_DATA, M_NOWAIT);
 	if (*out == NULL)

Reply via email to