Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Handle CLOCKCTL_NTP_ADJTIME32 even when ...
details: https://anonhg.NetBSD.org/src/rev/0e34a8f67158
branches: trunk
changeset: 349033:0e34a8f67158
user: rin <rin%NetBSD.org@localhost>
date: Mon Nov 21 03:50:50 2016 +0000
description:
Handle CLOCKCTL_NTP_ADJTIME32 even when compiled with !NTP;
just return ENOTTY in order to avoid possible failure when
main kernel and compat_netbsd32 module are compiled with
different NTP options in future.
Suggested and approved by mlelstv
diffstat:
sys/compat/netbsd32/netbsd32_ioctl.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r e3ea1cec6473 -r 0e34a8f67158 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Mon Nov 21 03:02:34 2016 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Mon Nov 21 03:50:50 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.86 2016/11/15 10:57:57 rin Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.87 2016/11/21 03:50:50 rin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.86 2016/11/15 10:57:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.87 2016/11/21 03:50:50 rin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
@@ -1324,8 +1324,8 @@
case CLOCKCTL_CLOCK_SETTIME32:
IOCTL_STRUCT_CONV_TO(CLOCKCTL_CLOCK_SETTIME,
clockctl_clock_settime);
+ case CLOCKCTL_NTP_ADJTIME32:
#ifdef NTP
- case CLOCKCTL_NTP_ADJTIME32:
{
size = IOCPARM_LEN(CLOCKCTL_NTP_ADJTIME);
if (size > sizeof(stkbuf))
@@ -1346,7 +1346,10 @@
break;
}
-#endif
+#else
+ error = ENOTTY;
+ break;
+#endif /* NTP */
case KIOCGSYMBOL32:
IOCTL_STRUCT_CONV_TO(KIOCGSYMBOL, ksyms_gsymbol);
Home |
Main Index |
Thread Index |
Old Index