Re: [hatari-devel] ACSI: READ/WRITE (10) incorrectly evaluate block number

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sat, 26 Oct 2013 22:51:24 +0200
schrieb Uwe Seimet <Uwe.Seimet@xxxxxxxxx>:

> Hi,
> 
> > > 1. READ CAPACITY (10) returns a wrong block count. My image has a
> > > size of 410009600 bytes, so it should have 800800 blocks of 512
> > > bytes each.
> > 
> > By the way, I've just noticed that my IDE master drive image has the
> > same size as the ACSI drive image. So the values returned by READ
> > CAPACITY should be identical. 800800 would be correct. The ACSI
> > value is much too high, and the IDE value is a bit too low, even
> > though this is not a problem in practice.
> 
> As far as I can tell the ACSI emulation code tries to determine the
> drive size from the root sector content, which is not correct. There
> might have been (old) partitioning software that once placed the total
> number of sectors there, but this is not standardized and also would
> not help for unpartitioned drives.
> I would expect fstat() or something similar to be used in order to
> derive the number of blocks from the image file size.

Ok, good hint, thanks, I've fixed this now, too.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/