Module Name: src Committed By: maxv Date: Thu Mar 29 07:24:26 UTC 2018
Modified Files: src/sys/arch/x86/x86: svs.c Log Message: Use EOPNOTSUPP instead of EINVAL. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/svs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/svs.c diff -u src/sys/arch/x86/x86/svs.c:1.15 src/sys/arch/x86/x86/svs.c:1.16 --- src/sys/arch/x86/x86/svs.c:1.15 Thu Mar 29 07:15:12 2018 +++ src/sys/arch/x86/x86/svs.c Thu Mar 29 07:24:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svs.c,v 1.15 2018/03/29 07:15:12 maxv Exp $ */ +/* $NetBSD: svs.c,v 1.16 2018/03/29 07:24:26 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.15 2018/03/29 07:15:12 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svs.c,v 1.16 2018/03/29 07:24:26 maxv Exp $"); #include "opt_svs.h" @@ -733,7 +733,10 @@ sysctl_machdep_svs_enabled(SYSCTLFN_ARGS return error; if (val == 1) { - error = EINVAL; + if (svs_enabled) + error = 0; + else + error = EOPNOTSUPP; } else { if (svs_enabled) error = svs_disable();