Subject: Re: Making a common API for cpu frequency drivers
To: Jason Thorpe <thorpej@shagadelic.org>
From: Jachym Holecek <freza@dspfpga.com>
List: tech-kern
Date: 09/04/2006 17:48:43
# Jason Thorpe 2006-09-03:
> 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

A note in prop_dictionary_{send,copyin}_ioctl.{3,9} would be enough, IMO...
It's a bit unuasual to have _IO* definition per ioctl() arg type.

	-- Jachym