From: deraadt Date: Sat, 12 Feb 2022 16:22:03 +0000 (+0000) Subject: for non-SUSPEND kernel, put the ioctl pieces entirely inside #ifdef X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7d04ab445644ebbca5772f3510fdcc87e3517f4f;p=openbsd for non-SUSPEND kernel, put the ioctl pieces entirely inside #ifdef --- diff --git a/sys/arch/macppc/dev/apm.c b/sys/arch/macppc/dev/apm.c index e90aa44f3d1..8642cf49896 100644 --- a/sys/arch/macppc/dev/apm.c +++ b/sys/arch/macppc/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.26 2022/02/11 01:55:12 deraadt Exp $ */ +/* $OpenBSD: apm.c,v 1.27 2022/02/12 16:22:03 deraadt Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -214,17 +214,16 @@ apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) return ENXIO; switch (cmd) { - /* some ioctl names from linux */ +#ifdef SUSPEND case APM_IOC_STANDBY: case APM_IOC_SUSPEND: if ((flag & FWRITE) == 0) { error = EBADF; break; } -#ifdef SUSPEND sleep_state(sc, SLEEP_SUSPEND); -#endif break; +#endif case APM_IOC_PRN_CTL: if ((flag & FWRITE) == 0) error = EBADF;