From 4ced504bff4f3162ff5faafc3e9e2a88c130fd9b Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Sun, 3 Jun 2012 08:30:00 +0000 Subject: [PATCH] cpucontrol: use CPUCTL_UPDATE ioctl on correct file descriptor I guess that means that microcode update has never worked for AMD CPUs. Please also note that only older AMD CPUs and micrcode file format are supported anyway (pre 10h family). MFC after: 1 week --- usr.sbin/cpucontrol/amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/cpucontrol/amd.c b/usr.sbin/cpucontrol/amd.c index be0e0de78292..3ba435c1aab2 100644 --- a/usr.sbin/cpucontrol/amd.c +++ b/usr.sbin/cpucontrol/amd.c @@ -160,7 +160,7 @@ amd_update(const char *dev, const char *path) args.data = fw_image; args.size = st.st_size; - error = ioctl(fd, CPUCTL_UPDATE, &args); + error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { fprintf(stderr, "failed.\n"); warn("ioctl()");