This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Block devices vs Character devices.
- To: felixwong at i-technologies dot cc
- Subject: Re: [ECOS] Block devices vs Character devices.
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Fri, 02 Nov 2001 03:47:58 +0000
- Cc: Ecos-Discuss <ecos-discuss at sources dot redhat dot com>
- References: <NFBBLLEDKLLJHLKGHKACKEHMCAAA.felixwong@i-technologies.cc>
felixwong@i-technologies.cc wrote:
>
> The block device option for eCos was added recently. I am writing a hard disk block
> device driver. However, I have some questions about how to invoke the block device feature
> of devfs. I would like to clarify something before I modify "devfs.cxx" for block devices.
>
> 1. There seems no mechanism to redirect calls to devfs's bwrite, is it true?
Not at present.
> 2. CYG_DEVTAB_STATUS_BLOCK was supposed to be used for identifing if device Block or Char?
Yes, as per CHAR_DEVTAB_ENTRY/BLOCK_DEVTAB_ENTRY definition in
io/common/current/include/devtab.h.
> How comes /dev/tty device with this flag set?
It will have used DEVIO_TABLE, which maps onto CHAR_DEVIO_TABLE in
devtab.h.
> 3. Should BLOCK devices use bread/bwrite instread of read/write?
Probably.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine