Module Name: src Committed By: martin Date: Wed Aug 23 18:10:06 UTC 2023
Modified Files: src/usr.sbin/cpuctl [netbsd-8]: cpuctl.8 cpuctl.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1892): usr.sbin/cpuctl/cpuctl.8: revision 1.21 usr.sbin/cpuctl/cpuctl.c: revision 1.33 Unless -v is given, ignore EEXIST errors from the IOC_CPU_UCODE_APPLY ioctl() used to implement "cpuctl ucode N", which indicates that the microcode to be loaded already exists in the CPU, and as such, isn't really a very interesting "error". To generate a diff of this commit: cvs rdiff -u -r1.17.6.1 -r1.17.6.2 src/usr.sbin/cpuctl/cpuctl.8 cvs rdiff -u -r1.28.8.2 -r1.28.8.3 src/usr.sbin/cpuctl/cpuctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/cpuctl/cpuctl.8 diff -u src/usr.sbin/cpuctl/cpuctl.8:1.17.6.1 src/usr.sbin/cpuctl/cpuctl.8:1.17.6.2 --- src/usr.sbin/cpuctl/cpuctl.8:1.17.6.1 Wed Apr 11 14:38:34 2018 +++ src/usr.sbin/cpuctl/cpuctl.8 Wed Aug 23 18:10:06 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpuctl.8,v 1.17.6.1 2018/04/11 14:38:34 martin Exp $ +.\" $NetBSD: cpuctl.8,v 1.17.6.2 2023/08/23 18:10:06 martin Exp $ .\" .\" Copyright (c) 2007, 2008, 2012, 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -72,6 +72,10 @@ Set the specified CPUs on line, making i .Op Ar file .Xc This applies the microcode patch to CPUs. +Unless +.Fl v +was given, errors indicating that the microcode +already exists on the CPU in question are ignored. If .Ar cpu is not specified or \-1, all CPUs are updated. Index: src/usr.sbin/cpuctl/cpuctl.c diff -u src/usr.sbin/cpuctl/cpuctl.c:1.28.8.2 src/usr.sbin/cpuctl/cpuctl.c:1.28.8.3 --- src/usr.sbin/cpuctl/cpuctl.c:1.28.8.2 Wed Aug 5 15:48:53 2020 +++ src/usr.sbin/cpuctl/cpuctl.c Wed Aug 23 18:10:06 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuctl.c,v 1.28.8.2 2020/08/05 15:48:53 martin Exp $ */ +/* $NetBSD: cpuctl.c,v 1.28.8.3 2023/08/23 18:10:06 martin Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2012, 2015 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #ifndef lint #include <sys/cdefs.h> -__RCSID("$NetBSD: cpuctl.c,v 1.28.8.2 2020/08/05 15:48:53 martin Exp $"); +__RCSID("$NetBSD: cpuctl.c,v 1.28.8.3 2023/08/23 18:10:06 martin Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -247,7 +247,7 @@ cpu_ucode(char **argv) cpuset_destroy(cpuset); } error = ioctl(fd, IOC_CPU_UCODE_APPLY, &uc); - if (error < 0) { + if (error < 0 && (verbose || errno != EEXIST)) { if (uc.fwname[0]) err(EXIT_FAILURE, "%s", uc.fwname); else