OpenQNX :: The QNX Community Portal

Jul 05, 2008 - 12:10 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 49 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
dnewbold
Post subject: porting driver and apps containing ioctl() calls  PostPosted: May 17, 2007 - 04:20 PM
Guest





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
 
   
Reply with quote Back to top
kwschumm
Post subject: Re: porting driver and apps containing ioctl() calls  PostPosted: May 18, 2007 - 12:54 AM
Senior Member


Joined: Sep 17, 2004
Posts: 207

"dnewbold" <dnewbold@generalstandards.com> wrote in message
news:f2hv03$75j$2@inn.qnx.com...
Quote:
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 ;
 
 View user's profile Send private message  
Reply with quote Back to top
David Gibbs
Post subject: Re: porting driver and apps containing ioctl() calls  PostPosted: May 18, 2007 - 01:29 PM
Guest





dnewbold <dnewbold@generalstandards.com> wrote:
Quote:
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
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.