This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Driver questions
- From: jyl087 at netscape dot net
- To: ecos-discuss at sources dot redhat dot com
- Date: Mon, 15 Apr 2002 11:18:35 -0400
- Subject: [ECOS] Driver questions
Hello,
I'm trying to implement a new device driver, and am using the serial driver
as a template. I've read through the source files for serial, and have a
few questions:
1. The device filesystem (devfs.cxx) seems to throw away ioctl calls.
Why was it decided to do this? dev_fo_setinfo seems to provide a
similar capability, but isn't standard. Should dev_fo_ioctl be modified
to point to dev_fo_setinfo?
2. dev_fo_close is similarly thrown away, rather than vectored through a
DEVIO function. Should this be changed? For my device, I'd like to
return an error if the user tries to open it multiple times. I was
thinking of using close to record a state var indicating that the
first user had successfully relinquished the driver.
3. dev_fo_open - Looks like the mode variable isn't passed down to the
device "lookup" function. My device needs to know if "O_RDONLY" or
"O_WRONLY" is being requested...
Thanks in advance for your thoughts.
/Jim
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss