Skip navigation.
Home
The QNX Community Portal

View topic - porting driver and apps containing ioctl() calls

porting driver and apps containing ioctl() calls

Read-only archive of qnx.newuser (Installation, configuration and administration of the QNX Neutrino or QNX Momentics environments) at inn.qnx.com

porting driver and apps containing ioctl() calls

Postby dnewbold » Thu May 17, 2007 4:20 pm

porting driver and apps containing ioctl() calls

QNX 6.3 translates application ioctl() calls to resource manager devctl
messages.
When the ioctl() "arg" parameter passes data via a pointer all goes well.
In these cases the data is accessed via the C code "void* data =
_DEVCTL_DATA(msg->i);."
However, I've not found how the access the ioctl() "arg" parameter when it
is a discrete value rather than a pointer.

Any help would be appreciated.

Don
dnewbold
 

Re: porting driver and apps containing ioctl() calls

Postby kwschumm » Fri May 18, 2007 12:54 am

"dnewbold" <dnewbold@generalstandards.com> wrote in message
news:f2hv03$75j$2@inn.qnx.com...
porting driver and apps containing ioctl() calls

QNX 6.3 translates application ioctl() calls to resource manager devctl
messages.
When the ioctl() "arg" parameter passes data via a pointer all goes well.
In these cases the data is accessed via the C code "void* data =
_DEVCTL_DATA(msg->i);."
However, I've not found how the access the ioctl() "arg" parameter when it
is a discrete value rather than a pointer.

Any help would be appreciated.

In a driver we do something like this:

int *datap, data ;

datap = (int *) _DEVCTL_DATA(msg->i);
data = *datap ;
kwschumm
Senior Member
 
Posts: 306
Joined: Fri Sep 17, 2004 12:46 pm

Re: porting driver and apps containing ioctl() calls

Postby David Gibbs » Fri May 18, 2007 1:29 pm

dnewbold <dnewbold@generalstandards.com> wrote:
porting driver and apps containing ioctl() calls

QNX 6.3 translates application ioctl() calls to resource manager devctl
messages.
When the ioctl() "arg" parameter passes data via a pointer all goes well.
In these cases the data is accessed via the C code "void* data =
_DEVCTL_DATA(msg->i);."
However, I've not found how the access the ioctl() "arg" parameter when it
is a discrete value rather than a pointer.

Hm... devctl() takes all data as a "void *". Maybe pass the address of the
arg parameter to ioctl?

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com
David Gibbs
 


Return to qnx.newuser

Who is online

Users browsing this forum: No registered users and 1 guest