[hfs-user] hfsutils

Rob Leslie rob@mars.org
Mon, 6 May 2002 18:20:36 -0700

[I'm not subscribed to the darwin-development or studentdev lists; I'm not 
sure this cross-posting is really appropriate.]

On Monday, May 6, 2002, at 03:53  AM, Entwicklung wrote:
>         I'd like to know if anyone who has used hfsutils in the past 
> knows upto what allocation block size it supports for reading. I have an 
> allocation block size of  64kB and I'm unable to mount my hfs-volume. It 
> is slightly larger than 2GB in size. Images of size 32MB, 64MB upto 512MB,
>  1GB and < 2GB seem to work fine.
> I get the following error : Sorry, unable to mount volume. Read 
> unallocated block (Input/Output error).
> Does anybody know if hfsutils imposes a restriction on allocation block 
> size or this error is due to some bug in my program ? What could possibly 
> be causing this ?

It is not the allocation block size but the total volume size which is 
likely to give hfsutils problems. Volumes >= 2GB require byte seek offsets 
to be represented with at least 32 unsigned bits, a condition that 
presents a problem on platforms where lseek() accepts a signed 32-bit 

It's possible hfsutils could be changed to support volumes >= 2GB. Since 
hfsutils reads and writes using physical block (512-byte) addresses, 
perhaps even a simple cast in the call to lseek() would provide the 
required support on platforms where off_t is larger than 32 bits.

Rob Leslie