[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing core functions

From: Martin Grabmueller
Subject: Re: Missing core functions
Date: Fri, 02 Mar 2001 12:37:57 +0100

[cc'd to guile-devel]

> From: "Alastair McKinstry" <address@hidden>
> Date: Fri, 2 Mar 2001 10:09:32 +0000
> Hello,
> I am interested in 'ioctl', I would like to use this / need to add it.
> ( I am working on a guile wrapper for a bluetooth API.)
> I have some questions / ideas about how it could be done, though.
> (1)  exceptions: ioctl returns -1 on error, and an error in errno.
> So a schemish way of dealing with errors would be to read the result
> and throw an error (using strerror(errno)) .

If we can safely determine if an error occurred from examining errno,
that is cerntainly the way to go.  Most of of the system call wrapping
procedures currently in the core do it in the same way.

> Return the return value otherwise?


> But what about the remaining arg? Its type depends on the ioctl in question,
> and it may return a value, of indeterminate type.
> Have you any ideas how that can be handled?

I suppose the only possibility is to support all `known' ioctls, and
throw exceptions when they a requested operation is not supported.

Thanks for the input.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]