This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Block devices vs Character devices.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]