Pyrex experts? Looking to expose settimeofday() and RTC_SET_TIME ioctl()

Daniel Drake dsd at
Wed Apr 28 09:10:43 EDT 2010

On 28 April 2010 09:59, Martin Langhoff <martin.langhoff at> wrote:
> Our chvt() is in pyrex, and all it does is call ioctl() on
> /dev/console. If there's a better way to call ioctl() then we can get
> rid of pyrex in our initramfs completely.

It's not quite that simple, see e.g. pyfb/pyvt.
But yes, I believe that most or all of the stuff could be rewritten
using ctypes and fnctl without much effort. The code was written
before ctypes existed.

> In the meantime, I am following the approach already in use in our
> initramfs, and Hal Murray's posted in private a very nice pyrex
> wrapper around those two that I plan to test/merge/use today.

I don't have any ctypes experience, but from what I read, it looks
like it really would be trivial. Hal, would you be interested in
trying this alternative approach for the 2 new bits that we need? :)


More information about the Devel mailing list