j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
On Sep 10, 2012, at 10:59 PM, openbios-request@openbios.org wrote:
Message: 7 Date: Sun, 09 Sep 2012 23:33:13 +0100 From: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk To: The OpenBIOS Mailinglist openbios@openbios.org Subject: Re: [OpenBIOS] Viewing files on HFS volume Message-ID: 504D1929.3050107@ilande.co.uk Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 06/09/12 13:47, Programmingkid wrote:
I am trying to open a Macintosh CD in OpenBIOS. When I use this command to view the files: dir cd:, I receive an error message stating that mac-parts could not determine the file system on the disc. Has any one been able to view files on a HFS disc?
IIRC there was a bug reported in the HFS partition calculation code in OpenBIOS (possibly my fault after some refactoring?). It shouldn't be too difficult to fix, but if you're struggling then I don't mind taking a look if you can supply a test image.
Here is the test image you requested. It is a CD image I created in Disk Utility. I couldn't make a HFS volume, so I had to settle with an HFS+ volume. I did test it out and QEMU gave me the same error I saw with an Apple supplied CD.
Thanks for helping.
Attachments:
On 11/09/12 14:49, Programmingkid wrote:
Here is the test image you requested. It is a CD image I created in Disk Utility. I couldn't make a HFS volume, so I had to settle with an HFS+ volume. I did test it out and QEMU gave me the same error I saw with an Apple supplied CD.
Thanks for helping.
I took a look at this, and initially it was fairly easy to see why the dir command doesn't work for HFS+ disks:
0 > dir cd:2,\ dir method not implemented for HFS+ filesystem ok
And this is reflected obviously in the code here:
static void hfsp_files_dir( hfsp_info_t *dummy ) { forth_printf("dir method not implemented for HFS+ filesystem\n"); POP(); POP(); POP(); }
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.
ATB,
Mark.
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.