git: 1d7f0c742863 - main - acpi/apm: Don't claim silent success for APMIO_BIOS ioctls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Sep 2026 16:27:38 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=1d7f0c742863ad65e9d27df8f5ae4afddd6cc5e2
commit 1d7f0c742863ad65e9d27df8f5ae4afddd6cc5e2
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-09-30 16:21:16 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-09-30 16:21:16 +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
---
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 e9db0c090f5c..b314f5e5e705 100644
--- a/sys/x86/acpica/acpi_apm.c
+++ b/sys/x86/acpica/acpi_apm.c
@@ -369,8 +369,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;