Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Create proc fs to send the arguments to the Driver: (2 Items)
   
Create proc fs to send the arguments to the Driver  
Hi

I want to create a procfs entry to send the debug argument to the device driver at run time. 
Is it possible ?
Actually I want to enable the logs at run time. So I am thinking to modify a flag in procfs and poll same in the driver 
code.
Re: Create proc fs to send the arguments to the Driver  
Hi Thomas, 

there is no dedicated procfs, like a Linux Kernel is providing.

a) Every qnx process can overtake some area in the qnx name-space. 
If you want to control your special driver only, your driver could generate a prefix in the name-space.
Lets say, your driver already uses the prefix "/dev/myDevice/IO" for normal work, you could additional attach "/dev/
myDevice/Debug" and connect the "IO_WRITE"-Entry. 
So, for example you later simply type "echo debug=42 > /dev/myDevice/IO/Debug"  to activate something in your driver.

b) Alternatively you could poll a file under "/dev/shmem" from time to time. This file could contain the debug-flags.
The simple RAM-Disk "/dev/shmem" is serviced by procnto and is available on every running QNX-system.

Regards
Michael