git: 42f4c37035ee - stable/15 - acpi/apm: Don't claim silent success for APMIO_BIOS ioctls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Oct 2026 20:44:23 UTC
The branch stable/15 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=42f4c37035ee97bfdcc19efac2d53501377bef54
commit 42f4c37035ee97bfdcc19efac2d53501377bef54
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-09-30 16:21:16 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-10-08 20:42:33 +0000
acpi/apm: Don't claim silent success for APMIO_BIOS ioctls
Report failure as if the request had failed. This causes apm(8) to
correctly report the resume timer as "unknown" rather than random
garbage.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D59939
(cherry picked from commit 1d7f0c742863ad65e9d27df8f5ae4afddd6cc5e2)
---
sys/x86/acpica/acpi_apm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c
index e781085a442f..318f83d8d922 100644
--- a/sys/x86/acpica/acpi_apm.c
+++ b/sys/x86/acpica/acpi_apm.c
@@ -368,8 +368,7 @@ apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td
case APMIO_BIOS:
if ((flag & FWRITE) == 0)
return (EPERM);
- bzero(addr, sizeof(struct apm_bios_arg));
- break;
+ return (EOPNOTSUPP);
default:
error = EINVAL;
break;