diff options
| author | nakayama <nakayama@NetBSD.org> | 2009-02-22 13:06:58 +0000 |
|---|---|---|
| committer | nakayama <nakayama@NetBSD.org> | 2009-02-22 13:06:58 +0000 |
| commit | c99ea852e463f1f36f1e00199d63353eaaf849fe (patch) | |
| tree | 6846811295b7a0c1f184c75dd663cdfa0b5b3bfb /sys/dev/clockctl.c | |
| parent | 02b22ed2c333a18c77e165f19e28d129212513bc (diff) | |
- fix copyout size in CLOCKCTL_O?ADJTIME.
- add missing break in CLOCKCTL_NTP_ADJTIME.
Diffstat (limited to 'sys/dev/clockctl.c')
| -rw-r--r-- | sys/dev/clockctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/clockctl.c b/sys/dev/clockctl.c index aea0874833b..8154a1f92ef 100644 --- a/sys/dev/clockctl.c +++ b/sys/dev/clockctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: clockctl.c,v 1.26 2009/02/18 17:57:11 mrg Exp $ */ +/* $NetBSD: clockctl.c,v 1.27 2009/02/22 13:06:59 nakayama Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.26 2009/02/18 17:57:11 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.27 2009/02/22 13:06:59 nakayama Exp $"); #include "opt_ntp.h" #include "opt_compat_netbsd.h" @@ -94,7 +94,7 @@ clockctlioctl( struct clockctl_adjtime *args = data; if (args->delta) { - error = copyin(args->delta, &atv, sizeof(*args->delta)); + error = copyin(args->delta, &atv, sizeof(atv)); if (error) return (error); } @@ -102,7 +102,7 @@ clockctlioctl( args->olddelta ? &oldatv : NULL, l->l_proc); if (args->olddelta) error = copyout(&oldatv, args->olddelta, - sizeof(args->olddelta)); + sizeof(oldatv)); break; } case CLOCKCTL_CLOCK_SETTIME: { @@ -130,6 +130,7 @@ clockctlioctl( error = copyout(&ntv, args->tp, sizeof(ntv)); if (error == 0) error = copyout(&retval, &args->retval, sizeof(retval)); + break; } #endif /* NTP */ default: |
