using select() on /proc filesystem entries

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

 



On Thu, Nov 22, 2007 at 04:57:42PM +0900, Alex White wrote:
>
>> What specifically are you trying to do with your /proc files?
>
> Basically, I need to issue text commands to the driver, receive text 
> responses, and receive unsolicited text notifications.

What's wrong with a /dev node for this?

> I had a feeling that the use of /proc for this purpose was not recommended. 
> What alternative would you recommend? Can you point me to some example 
> code?

For 2.4, your choices are limited to either a /dev node, or a custom
virtual filesystem.  The filesystem might work out the best for you, and
isn't that hard (although it's even easier in 2.6...)  Look at the pci
hotplug filesystem in 2.4 for an example of how to do this, and I wrote
a paper for linux.conf.au in 2003 that shows how it is done for 2.4.

>>> I'm using the debian sarge 2.4 kernel.
>>
>> 2.4?  That's _very_ old.  Please try the 2.6 kernel tree.
>
>
> I'd like to, but there are a number of constraints on the project, and it's 
> imperative that we continue development on 2.4 in the short term. We will 
> be moving to 2.6 within the next 6 months.

Will you be able to change your userspace interface when you move to
2.6?  Hopefully you can :)

Good luck with 2.4, you have told people that it is unsupported, right?
It should also be pretty trivial to update to 2.6, without messing with
userspace much, if at all, at this point in time.

Unless you are using a lot of code that isn't in the upstream kernel,
and if so, then you might have a lot of work, my sympathies...

thanks,

greg k-h


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux