Re: CPU_LIDSUSPEND in init(8) and reboot(8)

2017-06-14 Thread Mike Larkin
On Wed, Jun 14, 2017 at 07:45:42AM +0200, Martin Natano wrote:
> ping?
> 

I think I said ok a long time ago.

-ml

> 
> 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 -   1.64
> > +++ init/init.c 21 May 2017 07:25:07 -
> > @@ -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 -   1.36
> > +++ reboot/reboot.c 21 May 2017 07:25:31 -
> > @@ -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);
> 



Re: CPU_LIDSUSPEND in init(8) and reboot(8)

2017-06-13 Thread Martin Natano
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 -   1.64
> +++ init/init.c   21 May 2017 07:25:07 -
> @@ -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 -   1.36
> +++ reboot/reboot.c   21 May 2017 07:25:31 -
> @@ -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);