Subject: Re: Status report: sysmon_cpufreq(9) + powerctl(8)
To: Iain Hibbert <plunky@rya-online.net>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 10/01/2006 14:52:20
--5vxz5YoITinLs0qm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Oct 01, 2006 at 09:52:42AM +0100, Iain Hibbert wrote:
> On Sun, 1 Oct 2006, Juan RP wrote:
>=20
> > On Sun, 1 Oct 2006 08:07:14 +0200
> > Juan RP <juan@xtrarom.org> wrote:
> >
> > > Code updated... anyway I can't test because the uvm_mmap call in
> > > prop_dictionary_copyout_ioctl() from prop_kern.c returns ENOMEM.
> > >
> > > drvctl -p cpu0 works...
> > >
> > > Any idea?
> >
> > Interesting... if I use prop_dictionary_sendrecv_ioctl in powerctl.c it
> > works but not with prop_dictionary_recv_ioctl that always returns
> > ENOMEM.
>=20
> I think when you use _IOWR then you also must use _sendrecv_ (will look
> properly in a bit, but I think both ioctls you have are IOWR?)

There's no "must".  _IO?? defines what the kernel should do with the
data, no matter what function you use that does the ioctl.

Anyway, now that prop_dictionary_recv_ioctl is just one ioctl call, it
can be used with _IOR.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--5vxz5YoITinLs0qm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRR+6BNgoQloHrPnoAQLhrggAhKQro13N+b2GKYEjWuvJjQGcKBCoQHiG
PM1/j8SuqsvhN8jinvc5Easqv0xCJMVn8lKijMQIxwJAJk3AY2TSvcJbJc9mRyVy
WT7FGFNJeA85Lrwd5t+LusNOBdma6lugaDbKZbRWUraIwkYQysskIJWA0luoYI48
6bvySfC0u5+bKRaYbYZ1AEKM8s31xA6t6OX8wRRXA2hQv8v4Ie8ZQGI7QzUH1wLw
/ff4IAzSjDVI3urVQsSW4LBR3oSR6kcA7zhaSwmwDIVOIUxje8c5gUwZ0UTKL7cv
V41QMYbYG3nyTB9GDQxkszBhdspEJINmqa9biE0wHZv/V/8FASw3wQ==
=5lOB
-----END PGP SIGNATURE-----

--5vxz5YoITinLs0qm--