Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Fix sysctl type, should be bool.
details: https://anonhg.NetBSD.org/src/rev/d63b096c4f4c
branches: trunk
changeset: 360747:d63b096c4f4c
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Mar 29 07:15:12 2018 +0000
description:
Fix sysctl type, should be bool.
diffstat:
sys/arch/x86/x86/spectre.c | 9 +++++----
sys/arch/x86/x86/svs.c | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diffs (62 lines):
diff -r 858ae0499a30 -r d63b096c4f4c sys/arch/x86/x86/spectre.c
--- a/sys/arch/x86/x86/spectre.c Thu Mar 29 06:56:54 2018 +0000
+++ b/sys/arch/x86/x86/spectre.c Thu Mar 29 07:15:12 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spectre.c,v 1.3 2018/03/28 19:50:57 maxv Exp $ */
+/* $NetBSD: spectre.c,v 1.4 2018/03/29 07:15:12 maxv Exp $ */
/*
* Copyright (c) 2018 NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.3 2018/03/28 19:50:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.4 2018/03/29 07:15:12 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -338,9 +338,10 @@
sysctl_machdep_spectreV2_mitigated(SYSCTLFN_ARGS)
{
struct sysctlnode node;
- int error, val;
+ int error;
+ bool val;
- val = *(int *)rnode->sysctl_data;
+ val = *(bool *)rnode->sysctl_data;
node = *rnode;
node.sysctl_data = &val;
diff -r 858ae0499a30 -r d63b096c4f4c sys/arch/x86/x86/svs.c
--- a/sys/arch/x86/x86/svs.c Thu Mar 29 06:56:54 2018 +0000
+++ b/sys/arch/x86/x86/svs.c Thu Mar 29 07:15:12 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svs.c,v 1.14 2018/03/13 16:45:52 maxv Exp $ */
+/* $NetBSD: svs.c,v 1.15 2018/03/29 07:15:12 maxv Exp $ */
/*
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svs.c,v 1.14 2018/03/13 16:45:52 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svs.c,v 1.15 2018/03/29 07:15:12 maxv Exp $");
#include "opt_svs.h"
@@ -720,9 +720,10 @@
sysctl_machdep_svs_enabled(SYSCTLFN_ARGS)
{
struct sysctlnode node;
- int error, val;
+ int error;
+ bool val;
- val = *(int *)rnode->sysctl_data;
+ val = *(bool *)rnode->sysctl_data;
node = *rnode;
node.sysctl_data = &val;
Home |
Main Index |
Thread Index |
Old Index