Subject: Re: Making a common API for cpu frequency drivers
To: Juan RP <juan@xtrarom.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 09/03/2006 14:23:19
On Sep 3, 2006, at 11:40 AM, Juan RP wrote:

>
> I have the following code:
>
> http://www.xtrarom.org/~juan/sysmon_cpufreq/cpufreq.diff <- kernel  
> part
> http://www.xtrarom.org/~juan/sysmon_cpufreq/dict_kern.c <- userland
>
> But when I run it, prop_dictionary_recv_ioctl returns:
>
> [juan@nocturno][~/proplib_tests/dict_kern]> ./dict_kern
> dict_kern: rval=5: Undefined error: 0
> [juan@nocturno][~/proplib_tests/dict_kern]>

prop_dictionary_recv_ioctl() returns an error number; it does not set  
errno.

At the very least, your definition of SMCPUFREQ_GDICT needs to be an  
_IOWR().  The plistref is an IN/OUT type argument.

Maybe I should add a _IOPLISTREF to ioccom.h

-- thorpej