Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/cpuctl Unless -v is given, ignore EEXIST errors fro...
details: https://anonhg.NetBSD.org/src/rev/ddb17f01a376
branches: trunk
changeset: 373847:ddb17f01a376
user: kre <kre%NetBSD.org@localhost>
date: Mon Mar 06 01:28:54 2023 +0000
description:
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".
diffstat:
usr.sbin/cpuctl/cpuctl.8 | 6 +++++-
usr.sbin/cpuctl/cpuctl.c | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r bd1e5d0887e0 -r ddb17f01a376 usr.sbin/cpuctl/cpuctl.8
--- a/usr.sbin/cpuctl/cpuctl.8 Mon Mar 06 01:03:45 2023 +0000
+++ b/usr.sbin/cpuctl/cpuctl.8 Mon Mar 06 01:28:54 2023 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: cpuctl.8,v 1.20 2019/05/17 23:51:35 gutteridge Exp $
+.\" $NetBSD: cpuctl.8,v 1.21 2023/03/06 01:28:54 kre Exp $
.\"
.\" Copyright (c) 2007, 2008, 2012, 2015 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -72,6 +72,10 @@
.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.
diff -r bd1e5d0887e0 -r ddb17f01a376 usr.sbin/cpuctl/cpuctl.c
--- a/usr.sbin/cpuctl/cpuctl.c Mon Mar 06 01:03:45 2023 +0000
+++ b/usr.sbin/cpuctl/cpuctl.c Mon Mar 06 01:28:54 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuctl.c,v 1.32 2022/02/01 10:45:02 mrg Exp $ */
+/* $NetBSD: cpuctl.c,v 1.33 2023/03/06 01:28:54 kre 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.32 2022/02/01 10:45:02 mrg Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.33 2023/03/06 01:28:54 kre Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -247,7 +247,7 @@
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
Home |
Main Index |
Thread Index |
Old Index