diff --git a/include/util.h b/include/util.h index f909031f4c34..f7e306d2ab99 100644 --- a/include/util.h +++ b/include/util.h @@ -1,4 +1,4 @@ -/* $NetBSD: util.h,v 1.34 2005/01/12 03:33:11 christos Exp $ */ +/* $NetBSD: util.h,v 1.35 2005/05/15 21:01:34 thorpej Exp $ */ /*- * Copyright (c) 1995 @@ -105,7 +105,7 @@ int ttylock(const char *, int, pid_t *); char *ttymsg(struct iovec *, int, const char *, int); int ttyunlock(const char *); -u_short disklabel_dkcksum(struct disklabel *); +uint16_t disklabel_dkcksum(struct disklabel *); int disklabel_scan(struct disklabel *, char *, size_t); __END_DECLS diff --git a/lib/libutil/disklabel_dkcksum.3 b/lib/libutil/disklabel_dkcksum.3 index 9254d56f3cee..1d0ac14720ab 100644 --- a/lib/libutil/disklabel_dkcksum.3 +++ b/lib/libutil/disklabel_dkcksum.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: disklabel_dkcksum.3,v 1.4 2003/04/16 13:35:14 wiz Exp $ +.\" $NetBSD: disklabel_dkcksum.3,v 1.5 2005/05/15 21:01:34 thorpej Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -34,7 +34,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 12, 2002 +.Dd MAy 15, 2005 .Dt DISKLABEL_DKCKSUM 3 .Os .Sh NAME @@ -44,7 +44,7 @@ .Lb libutil .Sh SYNOPSIS .In util.h -.Ft u_short +.Ft uint16_t .Fo disklabel_dkcksum .Fa "struct disklabel *lp" .Fc diff --git a/lib/libutil/disklabel_dkcksum.c b/lib/libutil/disklabel_dkcksum.c index 9ca192ab600f..d6883dea0dd4 100644 --- a/lib/libutil/disklabel_dkcksum.c +++ b/lib/libutil/disklabel_dkcksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel_dkcksum.c,v 1.3 2003/10/25 07:31:27 christos Exp $ */ +/* $NetBSD: disklabel_dkcksum.c,v 1.4 2005/05/15 21:01:34 thorpej Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dkcksum.c 8.1 (Berkeley) 6/5/93"; #else -__RCSID("$NetBSD: disklabel_dkcksum.c,v 1.3 2003/10/25 07:31:27 christos Exp $"); +__RCSID("$NetBSD: disklabel_dkcksum.c,v 1.4 2005/05/15 21:01:34 thorpej Exp $"); #endif #endif /* not lint */ @@ -43,15 +43,15 @@ __RCSID("$NetBSD: disklabel_dkcksum.c,v 1.3 2003/10/25 07:31:27 christos Exp $") #include -u_short +uint16_t disklabel_dkcksum(struct disklabel *lp) { - u_short *start, *end; - u_short sum; + uint16_t *start, *end; + uint16_t sum; sum = 0; - start = (u_short *)(void *)lp; - end = (u_short *)(void *)&lp->d_partitions[lp->d_npartitions]; + start = (uint16_t *)(void *)lp; + end = (uint16_t *)(void *)&lp->d_partitions[lp->d_npartitions]; while (start < end) sum ^= *start++; return (sum);