[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: harddisc device drive
To: mint@atari.archive.umich.edu
Itschere@techfak.Uni-Biel,
In a message on 3 September, to Erlingh@pvv.Unit.No (erli, wrote :
ih> Next episode from this story...
ih>
ih> Erling Henanger wrote:
ih>
ih> > id> 1) Use the DEVDRV read/write calls but watch out that data is alwa
ih> > id> to 512 byte boundaries.
ih> >
ih> > I would go for this solution. Keep a 512 byte buffer in your driver, so
ih> > read/writes not fitting 512 byte boundaries comes/goes to this buffer.
ih> > You could look at the cdrom device in ehscsi if you ever get into a.a.
ih> > This does the same thing for cdroms as ps0 does for floppies.
ih> > (except that it cannot write, of course :-)
ih>
ih> Looks like this is the preferred way. But I'm a bit uncertain about why
ih> keeping a buffer for non aligned read/writes: If the file is defined to b
ih> a harddisc there isn't very much point in read/write from non 512 byte
ih> boundaries. AHDI itself also doesn't allow you to read 67 bytes from the
ih> 374.14th sector... ;)
Well, what if someone decided they wanted to "cat /dev/hd3 | gzip > /dev/tape"
in order to make a compressed image-backup of, say , a Spectre partition...
Erling
---
~ ATP/Unix 1.40 ~ This is my tagline.