On 17/09/12 19:53, Mark Cave-Ayland wrote:
Now writing an implementation of dir for HFS+ doesn't look too difficult, however in the code I've quickly put together libhfsp is looking in totally the wrong part of the disk for the backup block even though the disk extents look sensible. Will continue digging.
Okay I've got it - looks like volume_open() currently gets confused when trying to open a volume where the block size is not 512 bytes (in the case of your CD image it is 4096 bytes). I have now implemented a basic dir word (patch to follow shortly) which gives the following output against your image:
Welcome to OpenBIOS v1.0 built on Sep 18 2012 15:11
0 > dir cd:2,\ 6148 2012-09-11 13:41:40 .DS_Store 0 2012-09-11 13:41:20 .fseventsd\ 0 2012-09-11 13:41:20 .HFS+ Private Directory Data?\ 0 2012-09-11 13:42:08 .TemporaryItems\ 0 2012-09-11 13:41:20 .Trashes\ 0 2012-09-11 13:41:40 Folder 1\ 0 2012-09-11 13:41:44 Folder 2\ 29 2012-09-11 13:42:08 readme.txt 0 2012-09-11 13:41:20 HFS+ Private Data\ ok 0 > dir cd:2,.fseventsd 294 2012-09-11 13:42:57 0000000007c7a66b 36 2012-09-11 13:41:20 fseventsd-uuid ok 0 > dir cd:2,\Folder 1 (Empty folder) ok 0 > dir cd:2,\Folder 2 (Empty folder) ok 0 > dir cd:2,\Folder 3 Unable to locate path \Folder 3 on filesystem ok
Note that we don't (yet) do autolocation of partitions which is why the cd:2 notation is needed to manually point towards the second partition on the CD. Please test and let me know how you get on with your original Apple CD.
ATB,
Mark.