A block device would read/write bytes in fixed size blocks, as in disk sectors. Character devices read/write 0 or more bytes, in a stream, such as a TTY or a keyboard. The nature of the device generally dictates how the device driver is written for it, and you access the device accordingly. Mostly, when accessing devices, you treat then as if they are files: open-read-write-seek-flush-stat-close. You also have ioctl calls to access the device itself (as opposed to the data that it conveys).
--- rod.
|