kcpuset_copybits: fix potential endianness problem. Spotted by matt@.

This commit is contained in:
rmind 2012-08-20 22:01:29 +00:00
parent e2ff5b6fd5
commit f5661bef75
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_kcpuset.c,v 1.6 2012/06/06 22:22:41 rmind Exp $ */
/* $NetBSD: subr_kcpuset.c,v 1.7 2012/08/20 22:01:29 rmind Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_kcpuset.c,v 1.6 2012/06/06 22:22:41 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_kcpuset.c,v 1.7 2012/08/20 22:01:29 rmind Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -302,7 +302,7 @@ kcpuset_copyout(kcpuset_t *kcp, cpuset_t *ucp, size_t len)
}
void
kcpuset_copybits(const kcpuset_t *kcp, void *bitfield, size_t len)
kcpuset_copybits(const kcpuset_t *kcp, uint32_t *bitfield, size_t len)
{
size_t rlen = MIN(kc_bitsize, len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kcpuset.h,v 1.6 2012/06/06 22:22:41 rmind Exp $ */
/* $NetBSD: kcpuset.h,v 1.7 2012/08/20 22:01:30 rmind Exp $ */
/*-
* Copyright (c) 2008, 2011 The NetBSD Foundation, Inc.
@ -50,7 +50,7 @@ void kcpuset_unuse(kcpuset_t *, kcpuset_t **);
int kcpuset_copyin(const cpuset_t *, kcpuset_t *, size_t);
int kcpuset_copyout(kcpuset_t *, cpuset_t *, size_t);
void kcpuset_copybits(const kcpuset_t *, void *, size_t);
void kcpuset_copybits(const kcpuset_t *, uint32_t *, size_t);
void kcpuset_zero(kcpuset_t *);
void kcpuset_fill(kcpuset_t *);