FreeBSD 7.0 suspend

Andreas Wetzel mickey242 at gmx.net
Sat Apr 12 17:06:37 UTC 2008


Mitsuru IWASAKI wrote:
> 
>>      /* If devd(8) is not running, immediately enter the sleep state. */
>>      if (devctl_process_running() == FALSE) {
>>      ...
>>
>> For some reason this check returns FALSE, although devd is actually running.
>> When i comment out the check, everything works as expected: devd is notified,
>> executes /etc/rc.suspend, which in turn calls acpiconf -k 0 when done, and
>> then the system goes to sleep.
>>
>> Any ideas, why this function does not correctly recognize that devd is
>> running?
> 
> Please try the following patches and see if the problem is solved.
> Thanks!
> 
> Index: subr_bus.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v
> retrieving revision 1.201.2.1
> diff -u -r1.201.2.1 subr_bus.c
> --- subr_bus.c	6 Feb 2008 01:34:18 -0000	1.201.2.1
> +++ subr_bus.c	9 Apr 2008 12:30:30 -0000
> @@ -504,7 +504,7 @@
>  boolean_t
>  devctl_process_running(void)
>  {
> -	return (devsoftc.async_proc != NULL);
> +	return (devsoftc.inuse == 1)
>  }
>  
>  /**
> 

Yes! With a semicolon added, the patch seems to work fine.

-- 
Keep it icy man.
I don't want to end up a corpse before my time because you were daydreaming.


More information about the freebsd-acpi mailing list