ping?
On Sun, May 21, 2017 at 09:46:45AM +0200, Martin Natano wrote:
> While switching init and reboot to CPU_LIDACTION, I forgot about the
> #ifdef's. Ok?
>
> natano
>
>
> Index: init/init.c
> ===================================================================
> RCS file: /cvs/src/sbin/init/init.c,v
> retrieving revision 1.64
> diff -u -p -r1.64 init.c
> --- init/init.c 3 May 2017 09:51:39 -0000 1.64
> +++ init/init.c 21 May 2017 07:25:07 -0000
> @@ -1325,7 +1325,7 @@ f_nice_death(void)
> static const int death_sigs[3] = { SIGHUP, SIGTERM, SIGKILL };
> int status;
>
> -#ifdef CPU_LIDSUSPEND
> +#ifdef CPU_LIDACTION
> int mib[] = {CTL_MACHDEP, CPU_LIDACTION};
> int lidaction = 0;
>
> Index: reboot/reboot.c
> ===================================================================
> RCS file: /cvs/src/sbin/reboot/reboot.c,v
> retrieving revision 1.36
> diff -u -p -r1.36 reboot.c
> --- reboot/reboot.c 2 Mar 2017 10:38:09 -0000 1.36
> +++ reboot/reboot.c 21 May 2017 07:25:31 -0000
> @@ -112,7 +112,7 @@ main(int argc, char *argv[])
> if (geteuid())
> errx(1, "%s", strerror(EPERM));
>
> -#ifdef CPU_LIDSUSPEND
> +#ifdef CPU_LIDACTION
> if (howto & RB_POWERDOWN) {
> /* Disable suspending on laptop lid close */
> int mib[] = {CTL_MACHDEP, CPU_LIDACTION};
> @@ -122,7 +122,7 @@ main(int argc, char *argv[])
> sizeof(lidaction)) == -1 && errno != EOPNOTSUPP)
> warn("sysctl");
> }
> -#endif /* CPU_LIDSUSPEND */
> +#endif /* CPU_LIDACTION */
>
> if (qflag) {
> reboot(howto);