WebMail
 
Hilfe Weiterleiten Antworten Speichern Löschen Übersicht Webmail
      Hilfe             Weiterleiten             Antworten             Speichern             Loeschen             Uebersicht      
  eMail lesen    Klaus.Halfmann@t-online.de
 
Absender: David Kamholz <davekam@pobox.com>
Betreff: FW: hfsplus problem
Datum: 26.08.01 16:55
Empfänger: klaus.halfmann@t-online.de
Alle Kopfzeilen: anzeigen

Hopefully this address will work!

I've also attached a postscript below.

----------
From: David Kamholz <davekam@pobox.com>
Date: Sat, 25 Aug 2001 10:27:06 -0400
To: <khalfmann@libra.de>
Subject: hfsplus problem

Hi Klaus,

I'm trying to get hfsplus to work to access a 3gb ide drive. I normally use
it on a mac but I want to access it from linux to copy the files off it.
There is one partition only; hfsutils is able to mount the wrapper. However
hfsplusutils complains that it cannot find either the wrapper or HFS+ volume
header.

Upon examining the code and drive contents a bit more closely, it turns out
that there's a partition map at the beginning. The HFS wrapper is located at
0xE480, so presumably the beginning of the partition is located two blocks
earlier at 0xE080. I tried modifying os_seek to always add 0xE080 to the
offset, as a hack, just to see if it would work. It didn't. There was no
longer an error about not finding the wrapper or the volume, but hpls didn't
work nor anything else. Here is the output from the commands:

root:/home/davekam/hfsplus-1.0.2/src# ./hpmount /dev/hdc
(null): /dev/hdc: no error (Success)
root:/home/davekam/hfsplus-1.0.2/src# ./hpls
lt-hpls: lt-hpls: Unable to read file for cached Volume information. (No
such file or directory)
root:/home/davekam/hfsplus-1.0.2/src# ./hpumount
lt-hpumount: destroy: Error while destroying .hfsplusvolume (No such file or
directory)

I haven't had a chance to debug enough to figure out why it's not creating
the cache file. Do you have any idea what's wrong? Let me know if you want
me to run some tests for you...

Regards,
Dave
----------

Upon closer examination I got the offset wrong; it was actually 0x14800. The
modifications I made to os.c are as follows:

#define PARTITION_OFFSET 0x14800

and in os_seek itself:

    if (offset == (unsigned long) -1)
        result = lseek(fd, 0, SEEK_END);
    else
    {
        where <<= blksize_bits;
        where += PARTITION_OFFSET;
/*      printf("seeking to %x\n", where); */
        result = lseek(fd, where, SEEK_SET);
        result -= PARTITION_OFFSET;
    }

This made it possible for me to copy the files I wanted. (I made a small
perl script for recursive directory copying, I can send it to you if you
like.) Actually, there was still one problem -- although doing hpls would
always list directory contents correctly, for a few files, hpls <file> and
hpcopy <file> would report "file not found" errors. I don't believe there
was any problem with the filesystem, I had no trouble accessing these files
on my mac. Fortunately, this occured only for two directories and one file
so it didn't end up being a problem.

Regards,
Dave

      Hilfe             Weiterleiten             Antworten             Speichern             Loeschen             Uebersicht      
Hilfe Weiterleiten Antworten Speichern Löschen Übersicht