Probably the most import fields to set would be the type and creator
of files. This is what Mac OS 9 and earlier use to determine the icon
and application associated with a file. (Mac OS X uses additional
mechanisms.)
-Mark
--Apple-Mail-1-767444259--
From entwicklung@whengenibk.de Thu Jan 24 10:28:00 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 24 Jan 2002 11:28:00 +0100
Subject: [hfs-user] Interpretation needed
Message-ID: <000a01c1a4c1$cd105e90$6465cac4@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1A4CA.2E4B4B40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
The HFS+ specs mention:
"
UInt32 attributes;
The following constants define the various bits that may be set in the =
attributes field of the header record.
enum{
kBTBadCloseMask =3D 0x00000001,
kBTBigKeysMask=3D0x00000002,
kBTVariableIndexKeysMask=3D0x00000004
}
"
In my case I need to set both kBTBigkeysMask and =
kBTVariableIndexKeysMask. What is meant by bits 1,2 and 4?
Do I set attributes =3D 6 (assuming 2 and 4 refer to positions 1(2^1) =
and 2(2^2))=20
OR
attributes =3D 20 (binary 10100) starting to count from 0 (LSB) ?
OR attributes =3D 10 (binary 1010) starting to count from 1 (LSB) ?
Can somebody please tell me how this is to be interpreted?
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1A4CA.2E4B4B40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
The HFS+ specs=20
mention:
"
UInt32 =
attributes;
The following constants define =
the various=20
bits that may be set in the attributes field of the header =
record.
enum{
kBTBadCloseMask =3D =
0x00000001,
kBTBigKeysMask=3D0x00000002,
kBTVariableIndexKeysMask=3D0x00000004
}
&nbs=
p;  =
; =
&=
nbsp; &n=
bsp; =20
"
In my case I need to set both =
kBTBigkeysMask and=20
kBTVariableIndexKeysMask. What is =
meant by bits=20
1,2 and 4?
Do I set attributes =3D 6 =
(assuming 2 and 4=20
refer to positions 1(2^1) and 2(2^2))
OR
attributes =3D 20 (binary =
10100) starting=20
to count from 0 (LSB) ?
OR attributes =3D 10 (binary 1010) =
starting to count=20
from 1 (LSB) ?
Can somebody please tell me how this is =
to be=20
interpreted?
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1A4CA.2E4B4B40--
From mday@apple.com Thu Jan 24 17:10:07 2002
From: mday@apple.com (Mark Day)
Date: Thu, 24 Jan 2002 09:10:07 -0800
Subject: [hfs-user] Interpretation needed
In-Reply-To: <000a01c1a4c1$cd105e90$6465cac4@modemserver>
Message-ID: <3778DD1E-10ED-11D6-B50F-00039354009A@apple.com>
--Apple-Mail-1--774730545
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
On Thursday, January 24, 2002, at 02:28 AM, Entwicklung wrote:
> enum{
> kBTBadCloseMask =3D 0x00000001,
> kBTBigKeysMask=3D0x00000002,
> kBTVariableIndexKeysMask=3D0x00000004
> }
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "
> =A0
> =A0
> In my case I need to set both kBTBigkeysMask and=20
> kBTVariableIndexKeysMask. What is meant by bits 1,2 and 4?
> =A0
> =A0Do I set attributes =3D 6 (assuming 2 and 4 refer to positions =
1(2^1)=20
> and 2(2^2))
Yes. The numbers above are masks, not bit numbers.
Apple typically names constants ending in "Mask" for the value you would=20=
logically OR in to produce the composite value. Constants for bit=20
numbers often end in "Bit"; those would be used to determine how many=20
places to shift to get to the correct bit. So, kBTVariableIndexKeysBit=20=
would be 2. (The above constants are bits 0, 1 and 2.)
-Mark
--Apple-Mail-1--774730545
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
On Thursday, January 24, 2002, at 02:28 AM, Entwicklung wrote:
=
Arialenum{
ArialkBTBadCloseMask =3D =
0x00000001,
=
ArialkBTBigKeysMask=3D0x00000002,
=
ArialkBTVariableIndexKeysMask=3D0x0000=
0004
Arial}
=
Arial=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0 "
=A0
=A0
ArialIn my case I need to set both
kBTBigkeysMask and kBTVariableIndexKeysMask. What is meant by bits 1,2
and 4?
=A0
Arial=A0Do I set attributes =3D 6
(assuming 2 and 4 refer to positions 1(2^1) and =
2(2^2))
Yes. The numbers above are masks, not bit numbers.
Apple typically names constants ending in "Mask" for the value you
would logically OR in to produce the composite value. Constants for
bit numbers often end in "Bit"; those would be used to determine how
many places to shift to get to the correct bit. So,
kBTVariableIndexKeysBit would be 2. (The above constants are bits 0,
1 and 2.)
-Mark
--Apple-Mail-1--774730545--
From pwd@apple.com Thu Jan 24 19:13:44 2002
From: pwd@apple.com (Pat Dirks)
Date: Thu, 24 Jan 2002 11:13:44 -0800
Subject: [hfs-user] Interpretation needed
In-Reply-To: <000a01c1a4c1$cd105e90$6465cac4@modemserver>
Message-ID: <7C329815-10FE-11D6-9167-003065A0E6DE@apple.com>
Hi,
In most of Apple's code (and specs), "xxxBit" would refer to a bit
position. Far more common is "xxxMask", which is the value for the
field with the bit in question set. In this case you'll notice the
masks (specifeid as hexadecimal constants) represent values with
successive bits set, starting from the LSB. If you need to set more
than one, just OR together or add the masks specified for each one.
Hope that helps,
-Pat Dirks.
On Thursday, January 24, 2002, at 02:28 AM, Entwicklung wrote:
> Hello,
>
> The HFS+ specs mention:
> "
> UInt32 attributes;
> The following constants define the various bits that may be set in the
> attributes field of the header record.
>
> enum{
> kBTBadCloseMask = 0x00000001,
> kBTBigKeysMask=0x00000002,
> kBTVariableIndexKeysMask=0x00000004
> }
> "
>
>
> In my case I need to set both kBTBigkeysMask and
> kBTVariableIndexKeysMask. What is meant by bits 1,2 and 4?
>
> Do I set attributes = 6 (assuming 2 and 4 refer to positions 1(2^1)
> and 2(2^2))
>
> OR
>
> attributes = 20 (binary 10100) starting to count from 0 (LSB) ?
>
> OR attributes = 10 (binary 1010) starting to count from 1 (LSB) ?
>
> Can somebody please tell me how this is to be interpreted?
> Regards,
> Nandini Hengen
>
>
From biswaroopban@yahoo.co.in Fri Jan 25 04:48:16 2002
From: biswaroopban@yahoo.co.in (Biswaroop Banerjee)
Date: Fri, 25 Jan 2002 10:18:16 +0530
Subject: [hfs-user] HFS or Hybrid Image viewer and verifier.
Message-ID: <000c01c1a55b$81bf7620$1c0a0a0a@bisban>
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C1A589.9A8CB5E0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi all,
Can anybody of you give me a Image verifier for Apple HFS
and Hybrid CDs . i want to first of all create a CD image
on to the hard disk and use that verifier with the viewer to
find out the bugs in my code.=20
I really need this verifier cause I dont know how much compliant is my =
HFS code with the accepted limits.
=20
Waiting for a helping mail,
Bye
Biswaroop Banerjee
=20
The essence of Success lies in its Struggle
-Bisban =
=20
------=_NextPart_000_0009_01C1A589.9A8CB5E0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi all,
Can anybody of you give me a =
Image verifier=20
for Apple HFS
and Hybrid CDs . i want to first =
of all=20
create a CD image
on to the hard disk and use that =
verifier=20
with the viewer to
find out the bugs in my code. =
I really need this verifier =
cause I dont=20
know how much compliant is my HFS code with the accepted =
limits.
Waiting for a helping =
mail,
Bye
Biswaroop Banerjee
The essence of Success lies in its=20
Struggle
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
-Bisban
------=_NextPart_000_0009_01C1A589.9A8CB5E0--
From jcpearso@ps.ucl.ac.uk Fri Jan 25 15:08:30 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Fri, 25 Jan 2002 15:08:30 +0000
Subject: [hfs-user] HFS or Hybrid Image viewer and verifier.
In-Reply-To: Your message of Fri, 25 Jan 2002 10:18:16 +0530.
<000c01c1a55b$81bf7620$1c0a0a0a@bisban>
Message-ID: <124948.1011971310@ourhome.freeserve.co.uk>
> Can anybody of you give me a Image verifier for Apple HFS
> and Hybrid CDs . i want to first of all create a CD image
> on to the hard disk and use that verifier with the viewer to
> find out the bugs in my code.
> I really need this verifier cause I dont know how much compliant
> is my HFS code with the accepted limits.
I've use the various hfsutils and a debugger to check HFS CD images.
James Pearson
From rob@mars.org Sat Jan 26 08:23:34 2002
From: rob@mars.org (Rob Leslie)
Date: Sat, 26 Jan 2002 00:23:34 -0800
Subject: [hfs-user] HFS or Hybrid Image viewer and verifier.
In-Reply-To: Your message of "Fri, 25 Jan 2002 10:18:16 +0530."
<000c01c1a55b$81bf7620$1c0a0a0a@bisban>
Message-ID: <200201260823.AAA09232@surveyor.mars.org>
Biswaroop Banerjee wrote:
> Can anybody of you give me a Image verifier for Apple HFS
> and Hybrid CDs . i want to first of all create a CD image
> on to the hard disk and use that verifier with the viewer to
> find out the bugs in my code.
> I really need this verifier cause I dont know how much compliant is my HFS
> code with the accepted limits.
I used Apple's own Disk First Aid a lot while developing hfsutils. You need to
make the volume image visible to the Mac somehow though.
--
Rob Leslie
rob@mars.org
From biswaroopban@yahoo.co.in Thu Feb 7 10:04:42 2002
From: biswaroopban@yahoo.co.in (Biswaroop Banerjee)
Date: Thu, 7 Feb 2002 15:34:42 +0530
Subject: [hfs-user] Algorithm of B* tree Implementation
Message-ID: <005201c1afbf$46d58fe0$1c0a0a0a@bisban>
This is a multi-part message in MIME format.
------=_NextPart_000_004D_01C1AFEC.F6B53D20
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi All,
Can anybody of you give me the algorithm of implementating a B* tree =
which is the prominent data structure in a HFS formatted volume.
Waiting for your help.
Regards
Biswaroop Banerjee.
The essence of Success lies in its Struggle
-Bisban =
=20
------=_NextPart_000_004D_01C1AFEC.F6B53D20
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi All,
Can anybody of you give me the =
algorithm of=20
implementating a B* tree which is the prominent data structure in a HFS=20
formatted volume.
Waiting for your =
help.
Regards
Biswaroop Banerjee.
The essence of Success lies in its=20
Struggle
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
-Bisban
------=_NextPart_000_004D_01C1AFEC.F6B53D20--
From entwicklung@whengenibk.de Thu Feb 7 14:34:38 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 7 Feb 2002 15:34:38 +0100
Subject: [hfs-user] Volume-Names in HFS
Message-ID: <001401c1afe4$92c23550$6465cac4@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C1AFEC.F3FCFAF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
My HFS-Volume seems to be recognized if I give the Volume a name =
with an odd no. of characters say "NEW" but fails to be recognized if =
the name is say "NAND_HFS". Does anybody know of a possible reason why =
this is happening ?
I think this had something to do with the key length field. In my case - =
if the volume name is even hence implying that the associated key does =
not end on an even byte boundary (where applicable), i byte is added for =
padding but the key-length and name length fields are maintained as =
before. In those keys which have to be of size=3Dmaximum key length the =
padding with zeroes is done in any case.
Does anybody know if something else needs to be changed ?
TIA,
Nandini Hengen
------=_NextPart_000_0011_01C1AFEC.F3FCFAF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
My=20
HFS-Volume seems to be recognized if I give the Volume a name with =
an odd=20
no. of characters say "NEW" but fails to be recognized if the name is =
say=20
"NAND_HFS". Does anybody know of a possible reason why this is happening =
?
I think this had something to do =
with the key=20
length field. In my case - if the volume name is even hence implying =
that the=20
associated key does not end on an even byte boundary (where =
applicable), i=20
byte is added for padding but the key-length and name length =
fields are=20
maintained as before. In those keys which have to be of size=3Dmaximum =
key length=20
the padding with zeroes is done in any case.
Does anybody know if something else =
needs to be=20
changed ?
TIA,
Nandini =
Hengen
------=_NextPart_000_0011_01C1AFEC.F3FCFAF0--
From entwicklung@whengenibk.de Thu Feb 7 15:28:00 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 7 Feb 2002 16:28:00 +0100
Subject: [hfs-user] Re:HFS Volume Names
Message-ID: <000a01c1afec$0765a890$6465cac4@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1AFF4.68BA85E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I managed to figure out what the problem was- it didn't have =
anything to do with odd or even lengths. I had initially hardcoded my =
volume name length to 3 since I had initialized it as "NEW" and =
forgotten to update the record offsets at the end of the node while =
generalizing my code .... that was all:)
So I got an error -127on my iMac ..... whatever that may mean... btw =
does anyone know where to find a listing of all these errors? ... that =
would probably make things a whole lot easier - at least one would know =
where to search for the possible source of the error. I did a search on =
the web and on my iMac but came up with seemingly irrelevant stuff.
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1AFF4.68BA85E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I=20
managed to figure out what the problem was- it didn't have anything to =
do with=20
odd or even lengths. I had initially hardcoded my volume name length to =
3 since=20
I had initialized it as "NEW" and forgotten to update the record offsets =
at the=20
end of the node while generalizing my code .... that was =
all:)
So I got an error -127on my iMac ..... =
whatever=20
that may mean... btw does anyone know where to find a listing of all =
these=20
errors? ... that would probably make things a whole lot easier - at =
least one=20
would know where to search for the possible source of the error. I did a =
search=20
on the web and on my iMac but came up with seemingly irrelevant=20
stuff.
Regards,
Nandini =
Hengen
------=_NextPart_000_0007_01C1AFF4.68BA85E0--
From entwicklung@whengenibk.de Thu Feb 7 15:49:46 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 7 Feb 2002 16:49:46 +0100
Subject: [hfs-user] Algorithm of B* tree Implementation
References: <005201c1afbf$46d58fe0$1c0a0a0a@bisban>
Message-ID: <001001c1afef$11a8e350$6465cac4@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C1AFF7.72FAB360
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Biswaroop,
You'll probably have to come up with an algorithm yourself - based on =
the general structure of a B* tree as described in the specs.=20
There's no such thing as 'the algorithm'. I'm sure all the =
HFS-implementations on the web generate relatively different images =
using different approaches (though based on the same underlying =
principle).
Once you've read thru' the specs and understood how a B* tree has to be =
built you'll be in a position to come up with some idea as to how to =
build it (based on your particular requirements).=20
Regards,
Nandini Hengen
----- Original Message -----=20
From: Biswaroop Banerjee=20
To: hfs-user@lists.mars.org=20
Sent: Thursday, February 07, 2002 11:04 AM
Subject: [hfs-user] Algorithm of B* tree Implementation
Hi All,
=20
Can anybody of you give me the algorithm of implementating a B* tree =
which is the prominent data structure in a HFS formatted volume.
=20
Waiting for your help.
Regards
Biswaroop Banerjee.
=20
=20
The essence of Success lies in its Struggle
=
-Bisban =20
------=_NextPart_000_000D_01C1AFF7.72FAB360
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Biswaroop,
You'll probably have to come up with an =
algorithm=20
yourself - based on the general structure of a B* tree as described in =
the=20
specs.
There's no such thing as 'the =
algorithm'. I'm sure=20
all the HFS-implementations on the web generate relatively different =
images=20
using different approaches (though based on the same underlying=20
principle).
Once you've read thru' the specs and =
understood how=20
a B* tree has to be built you'll be in a position to come up with some =
idea as=20
to how to build it (based on your particular requirements). =
Regards,
Nandini Hengen
----- Original Message -----
Sent: Thursday, February 07, =
2002 11:04=20
AM
Subject: [hfs-user] Algorithm =
of B* tree=20
Implementation
Hi All,
Can anybody of you give me the =
algorithm=20
of implementating a B* tree which is the prominent data structure in a =
HFS=20
formatted volume.
Waiting for your =
help.
Regards
Biswaroop Banerjee.
The essence of Success lies in its=20
=
Struggle
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
-Bisban
------=_NextPart_000_000D_01C1AFF7.72FAB360--
From pwd@apple.com Thu Feb 7 18:56:42 2002
From: pwd@apple.com (Patrick Dirks)
Date: Thu, 7 Feb 2002 10:56:42 -0800
Subject: [hfs-user] Algorithm of B* tree Implementation
In-Reply-To: <005201c1afbf$46d58fe0$1c0a0a0a@bisban>
Message-ID: <6CB187FA-1BFC-11D6-A688-0003930DF574@apple.com>
--Apple-Mail-1-441263988
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
"The algorithm" is a bit hard to lay out in an e-mail message - it's=20
wrapped up in a series of design and implementation aspects. Read up on=20=
B*-Trees and you should have a good idea what the data structure's=20
supposed to look like at any given time. Read "Inside Macintosh" and=20
you'll find a more detailed explanation of the exact details of the=20
HFS/HFS+ B*-Tree structure. More helpful than "Inside Macintosh",=20
perhaps, is the tech note that Apple's published on the subject - "must=20=
read" for anyone implementing a version of HFS/HFS+. I can't remember=20=
the tech note number offhand but it's freely available through Apple's=20=
web site - do a search there.
Finally, note that the Darwin code, which Apple has open sourced,=20
includes a complete "C" implementation of the B*-Tree code as part of a=20=
UNIX kernel. Sign up as a Darwin developer and check out a copy of the=20=
sources. It's in the "xnu" project in the "hfs" directory inside the=20
"bsd" directory of "xnu". That's the ultimate answer right there.
Hope that helps,
-Pat Dirks.
On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
> Hi All,
> =A0
> =A0 Can anybody of you give me the algorithm of implementating a B* =
tree=20
> which is the prominent data structure in a HFS formatted volume.
> =A0
> Waiting=A0 for your help.
> =A0Regards
> Biswaroop Banerjee.
> =A0
> =A0
> The essence of Success lies in its Struggle
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
> -Bisban=A0
--Apple-Mail-1-441263988
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
"The algorithm" is a bit hard to lay out in an e-mail message - it's
wrapped up in a series of design and implementation aspects. Read up
on B*-Trees and you should have a good idea what the data structure's
supposed to look like at any given time. Read "Inside Macintosh" and
you'll find a more detailed explanation of the exact details of the
HFS/HFS+ B*-Tree structure. More helpful than "Inside Macintosh",
perhaps, is the tech note that Apple's published on the subject -
"must read" for anyone implementing a version of HFS/HFS+. I can't
remember the tech note number offhand but it's freely available
through Apple's web site - do a search there.
Finally, note that the Darwin code, which Apple has open sourced,
includes a complete "C" implementation of the B*-Tree code as part of
a UNIX kernel. Sign up as a Darwin developer and check out a copy of
the sources. It's in the "xnu" project in the "hfs" directory inside
the "bsd" directory of "xnu". That's the ultimate answer right there.
Hope that helps,
-Pat Dirks.
On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
ArialHi =
All,
=A0
Arial=A0 Can anybody of you give me
the algorithm of implementating a B* tree which is the prominent data
structure in a HFS formatted volume.
=A0
ArialWaiting=A0 for your =
help.
Arial=A0Regards=
ArialBiswaroop =
Banerjee.
=A0
=A0
ArialThe essence of Success lies
in its Struggle
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
-Bisban=A0
=
--Apple-Mail-1-441263988--
From gbeatty@cpc.gc.ca Fri Feb 8 03:30:33 2002
From: gbeatty@cpc.gc.ca (Gordon Beatty)
Date: Thu, 7 Feb 2002 22:30:33 -0500
Subject: [hfs-user] Algorithm of B* tree Implementation
Message-ID: <000001c1b050$f8140b60$0200a8c0@tallathsdaemon>
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C1B027.0F49EA40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
The technote number is 1150 but if you point your browser to
http://developer.apple.com/techpubs/macos8/Files/FileManager/filemanager.htm
l
the links to the original HFS spec in "Inside Macintosh" and the HFS+ spec
in TechNote 1150 are listed there (although the way OS X uses and interprets
some of the fields in HFS+ does not seem completely reflected in the
TechNote). Also, the technote refers to Robert Sedgewick's book 'Algorithms
in C - Parts 1-4' -- and similarly 'Algorithms in C++ - Parts 1-4' -- which
should prove a fairly clear reference for the purposes of understanding.
The 'File Structures' book (previous or current version) by Michael Folk
could help in this regard as well.
At the end of the day though, a solid C implementation is certainly the
best reference.
Gord Beatty
-----Original Message-----
From: hfs-user-admin@lists.mars.org
[mailto:hfs-user-admin@lists.mars.org]On Behalf Of Patrick Dirks
Sent: Thursday, February 07, 2002 1:57 PM
To: hfs-user@lists.mars.org
Cc: Biswaroop Banerjee
Subject: Re: [hfs-user] Algorithm of B* tree Implementation
"The algorithm" is a bit hard to lay out in an e-mail message - it's
wrapped up in a series of design and implementation aspects. Read up on
B*-Trees and you should have a good idea what the data structure's supposed
to look like at any given time. Read "Inside Macintosh" and you'll find a
more detailed explanation of the exact details of the HFS/HFS+ B*-Tree
structure. More helpful than "Inside Macintosh", perhaps, is the tech note
that Apple's published on the subject - "must read" for anyone implementing
a version of HFS/HFS+. I can't remember the tech note number offhand but
it's freely available through Apple's web site - do a search there.
Finally, note that the Darwin code, which Apple has open sourced, includes
a complete "C" implementation of the B*-Tree code as part of a UNIX kernel.
Sign up as a Darwin developer and check out a copy of the sources. It's in
the "xnu" project in the "hfs" directory inside the "bsd" directory of
"xnu". That's the ultimate answer right there.
Hope that helps,
-Pat Dirks.
On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
Hi All,
Can anybody of you give me the algorithm of implementating a B* tree
which is the prominent data structure in a HFS formatted volume.
Waiting for your help.
Regards
Biswaroop Banerjee.
The essence of Success lies in its Struggle
-Bisban
------=_NextPart_000_0001_01C1B027.0F49EA40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
The technote number is =
1150 but if=20
you point your browser to
the=20
links to the original HFS spec in "Inside Macintosh" and the HFS+ spec =
in=20
TechNote 1150 are listed there (although the way OS X uses and =
interprets some=20
of the fields in HFS+ does not seem completely reflected in =
the=20
TechNote). Also, the technote refers to Robert Sedgewick's book=20
'Algorithms in C - Parts 1-4' -- and similarly 'Algorithms in C++ - =
Parts 1-4'=20
-- which should prove a fairly clear reference for the purposes of=20
understanding. The 'File Structures' book (previous or current =
version) by=20
Michael Folk could help in this regard as well.
At the end of the day =
though, a=20
solid C implementation is certainly the best =
reference.
Gord =
Beatty
"The algorithm" is a bit hard to =
lay out in=20
an e-mail message - it's wrapped up in a series of design and =
implementation=20
aspects. Read up on B*-Trees and you should have a good idea what the =
data=20
structure's supposed to look like at any given time. Read "Inside =
Macintosh"=20
and you'll find a more detailed explanation of the exact details of =
the=20
HFS/HFS+ B*-Tree structure. More helpful than "Inside Macintosh", =
perhaps, is=20
the tech note that Apple's published on the subject - "must read" for =
anyone=20
implementing a version of HFS/HFS+. I can't remember the tech note =
number=20
offhand but it's freely available through Apple's web site - do a =
search=20
there.
Finally, note that the Darwin code, which Apple has open =
sourced, includes a complete "C" implementation of the B*-Tree code as =
part of=20
a UNIX kernel. Sign up as a Darwin developer and check out a copy of =
the=20
sources. It's in the "xnu" project in the "hfs" directory inside the =
"bsd"=20
directory of "xnu". That's the ultimate answer right =
there.
Hope that=20
helps,
-Pat Dirks.
On Thursday, February 7, 2002, at 02:04 =
AM,=20
Biswaroop Banerjee wrote:
Hi =
All,/smaller>/fontfamily>
=20
Can anybody of you give me the algorithm of implementating a B* tree =
which=20
is the prominent data structure in a HFS formatted =
volume./smaller>/fontfamily>
Waiting =20
for your help./smaller>/fontfamily>
Regards/smaller>/fontfamily>
=
param Arial>Biswaroop=20
=
Banerjee./smaller>/fontfamily>
=
param Arial>The=20
essence of Success lies in its=20
=
Struggle
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
=
-Bisban /smaller>/fontfamily>
------=_NextPart_000_0001_01C1B027.0F49EA40--
From pwd@apple.com Fri Feb 8 04:56:47 2002
From: pwd@apple.com (Patrick Dirks)
Date: Thu, 7 Feb 2002 20:56:47 -0800
Subject: [hfs-user] Algorithm of B* tree Implementation
In-Reply-To: <000001c1b050$f8140b60$0200a8c0@tallathsdaemon>
Message-ID: <41C18720-1C50-11D6-8797-0003930DF574@apple.com>
--Apple-Mail-1-477269666
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Ah, yes - Mac OS X came after the format for HFS+ was laid down and=20
documented. Fortunately we'd at least reserved 16 bytes for Mac OS X's=20=
UNIX-style permissions. The 16 bytes are used to store user and group=20=
ids (4 bytes ea), permissions mode and flags (2 bytes each - look at=20
code for exact packing) and 4-byte dev_t for special nodes.
As Gordon says, nothing like the actual code to document the proper use.
You don't say what you're trying to accomplish. Hope this helps.
-Pat Dirks.
On Thursday, February 7, 2002, at 07:30 PM, Gordon Beatty wrote:
> =A0=A0=A0 The technote number is 1150 but if you point your browser to
> =A0
> =A0=A0=A0=20
> =
http://developer.apple.com/techpubs/macos8/Files/FileManager/filemanager.
> html
> =A0
> the links to the original HFS spec in "Inside Macintosh" and the HFS+=20=
> spec in TechNote 1150 are listed there (although the way OS X uses and=20=
> interprets some of the fields in HFS+=A0does not seem=A0completely=20
> reflected in the TechNote).=A0 Also, the technote refers to Robert=20
> Sedgewick's book 'Algorithms in C - Parts 1-4' -- and similarly=20
> 'Algorithms in C++ - Parts 1-4' -- which should prove a fairly clear=20=
> reference for the purposes of understanding.=A0 The 'File Structures'=20=
> book (previous or current version) by Michael Folk could help in this=20=
> regard=A0as well.
> =A0
> =A0=A0=A0 At the end of the day though, a solid C implementation is =
certainly=20
> the best reference.
> =A0
> =A0
> =A0=A0=A0 Gord Beatty
> =A0
>
> -----Original Message-----
> From: hfs-user-admin@lists.mars.org [mailto:hfs-user-
> admin@lists.mars.org]On Behalf Of Patrick Dirks
> Sent: Thursday, February 07, 2002 1:57 PM
> To: hfs-user@lists.mars.org
> Cc: Biswaroop Banerjee
> Subject: Re: [hfs-user] Algorithm of B* tree Implementation
>
> "The algorithm" is a bit hard to lay out in an e-mail message - it's=20=
> wrapped up in a series of design and implementation aspects. Read up =
on=20
> B*-Trees and you should have a good idea what the data structure's=20
> supposed to look like at any given time. Read "Inside Macintosh" and=20=
> you'll find a more detailed explanation of the exact details of the=20
> HFS/HFS+ B*-Tree structure. More helpful than "Inside Macintosh",=20
> perhaps, is the tech note that Apple's published on the subject - =
"must=20
> read" for anyone implementing a version of HFS/HFS+. I can't remember=20=
> the tech note number offhand but it's freely available through Apple's=20=
> web site - do a search there.
>
> Finally, note that the Darwin code, which Apple has open sourced,=20
> includes a complete "C" implementation of the B*-Tree code as part of =
a=20
> UNIX kernel. Sign up as a Darwin developer and check out a copy of the=20=
> sources. It's in the "xnu" project in the "hfs" directory inside the=20=
> "bsd" directory of "xnu". That's the ultimate answer right there.
>
> Hope that helps,
> -Pat Dirks.
>
> On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
>
> Hi All,
> =A0
> =A0 Can anybody of you give me the algorithm of implementating a B* =
tree=20
> which is the prominent data structure in a HFS formatted volume.
> =A0
> Waiting=A0 for your help.
> =A0Regards
> Biswaroop Banerjee.
> =A0
> =A0
> The essence of Success lies in its Struggle
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
> -Bisban=A0
>
--Apple-Mail-1-477269666
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Ah, yes - Mac OS X came after the format for HFS+ was laid down and
documented. Fortunately we'd at least reserved 16 bytes for Mac OS
X's UNIX-style permissions. The 16 bytes are used to store user and
group ids (4 bytes ea), permissions mode and flags (2 bytes each -
look at code for exact packing) and 4-byte dev_t for special nodes.
As Gordon says, nothing like the actual code to document the proper
use.
You don't say what you're trying to accomplish. Hope this helps.
-Pat Dirks.
On Thursday, February 7, 2002, at 07:30 PM, Gordon Beatty wrote:
=
Arial0000,0000,FFFF=A0=A0=A0
The technote number is 1150 but if you point your browser =
to
=A0
=
Arial0000,0000,FFFF=A0=A0=A0
=
1999,1999,FFFF=
http://developer.apple.com/techpubs/macos8/Files/FileManager/filemanager.h=
tml
=A0
=
Arial0000,0000,FFFFthe
links to the original HFS spec in "Inside Macintosh" and the HFS+ spec
in TechNote 1150 are listed there (although the way OS X uses and
interprets some of the fields in HFS+=A0does not seem=A0completely
reflected in the TechNote).=A0 Also, the technote refers to Robert
Sedgewick's book 'Algorithms in C - Parts 1-4' -- and similarly
'Algorithms in C++ - Parts 1-4' -- which should prove a fairly clear
reference for the purposes of understanding.=A0 The 'File Structures'
book (previous or current version) by Michael Folk could help in this
regard=A0as well.
=A0
=
Arial0000,0000,FFFF=A0=A0=A0
At the end of the day though, a solid C implementation is certainly
the best reference.
=A0
=A0
=
Arial0000,0000,FFFF=A0=A0=A0
Gord Beatty
=A0
Tahoma-----Original Message-----
From: hfs-user-admin@lists.mars.org
[mailto:hfs-user-admin@lists.mars.org]On Behalf Of
Patrick Dirks
Sent: Thursday, February 07, 2002 1:57 PM
To: hfs-user@lists.mars.org
Cc: Biswaroop Banerjee
Subject: Re: [hfs-user] Algorithm of B* tree
Implementation
"The algorithm" is a bit hard to lay out in an
e-mail message - it's wrapped up in a series of design and
implementation aspects. Read up on B*-Trees and you should have a good
idea what the data structure's supposed to look like at any given
time. Read "Inside Macintosh" and you'll find a more detailed
explanation of the exact details of the HFS/HFS+ B*-Tree structure.
More helpful than "Inside Macintosh", perhaps, is the tech note that
Apple's published on the subject - "must read" for anyone implementing
a version of HFS/HFS+. I can't remember the tech note number offhand
but it's freely available through Apple's web site - do a search there.
Finally, note that the Darwin code, which Apple has open sourced,
includes a complete "C" implementation of the B*-Tree code as part of
a UNIX kernel. Sign up as a Darwin developer and check out a copy of
the sources. It's in the "xnu" project in the "hfs" directory inside
the "bsd" directory of "xnu". That's the ultimate answer right there.
Hope that helps,
-Pat Dirks.
On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
Hi All,
=A0
=A0 Can anybody of you give me the algorithm of implementating a B* tree
which is the prominent data structure in a HFS formatted volume.
=A0
Waiting=A0 for your help.
=A0Regards
Biswaroop Banerjee.
=A0
=A0
The essence of Success lies in its Struggle
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
-Bisban=A0
=
--Apple-Mail-1-477269666--
From biswaroopban@yahoo.co.in Fri Feb 8 05:58:32 2002
From: biswaroopban@yahoo.co.in (Biswaroop Banerjee)
Date: Fri, 8 Feb 2002 11:28:32 +0530
Subject: [hfs-user] Thanks for the Tip.
References: <6CB187FA-1BFC-11D6-A688-0003930DF574@apple.com>
Message-ID: <003301c1b065$a3e27f80$1c0a0a0a@bisban>
This is a multi-part message in MIME format.
------=_NextPart_000_0030_01C1B093.BD147480
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sir,
I thank you for giving me a good pointer to start my
adventure. I am already going through the B* tree
information and start gathering information from your named
sources too.=20
I came to know that you are in Apple. I want to give you
a more clear picture of my plans.
=20
Aim of the Project : To create a Hybrid CD image which can be =
afterwards written to a Blank CD/DVD to make a Hybrid CD/DVD.
Platforms : The Image file is generated on Windows9x and =
Windows2000,WinXP and WIN NT4.0
Brief Operational View : The end user will select a list of files from a =
Windows formatted volume . This is taken care by the Front End (Visual =
C++).
According to the Filesystem specs for HFS and ISO9660 the filenames of =
the selected files will be checked.
A file will be opened to write the Image. Upto the first 16 =
sectors(1sector =3D 2048 bytes) the file will contain HFS specific data =
structures namely=20
1. HFS volume recognizition sequence in the first 512 bytes of the =
file.
2. Volume Bitmap .
3. Catlog File
4. Extents Overflow file.
The space requirements for the above data structures can be =
found out beforehand since we will be targetting Disc at once writng =
method and we already
know which files to be written to the HFS volume.
In the 16 th sector the Primary Volume descriptors for ISO9660 will be =
written and then the data for ISO9660 filesystem and then the data =
corresponding
to the HFS volume will be dumped.
This implementation overview is my understanding and I would request =
you all for and Comments and Suggestions .
I have the source code for mkhybrid for guidance. I want to have =
suggestion on that too. Is it similar too the ' Darwin' code.
Waitng for your suggestions and inputs eagerly.
regards
Biswaroop
=20
----- Original Message -----=20
From: Patrick Dirks=20
To: hfs-user@lists.mars.org=20
Cc: Biswaroop Banerjee=20
Sent: Friday, February 08, 2002 12:26 AM
Subject: Re: [hfs-user] Algorithm of B* tree Implementation
"The algorithm" is a bit hard to lay out in an e-mail message - it's =
wrapped up in a series of design and implementation aspects. Read up on =
B*-Trees and you should have a good idea what the data structure's =
supposed to look like at any given time. Read "Inside Macintosh" and =
you'll find a more detailed explanation of the exact details of the =
HFS/HFS+ B*-Tree structure. More helpful than "Inside Macintosh", =
perhaps, is the tech note that Apple's published on the subject - "must =
read" for anyone implementing a version of HFS/HFS+. I can't remember =
the tech note number offhand but it's freely available through Apple's =
web site - do a search there.
Finally, note that the Darwin code, which Apple has open sourced, =
includes a complete "C" implementation of the B*-Tree code as part of a =
UNIX kernel. Sign up as a Darwin developer and check out a copy of the =
sources. It's in the "xnu" project in the "hfs" directory inside the =
"bsd" directory of "xnu". That's the ultimate answer right there.
Hope that helps,
-Pat Dirks.
On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
Hi All,
=20
Can anybody of you give me the algorithm of implementating a B* =
tree which is the prominent data structure in a HFS formatted volume.
=20
Waiting for your help.
Regards
Biswaroop Banerjee.
=20
=20
The essence of Success lies in its Struggle
=
-Bisban=20
------=_NextPart_000_0030_01C1B093.BD147480
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sir,
I thank you for =
giving me a good=20
pointer to start my
adventure. I am already going =
through the B*=20
tree
information and start gathering =
information=20
from your named
sources too.
I came to know that you are in =
Apple. I want=20
to give you
a more clear picture of my=20
plans.
Aim of the Project : To create a =
Hybrid CD=20
image which can be afterwards written to a Blank CD/DVD to make a Hybrid =
CD/DVD.
Platforms : The Image file is =
generated on=20
Windows9x and Windows2000,WinXP and WIN NT4.0
Brief Operational View : The end user =
will select a=20
list of files from a Windows formatted volume . This is taken care by =
the Front=20
End (Visual C++).
According to the Filesystem specs =
for HFS and=20
ISO9660 the filenames of the selected files will be =
checked.
A file will be opened to write the =
Image. Upto the=20
first 16 sectors(1sector =3D 2048 bytes) the file will contain HFS =
specific data=20
structures namely
1. HFS volume recognizition =
sequence in the=20
first 512 bytes of the file.
2. Volume Bitmap .
3. Catlog File
4. Extents Overflow =
file.
The=20
space requirements for the above data structures can be found out =
beforehand=20
since we will be targetting Disc at once writng method and we=20
already
know which =
files to be=20
written to the HFS volume.
In the 16 th sector the Primary Volume =
descriptors=20
for ISO9660 will be written and then the data for ISO9660 filesystem and =
then=20
the data corresponding
to the HFS volume will be=20
dumped.
This implementation overview is =
my=20
understanding and I would request you all for and Comments and =
Suggestions=20
.
I have the source code for=20
mkhybrid for guidance. I want to have=20
suggestion on that too. Is it similar too the ' Darwin' =
code.
Waitng for your suggestions and =
inputs =20
eagerly.
regards
Biswaroop
----- Original Message -----
Sent: Friday, February 08, 2002 =
12:26=20
AM
Subject: Re: [hfs-user] =
Algorithm of B*=20
tree Implementation
"The algorithm" is a =
bit hard to=20
lay out in an e-mail message - it's wrapped up in a series of design =
and=20
implementation aspects. Read up on B*-Trees and you should have a good =
idea=20
what the data structure's supposed to look like at any given time. =
Read=20
"Inside Macintosh" and you'll find a more detailed explanation of the =
exact=20
details of the HFS/HFS+ B*-Tree structure. More helpful than "Inside=20
Macintosh", perhaps, is the tech note that Apple's published on the =
subject -=20
"must read" for anyone implementing a version of HFS/HFS+. I can't =
remember=20
the tech note number offhand but it's freely available through Apple's =
web=20
site - do a search there.
Finally, note that the Darwin code, =
which=20
Apple has open sourced, includes a complete "C" implementation of the =
B*-Tree=20
code as part of a UNIX kernel. Sign up as a Darwin developer and check =
out a=20
copy of the sources. It's in the "xnu" project in the "hfs" directory =
inside=20
the "bsd" directory of "xnu". That's the ultimate answer right=20
there.
Hope that helps,
-Pat Dirks.
On Thursday, =
February 7,=20
2002, at 02:04 AM, Biswaroop Banerjee wrote:
Hi =
All,/smaller>/fontfamily>
=20
Can anybody of you give me the algorithm of implementating a B* tree =
which=20
is the prominent data structure in a HFS formatted =
volume./smaller>/fontfamily>
Waiting =20
for your help./smaller>/fontfamily>
Regards/smaller>/fontfamily>
=
param Arial>Biswaroop=20
=
Banerjee./smaller>/fontfamily>
=
param Arial>The=20
essence of Success lies in its=20
=
Struggle
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
=
-Bisban /smaller>/fontfamily>
------=_NextPart_000_0030_01C1B093.BD147480--
From entwicklung@whengenibk.de Mon Feb 11 09:15:10 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Mon, 11 Feb 2002 10:15:10 +0100
Subject: [hfs-user] Index nodes of a catalog B-Tree
Message-ID: <000801c1b2dc$9b68f220$6465cac4@modemserver>
> Simon Bazley,
> Thanks for replying !
> I managed to figure out what the problem was- I had mentioned this in my
> previous email to the list.
> I have a question to which maybe you or someone from the list knows the
> answer -
> At the moment I'm wondering how to determine the number of index nodes
> needed for a catalog tree. I have determined the number of catalog nodes
> needed and my question is : Does every leaf node in the catalog-tree have
to
> be referenced in the index-nodes?
> In a broadly logical sense I would say that it has to ...since a leaf
> without an index in a 'real' tree would probably be like a leaf falling
off
> a branch in autumn :). The HFS reference (Inside Macintosh) has this
figure
> of a sample B-Tree where a reference to every leaf-node is maintained in
the
> index nodes.
> But I came across a sample HFS-image (which is readable on my Mac) which
> shattered all my illusions since the root-node (the only index node in
this
> image) doesn't maintain references to all leaf nodes, only to a few of
them.
>
> Does anyone from Apple (or others) maybe know how the index nodes are to
> built up i.e. to which leaf-nodes (if not to all) a reference has to
> necessarily be maintained ? I guess a Mac internally should be doing some
> kind of optimization to reduce the search-time in finding a
leaf-record....
> but all I need to know is what I should take into account while
constructing
> my index-nodes to make the job easier for the Mac when an external
> HFS-volume is mounted.
>
> Would be grateful for any tips.
>
> Regards,
> Nandini Hengen
>
>
>
> ----- Original Message -----
> From: "Simon Bazley "
> To: "Entwicklung"
> Cc:
> Sent: Monday, February 11, 2002 2:41 AM
> Subject: Re: [hfs-user] Volume-Names in HFS
>
>
> > Have you checked Inside Macintosh Files to see what it says about the
MDB
> > record (assuming its an HFS volume) or the equivalent in the HFS+
Technote
> > (assuming its HFS+). My understanding was that volume name was pretty
> > bullet proof.
> >
> > Simon
> >
> > On Thu, 7 Feb 2002, Entwicklung wrote:
> >
> > > Hello,
> > > My HFS-Volume seems to be recognized if I give the Volume a
name
> with an odd no. of characters say "NEW" but fails to be recognized if the
> name is say "NAND_HFS". Does anybody know of a possible reason why this is
> happening ?
> > >
> > > I think this had something to do with the key length field. In my
case -
> if the volume name is even hence implying that the associated key does not
> end on an even byte boundary (where applicable), i byte is added for
padding
> but the key-length and name length fields are maintained as before. In
those
> keys which have to be of size=maximum key length the padding with zeroes
is
> done in any case.
> > > Does anybody know if something else needs to be changed ?
> > >
> > > TIA,
> > > Nandini Hengen
> > >
> >
>
From pwd@apple.com Mon Feb 11 20:13:38 2002
From: pwd@apple.com (Patrick Dirks)
Date: Mon, 11 Feb 2002 12:13:38 -0800
Subject: [hfs-user] Index nodes of a catalog B-Tree
In-Reply-To: <000801c1b2dc$9b68f220$6465cac4@modemserver>
Message-ID:
Hi,
Yes, every leaf node should have a record in some index node at the next
level. Each one of those, in turn, should have a record pointing to
them in the next higher level, etc.
If you have a leaf record that isn't directly pointed to by an index
record a search by name for any entries in there will fail, although
opening the folder and enumerating the contents of a folder will show
all the entries.
Hope that helps,
-Pat Dirks.
On Monday, February 11, 2002, at 01:15 AM, Entwicklung wrote:
>
>> Simon Bazley,
>> Thanks for replying !
>> I managed to figure out what the problem was- I had mentioned this
>> in my
>> previous email to the list.
>
>> I have a question to which maybe you or someone from the list knows the
>> answer -
>> At the moment I'm wondering how to determine the number of index nodes
>> needed for a catalog tree. I have determined the number of catalog
>> nodes
>> needed and my question is : Does every leaf node in the catalog-tree
>> have
> to
>> be referenced in the index-nodes?
>> In a broadly logical sense I would say that it has to ...since a leaf
>> without an index in a 'real' tree would probably be like a leaf falling
> off
>> a branch in autumn :). The HFS reference (Inside Macintosh) has this
> figure
>> of a sample B-Tree where a reference to every leaf-node is maintained
>> in
> the
>> index nodes.
>> But I came across a sample HFS-image (which is readable on my Mac)
>> which
>> shattered all my illusions since the root-node (the only index node in
> this
>> image) doesn't maintain references to all leaf nodes, only to a few of
> them.
>>
>> Does anyone from Apple (or others) maybe know how the index nodes are
>> to
>> built up i.e. to which leaf-nodes (if not to all) a reference has to
>> necessarily be maintained ? I guess a Mac internally should be doing
>> some
>> kind of optimization to reduce the search-time in finding a
> leaf-record....
>> but all I need to know is what I should take into account while
> constructing
>> my index-nodes to make the job easier for the Mac when an external
>> HFS-volume is mounted.
>>
>> Would be grateful for any tips.
>>
>> Regards,
>> Nandini Hengen
>>
>>
>>
>> ----- Original Message -----
>> From: "Simon Bazley "
>> To: "Entwicklung"
>> Cc:
>> Sent: Monday, February 11, 2002 2:41 AM
>> Subject: Re: [hfs-user] Volume-Names in HFS
>>
>>
>>> Have you checked Inside Macintosh Files to see what it says about the
> MDB
>>> record (assuming its an HFS volume) or the equivalent in the HFS+
> Technote
>>> (assuming its HFS+). My understanding was that volume name was pretty
>>> bullet proof.
>>>
>>> Simon
>>>
>>> On Thu, 7 Feb 2002, Entwicklung wrote:
>>>
>>>> Hello,
>>>> My HFS-Volume seems to be recognized if I give the Volume a
> name
>> with an odd no. of characters say "NEW" but fails to be recognized if
>> the
>> name is say "NAND_HFS". Does anybody know of a possible reason why
>> this is
>> happening ?
>>>>
>>>> I think this had something to do with the key length field. In my
> case -
>> if the volume name is even hence implying that the associated key does
>> not
>> end on an even byte boundary (where applicable), i byte is added for
> padding
>> but the key-length and name length fields are maintained as before. In
> those
>> keys which have to be of size=maximum key length the padding with
>> zeroes
> is
>> done in any case.
>>>> Does anybody know if something else needs to be changed ?
>>>>
>>>> TIA,
>>>> Nandini Hengen
>>>>
>>>
>>
>
From entwicklung@whengenibk.de Mon Feb 11 21:10:52 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Mon, 11 Feb 2002 22:10:52 +0100
Subject: [hfs-user] Re: Mac-OS Dates
References: <20020211220412-r01010800-f1c92b43-0920-010c@10.0.0.23>
Message-ID: <000801c1b340$96d9a790$6465cac4@modemserver>
>
> I think they actually used 1900 there, to make matters even more
confusing...
>
> Just
I think so too.. I just landed up with a timespan of 101 years for the date
of a file I had created a few months back. This wouldn't make sense if it
were 1904.
Regards,
Nandini Hengen
> _______________________________________________
> carbon-development mailing list | carbon-development@lists.apple.com
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/carbon-development
> Do not post admin requests to the list. They will be ignored.
From simon@sibaz.com Mon Feb 11 01:38:52 2002
From: simon@sibaz.com (Simon Bazley )
Date: Mon, 11 Feb 2002 01:38:52 +0000 (GMT)
Subject: [hfs-user] Algorithm of B* tree Implementation
In-Reply-To: <005201c1afbf$46d58fe0$1c0a0a0a@bisban>
Message-ID:
The spec is in Macintosh Files, An implementation is in the linux HFS_FS
code. I'm currently implementing a replacement that allows for bigger
Nodes, as required by HFS+, but it'll be a while before its usable.
Simon
On Thu, 7 Feb 2002, Biswaroop Banerjee wrote:
> Hi All,
>
> Can anybody of you give me the algorithm of implementating a B* tree which is the prominent data structure in a HFS formatted volume.
>
> Waiting for your help.
> Regards
> Biswaroop Banerjee.
>
>
> The essence of Success lies in its Struggle
> -Bisban
>
From simon@sibaz.com Mon Feb 11 01:41:32 2002
From: simon@sibaz.com (Simon Bazley )
Date: Mon, 11 Feb 2002 01:41:32 +0000 (GMT)
Subject: [hfs-user] Volume-Names in HFS
In-Reply-To: <001401c1afe4$92c23550$6465cac4@modemserver>
Message-ID:
Have you checked Inside Macintosh Files to see what it says about the MDB
record (assuming its an HFS volume) or the equivalent in the HFS+ Technote
(assuming its HFS+). My understanding was that volume name was pretty
bullet proof.
Simon
On Thu, 7 Feb 2002, Entwicklung wrote:
> Hello,
> My HFS-Volume seems to be recognized if I give the Volume a name with an odd no. of characters say "NEW" but fails to be recognized if the name is say "NAND_HFS". Does anybody know of a possible reason why this is happening ?
>
> I think this had something to do with the key length field. In my case - if the volume name is even hence implying that the associated key does not end on an even byte boundary (where applicable), i byte is added for padding but the key-length and name length fields are maintained as before. In those keys which have to be of size=maximum key length the padding with zeroes is done in any case.
> Does anybody know if something else needs to be changed ?
>
> TIA,
> Nandini Hengen
>
From simon@sibaz.com Mon Feb 11 01:43:53 2002
From: simon@sibaz.com (Simon Bazley )
Date: Mon, 11 Feb 2002 01:43:53 +0000 (GMT)
Subject: [hfs-user] Algorithm of B* tree Implementation
In-Reply-To: <001001c1afef$11a8e350$6465cac4@modemserver>
Message-ID:
Having said that, in the Technote covering HFS+ they refer to a book
called Algorithms in C (Addison Wesley), which they say explains B-Trees.
I've not seen it, but I intend to look at it when I can. Check out the
Tech Note if you're interested.
Simon
On Thu, 7 Feb 2002, Entwicklung wrote:
> Biswaroop,
>
> You'll probably have to come up with an algorithm yourself - based on the general structure of a B* tree as described in the specs.
> There's no such thing as 'the algorithm'. I'm sure all the HFS-implementations on the web generate relatively different images using different approaches (though based on the same underlying principle).
>
> Once you've read thru' the specs and understood how a B* tree has to be built you'll be in a position to come up with some idea as to how to build it (based on your particular requirements).
>
> Regards,
> Nandini Hengen
> ----- Original Message -----
> From: Biswaroop Banerjee
> To: hfs-user@lists.mars.org
> Sent: Thursday, February 07, 2002 11:04 AM
> Subject: [hfs-user] Algorithm of B* tree Implementation
>
>
> Hi All,
>
> Can anybody of you give me the algorithm of implementating a B* tree which is the prominent data structure in a HFS formatted volume.
>
> Waiting for your help.
> Regards
> Biswaroop Banerjee.
>
>
> The essence of Success lies in its Struggle
> -Bisban
>
From simon@sibaz.com Mon Feb 11 02:16:21 2002
From: simon@sibaz.com (Simon Bazley )
Date: Mon, 11 Feb 2002 02:16:21 +0000 (GMT)
Subject: [hfs-user] Thanks for the Tip.
In-Reply-To: <003301c1b065$a3e27f80$1c0a0a0a@bisban>
Message-ID:
There is a toolset availiable called HFS_UTILS which appears to create and
manipulate HFS volumes. I've sofar been able to create and format a HFS
volume, then mount it on my linux box, then create files and generalyl
mess.
I did this by creating a large file containing zero's then using
HFS_Format (one of hfs_utils) to format it.
The only downside to this is that you have to know the volume size in
advance. If you have a rough idea for the volume size needed, I'd
reccomend tryign this out.
As an asside, I've successfully compiled HFS_UTILS under NT using Cygwin,
and using the hfs utils tools, I've manipulated it, then copied it to
linux and mounted it, so while not ideal I guess this will work on most
OS's
Simon
On Fri, 8 Feb 2002, Biswaroop Banerjee wrote:
> Sir,
>
> I thank you for giving me a good pointer to start my
> adventure. I am already going through the B* tree
> information and start gathering information from your named
> sources too.
> I came to know that you are in Apple. I want to give you
> a more clear picture of my plans.
>
> Aim of the Project : To create a Hybrid CD image which can be afterwards written to a Blank CD/DVD to make a Hybrid CD/DVD.
>
> Platforms : The Image file is generated on Windows9x and Windows2000,WinXP and WIN NT4.0
>
> Brief Operational View : The end user will select a list of files from a Windows formatted volume . This is taken care by the Front End (Visual C++).
>
> According to the Filesystem specs for HFS and ISO9660 the filenames of the selected files will be checked.
>
> A file will be opened to write the Image. Upto the first 16 sectors(1sector = 2048 bytes) the file will contain HFS specific data structures namely
> 1. HFS volume recognizition sequence in the first 512 bytes of the file.
> 2. Volume Bitmap .
> 3. Catlog File
> 4. Extents Overflow file.
>
> The space requirements for the above data structures can be found out beforehand since we will be targetting Disc at once writng method and we already
> know which files to be written to the HFS volume.
>
> In the 16 th sector the Primary Volume descriptors for ISO9660 will be written and then the data for ISO9660 filesystem and then the data corresponding
> to the HFS volume will be dumped.
>
> This implementation overview is my understanding and I would request you all for and Comments and Suggestions .
>
> I have the source code for mkhybrid for guidance. I want to have suggestion on that too. Is it similar too the ' Darwin' code.
>
> Waitng for your suggestions and inputs eagerly.
> regards
> Biswaroop
>
>
>
>
> ----- Original Message -----
> From: Patrick Dirks
> To: hfs-user@lists.mars.org
> Cc: Biswaroop Banerjee
> Sent: Friday, February 08, 2002 12:26 AM
> Subject: Re: [hfs-user] Algorithm of B* tree Implementation
>
>
> "The algorithm" is a bit hard to lay out in an e-mail message - it's wrapped up in a series of design and implementation aspects. Read up on B*-Trees and you should have a good idea what the data structure's supposed to look like at any given time. Read "Inside Macintosh" and you'll find a more detailed explanation of the exact details of the HFS/HFS+ B*-Tree structure. More helpful than "Inside Macintosh", perhaps, is the tech note that Apple's published on the subject - "must read" for anyone implementing a version of HFS/HFS+. I can't remember the tech note number offhand but it's freely available through Apple's web site - do a search there.
>
> Finally, note that the Darwin code, which Apple has open sourced, includes a complete "C" implementation of the B*-Tree code as part of a UNIX kernel. Sign up as a Darwin developer and check out a copy of the sources. It's in the "xnu" project in the "hfs" directory inside the "bsd" directory of "xnu". That's the ultimate answer right there.
>
> Hope that helps,
> -Pat Dirks.
>
> On Thursday, February 7, 2002, at 02:04 AM, Biswaroop Banerjee wrote:
>
>
> Hi All,
>
> Can anybody of you give me the algorithm of implementating a B* tree which is the prominent data structure in a HFS formatted volume.
>
> Waiting for your help.
> Regards
> Biswaroop Banerjee.
>
>
> The essence of Success lies in its Struggle
> -Bisban
>
>
From entwicklung@whengenibk.de Fri Feb 22 07:32:08 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 22 Feb 2002 08:32:08 +0100
Subject: [hfs-user] Embedded volume..
Message-ID: <00ee01c1bb73$0a17ce50$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_00EB_01C1BB7B.6ABFF0E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
what exactly does the term embedded volume mean? I've noticed that =
the HFS MDB has some fields related to this but the HFS+ volume header =
doesn't seem to. I'm not really using these fields but I'd like to know =
what they're used for in any case. So if anyone could enlighten me I'd =
appreciate it.
Regards,
Nandini Hengen
------=_NextPart_000_00EB_01C1BB7B.6ABFF0E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
what exactly does the term =
embedded=20
volume mean? I've noticed that the HFS MDB has some fields related to =
this but=20
the HFS+ volume header doesn't seem to. I'm not really using these =
fields but=20
I'd like to know what they're used for in any case. So if anyone could =
enlighten=20
me I'd appreciate it.
Regards,
Nandini Hengen
------=_NextPart_000_00EB_01C1BB7B.6ABFF0E0--
From sibaz@sibaz.com Fri Feb 22 13:51:47 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Fri, 22 Feb 2002 13:51:47 +0000
Subject: [hfs-user] Embedded volume..
References: <00ee01c1bb73$0a17ce50$0400a7c0@modemserver>
Message-ID: <3C764CF3.9F4D4443@sibaz.com>
I'm not sure exactly what you're referring to, but heres a few pointers.
The volume is the thing that you mount on your computer which provides
files. It represents the single mount point which appears as a disk on
your computer.
The HFS Wrapper is a HFS partition consisting of a massive consecutive
bad block file, which happens to be a HFS+ partition thats embedded in
the HFS volume.
The important difference between HFS+ and HFS is that wheras in HFS
certain files (Device Drivers, Boot System Files, Allocation Bitmap)
exist at various physical disk locations (sector 0, sector, sector 4
etc) and the MDB only gives the location to the Catalog and Extent
files. Also there are 2 different address spaces, physical (in
sectors), and logical (in blocks, starting at 0, after the end of the
volume bitmap, at the location described in the MDB as the start of free
space). HFS+ has very little (if any) system files at fixed locations,
and everything is referred to in the volume descriptor (replaces the
MDB), in the way the Catalog and Extent files was before.
Hope that explains everything, if not give me the names of the variable
in the HFS and HFS+ volume descriptors and I'll explain what they mean.
Simon
Entwicklung wrote:
> Hi, what exactly does the term embedded volume mean? I've noticed
> that the HFS MDB has some fields related to this but the HFS+ volume
> header doesn't seem to. I'm not really using these fields but I'd like
> to know what they're used for in any case. So if anyone could
> enlighten me I'd appreciate it. Regards,Nandini Hengen
From entwicklung@whengenibk.de Fri Feb 22 14:05:35 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 22 Feb 2002 15:05:35 +0100
Subject: [hfs-user] Embedded volume..
References: <00ee01c1bb73$0a17ce50$0400a7c0@modemserver> <3C764CF3.9F4D4443@sibaz.com>
Message-ID: <000801c1bbaa$0116f240$0400a7c0@modemserver>
Hello,
Thanks for replying... was hoping that someone would respond!
I was referring to the fields:
UInt16 drEmbedSigWord ;//embedded volume signature - formerly drVCSize
and HFSExtentDescriptor drEmbedSigWord ;//embedded volume location and
size - formerly drVBMCSize and drCtlCSize
I think what you mentioned about Wrappers is relevant to what I wanted to
know though I don't see the purpose of having a HFS+ partition embedded in a
HFS volume (?). Why would anyone want an embedded partition when all data
could be stored in the original HFS partition? I've just set these fields to
0 right now and I fail to see a situation where I (a third-party HFS-volume
developer) would ever need these.
Any tips?
Regards,
Nandini Hengen
----- Original Message -----
From: "Simon Bazley"
To: "Entwicklung"
Cc:
Sent: Friday, February 22, 2002 2:51 PM
Subject: Re: [hfs-user] Embedded volume..
> I'm not sure exactly what you're referring to, but heres a few pointers.
>
> The volume is the thing that you mount on your computer which provides
> files. It represents the single mount point which appears as a disk on
> your computer.
> The HFS Wrapper is a HFS partition consisting of a massive consecutive
> bad block file, which happens to be a HFS+ partition thats embedded in
> the HFS volume.
> The important difference between HFS+ and HFS is that wheras in HFS
> certain files (Device Drivers, Boot System Files, Allocation Bitmap)
> exist at various physical disk locations (sector 0, sector, sector 4
> etc) and the MDB only gives the location to the Catalog and Extent
> files. Also there are 2 different address spaces, physical (in
> sectors), and logical (in blocks, starting at 0, after the end of the
> volume bitmap, at the location described in the MDB as the start of free
> space). HFS+ has very little (if any) system files at fixed locations,
> and everything is referred to in the volume descriptor (replaces the
> MDB), in the way the Catalog and Extent files was before.
>
> Hope that explains everything, if not give me the names of the variable
> in the HFS and HFS+ volume descriptors and I'll explain what they mean.
>
> Simon
>
> Entwicklung wrote:
>
> > Hi, what exactly does the term embedded volume mean? I've noticed
> > that the HFS MDB has some fields related to this but the HFS+ volume
> > header doesn't seem to. I'm not really using these fields but I'd like
> > to know what they're used for in any case. So if anyone could
> > enlighten me I'd appreciate it. Regards,Nandini Hengen
>
From entwicklung@whengenibk.de Fri Feb 22 14:07:55 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 22 Feb 2002 15:07:55 +0100
Subject: [hfs-user] Embedded volume..
Message-ID: <001f01c1bbaa$535af970$0400a7c0@modemserver>
Oops ...sorry! the second field was meant to be drEmbedExtent... wrote that
in a hurry!
-Nandini
----- Original Message -----
From: "Entwicklung"
To: "Simon Bazley"
Cc:
Sent: Friday, February 22, 2002 3:05 PM
Subject: Re: [hfs-user] Embedded volume..
> Hello,
> Thanks for replying... was hoping that someone would respond!
>
> I was referring to the fields:
> UInt16 drEmbedSigWord ;//embedded volume signature - formerly drVCSize
> and HFSExtentDescriptor drEmbedSigWord ;//embedded volume location and
> size - formerly drVBMCSize and drCtlCSize
>
> I think what you mentioned about Wrappers is relevant to what I wanted to
> know though I don't see the purpose of having a HFS+ partition embedded in
a
> HFS volume (?). Why would anyone want an embedded partition when all data
> could be stored in the original HFS partition? I've just set these fields
to
> 0 right now and I fail to see a situation where I (a third-party
HFS-volume
> developer) would ever need these.
> Any tips?
>
> Regards,
> Nandini Hengen
>
> ----- Original Message -----
> From: "Simon Bazley"
> To: "Entwicklung"
> Cc:
> Sent: Friday, February 22, 2002 2:51 PM
> Subject: Re: [hfs-user] Embedded volume..
>
>
> > I'm not sure exactly what you're referring to, but heres a few pointers.
> >
> > The volume is the thing that you mount on your computer which provides
> > files. It represents the single mount point which appears as a disk on
> > your computer.
> > The HFS Wrapper is a HFS partition consisting of a massive consecutive
> > bad block file, which happens to be a HFS+ partition thats embedded in
> > the HFS volume.
> > The important difference between HFS+ and HFS is that wheras in HFS
> > certain files (Device Drivers, Boot System Files, Allocation Bitmap)
> > exist at various physical disk locations (sector 0, sector, sector 4
> > etc) and the MDB only gives the location to the Catalog and Extent
> > files. Also there are 2 different address spaces, physical (in
> > sectors), and logical (in blocks, starting at 0, after the end of the
> > volume bitmap, at the location described in the MDB as the start of free
> > space). HFS+ has very little (if any) system files at fixed locations,
> > and everything is referred to in the volume descriptor (replaces the
> > MDB), in the way the Catalog and Extent files was before.
> >
> > Hope that explains everything, if not give me the names of the variable
> > in the HFS and HFS+ volume descriptors and I'll explain what they mean.
> >
> > Simon
> >
> > Entwicklung wrote:
> >
> > > Hi, what exactly does the term embedded volume mean? I've noticed
> > > that the HFS MDB has some fields related to this but the HFS+ volume
> > > header doesn't seem to. I'm not really using these fields but I'd like
> > > to know what they're used for in any case. So if anyone could
> > > enlighten me I'd appreciate it. Regards,Nandini Hengen
> >
>
From mday@apple.com Fri Feb 22 16:22:03 2002
From: mday@apple.com (Mark Day)
Date: Fri, 22 Feb 2002 08:22:03 -0800
Subject: [hfs-user] Embedded volume..
In-Reply-To: <000801c1bbaa$0116f240$0400a7c0@modemserver>
Message-ID: <4E473607-27B0-11D6-AD16-00039354009A@apple.com>
On Friday, February 22, 2002, at 06:05 AM, Entwicklung wrote:
> I was referring to the fields:
> UInt16 drEmbedSigWord ;//embedded volume signature - formerly drVCSize
> and HFSExtentDescriptor drEmbedSigWord ;//embedded volume location and
> size - formerly drVBMCSize and drCtlCSize
These fields are used when you have an HFS Plus volume with an HFS
wrapper. These fields describe the size and location of the HFS Plus
volume that is embedded inside the HFS wrapper. The drEmbedSigWord
tells you that there is an embedded HFS Plus volume, and that the extent
descriptor is valid.
> I think what you mentioned about Wrappers is relevant to what I wanted
> to
> know though I don't see the purpose of having a HFS+ partition embedded
> in a
> HFS volume (?).
See
It says:
An HFS Plus volume may be contained within an HFS volume in a way that
makes the volume look like an HFS volume to systems without HFS Plus
support. This has two important advantages:
1. It allows a computer with HFS (but no HFS Plus) support in ROM to
start up from an HFS Plus volume. When creating the wrapper, Mac OS
includes a System file containing the minimum code to locate and mount
the embedded HFS Plus volume and continue booting from its System file.
2. It improves the user experience when an HFS Plus volume is inserted
in a computer that has HFS support but no HFS Plus support. On such a
computer, the HFS wrapper will be mounted as a volume, which prevents
error dialogs that might confuse the user into thinking the volume is
empty, damaged, or unreadable. The HFS wrapper may also contain a Read
Me document to explain the steps the user should take to access their
files.
(That is, it greatly eased the transition from HFS to HFS Plus for
Macintosh users. Note that HFS wrappers aren't required to boot Mac OS
X, so wrappers are becoming less important, and may stop being used at
some point in the future.)
> Why would anyone want an embedded partition when all data
> could be stored in the original HFS partition?
With large volumes, you might not be able to store all the data on a
pure HFS volume because the allocation block size is too large. The
most important reason for HFS Plus was to increase the number of
allocation blocks, so each allocation block could be smaller, and
allowing you to put more files on a volume.
For example, the HFS Plus volume I'm booted from right now has about
170,000 files on it. Since HFS can have at most 64K allocation blocks,
there's no way I could put that many files on an HFS volume -- no matter
how big it is.
Since the Mac OS ROM only knows how to boot from HFS volumes, having an
embedded HFS Plus volume means I can boot from it directly, rather than
having to partition my disk with an HFS boot volume and an HFS Plus
volume for all my data.
> I've just set these fields to
> 0 right now and I fail to see a situation where I (a third-party
> HFS-volume
> developer) would ever need these.
> Any tips?
If you only want to produce pure HFS volumes (with no embedded HFS Plus
volume), setting the fields to zero is correct.
-Mark
From sibaz@sibaz.com Fri Feb 22 17:11:05 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Fri, 22 Feb 2002 17:11:05 +0000
Subject: [hfs-user] Embedded volume..
References: <001f01c1bbaa$535af970$0400a7c0@modemserver>
Message-ID: <3C767BA9.9CF8C1A4@sibaz.com>
Thats Ok, I knew what you meant.
This exact issue is discussed in the HFS+ Tech Note. Anyway,
OK,
Well HFS Wrappers are there so if you put the HFS+ disk into an old Mac,
(that doesn't support HFS+) it'll still see it, and know not to erase it. In
particular if you get a really old Mac, they support HFS in the BIOS, so need to
see a HFS disk before they attempt to boot from it.
The idea is you see the HFS disk, then either begin booting from it (and get
just enough code from the boot sector of the HFS Wrapper to load the real boot
code in the HFS+ disk inside that wrapper), or you simply see the HFS Wrapper
and don't see the HFS+ disk at all. In the latter case, the HFS Wrapper will
have a file called 'where_have_all_my_files_gone' which explains the situation.
Any attempt to erase the disk will fail to erase the Bad block file, and hence
keep the HFS+ volume intact.
The replacement of drVCSize with drEmbedSigWord, and drVBMCSize (and
drCtlSize) with drEmbedExtent, allow any system thats in the know to read the
HFS Wrappers MDB and know instantly where the HFS+ Volume is.
Its worth noting that the HFSWrapper marks the whole disk as read only, so
old Macs will never attempt to change anything (including the drVCSize and other
now replaced fields), and any system tools that check the disk will leave those
fields alone, because they were all marked as reserved anyway.
The whole point is that if you load an MDB data structure into memory, then
start treating it as such, it looks like a HFS Wrapper is supposed to. However
if you treat it as a HFS+ Volume descriptor, you'll know (since drSigWord is
still 0x4244) that is a HFS Wrapper header, not a HFS+ header, then look at
drEmbedSigWord for the HFSWrapper version info, and hence find the real HFS+
Volume descriptor.
Its just a way of pleasing all of the people all of the time regardless of
their point of view. You can create a HFS+ volume without the HFSWrapper if you
like, but old macs will just erase the disk for you if they encounter it. Hence
all new Macs use HFS Wrappers.
Simon
Entwicklung wrote:
> Oops ...sorry! the second field was meant to be drEmbedExtent... wrote that
> in a hurry!
>
> -Nandini
>
> ----- Original Message -----
> From: "Entwicklung"
> To: "Simon Bazley"
> Cc:
> Sent: Friday, February 22, 2002 3:05 PM
> Subject: Re: [hfs-user] Embedded volume..
>
> > Hello,
> > Thanks for replying... was hoping that someone would respond!
> >
> > I was referring to the fields:
> > UInt16 drEmbedSigWord ;//embedded volume signature - formerly drVCSize
> > and HFSExtentDescriptor drEmbedSigWord ;//embedded volume location and
> > size - formerly drVBMCSize and drCtlCSize
> >
> > I think what you mentioned about Wrappers is relevant to what I wanted to
> > know though I don't see the purpose of having a HFS+ partition embedded in
> a
> > HFS volume (?). Why would anyone want an embedded partition when all data
> > could be stored in the original HFS partition? I've just set these fields
> to
> > 0 right now and I fail to see a situation where I (a third-party
> HFS-volume
> > developer) would ever need these.
> > Any tips?
> >
> > Regards,
> > Nandini Hengen
> >
> > ----- Original Message -----
> > From: "Simon Bazley"
> > To: "Entwicklung"
> > Cc:
> > Sent: Friday, February 22, 2002 2:51 PM
> > Subject: Re: [hfs-user] Embedded volume..
> >
> >
> > > I'm not sure exactly what you're referring to, but heres a few pointers.
> > >
> > > The volume is the thing that you mount on your computer which provides
> > > files. It represents the single mount point which appears as a disk on
> > > your computer.
> > > The HFS Wrapper is a HFS partition consisting of a massive consecutive
> > > bad block file, which happens to be a HFS+ partition thats embedded in
> > > the HFS volume.
> > > The important difference between HFS+ and HFS is that wheras in HFS
> > > certain files (Device Drivers, Boot System Files, Allocation Bitmap)
> > > exist at various physical disk locations (sector 0, sector, sector 4
> > > etc) and the MDB only gives the location to the Catalog and Extent
> > > files. Also there are 2 different address spaces, physical (in
> > > sectors), and logical (in blocks, starting at 0, after the end of the
> > > volume bitmap, at the location described in the MDB as the start of free
> > > space). HFS+ has very little (if any) system files at fixed locations,
> > > and everything is referred to in the volume descriptor (replaces the
> > > MDB), in the way the Catalog and Extent files was before.
> > >
> > > Hope that explains everything, if not give me the names of the variable
> > > in the HFS and HFS+ volume descriptors and I'll explain what they mean.
> > >
> > > Simon
> > >
> > > Entwicklung wrote:
> > >
> > > > Hi, what exactly does the term embedded volume mean? I've noticed
> > > > that the HFS MDB has some fields related to this but the HFS+ volume
> > > > header doesn't seem to. I'm not really using these fields but I'd like
> > > > to know what they're used for in any case. So if anyone could
> > > > enlighten me I'd appreciate it. Regards,Nandini Hengen
> > >
> >
From entwicklung@whengenibk.de Fri Feb 22 17:29:26 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 22 Feb 2002 18:29:26 +0100
Subject: [hfs-user] Embedded volume..
References: <4E473607-27B0-11D6-AD16-00039354009A@apple.com>
Message-ID: <001801c1bbc6$7ac6eb60$0400a7c0@modemserver>
I noticed that the technical notes also mentioned -
'An HFS Plus volume is not required to have an HFS wrapper. In that case,
the volume will start at the first sector of the disk, and the volume header
will be at sector 2. However, Apple software currently initializes all HFS
Plus volumes with an HFS wrapper.'
Mark Day wrote :
'Since the Mac OS ROM only knows how to boot from HFS volumes, having an
embedded HFS Plus volume means I can boot from it directly, rather than
having to partition my disk with an HFS boot volume and an HFS Plus
volume for all my data.'
Simon Bazley wrote:
'You can create a HFS+ volume without the HFSWrapper if you
like, but old macs will just erase the disk for you if they encounter it.
Hence
all new Macs use HFS Wrappers.'
Going by the above statements could I conclude that if I want to create a
non-bootable volume (a HFS/HFS+ CD-ROM to be specific) I don't need to
consider using an embedded volume at all?
I have a couple of questions to what Simon wrote - If my external HFS+
volume happens to be on a CD-ROM which is in any case a one-time writable
medium, how could older macs 'erase' the disk? I guess that probably happens
to CD-RW's which can be formatted or erased..... or did you mean something
else ?
And if I do have a wrapper on a HFS+ volume and insert it into an older Mac,
it would anyway not be readable though it doesn't get erased, right ?
Regards,
Nandini Hengen
From mday@apple.com Fri Feb 22 18:16:23 2002
From: mday@apple.com (Mark Day)
Date: Fri, 22 Feb 2002 10:16:23 -0800
Subject: [hfs-user] Embedded volume..
In-Reply-To: <001801c1bbc6$7ac6eb60$0400a7c0@modemserver>
Message-ID: <4774F086-27C0-11D6-BC1D-00039354009A@apple.com>
On Friday, February 22, 2002, at 09:29 AM, Entwicklung wrote:
> Going by the above statements could I conclude that if I want to
> create a
> non-bootable volume (a HFS/HFS+ CD-ROM to be specific) I don't need to
> consider using an embedded volume at all?
That's reasonable.
> And if I do have a wrapper on a HFS+ volume and insert it into an older
> Mac,
> it would anyway not be readable though it doesn't get erased, right ?
You wouldn't be able to access the files in the embedded volume. The
volume would at least show up on the desktop (instead of producing an
error dialog). And if the wrapper has a "read me" file, the user at
least has a clue about why they can't access the files.
-Mark
From pwd@apple.com Fri Feb 22 18:20:25 2002
From: pwd@apple.com (Patrick Dirks)
Date: Fri, 22 Feb 2002 10:20:25 -0800
Subject: [hfs-user] Embedded volume..
In-Reply-To: <00ee01c1bb73$0a17ce50$0400a7c0@modemserver>
Message-ID:
--Apple-Mail-1--412396953
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Hi,
An "embedded volume" refers to an HFS+ volume that's tucked away inside=20=
an HFS volume (the so-called "wrapper volume"). The usual reason is=20
that older systems may know how to mount HFS disks but not HFS+ disks=20
and the wrapper volume usually just has a note explaining the volume=20
can't be mounted but their files aren't lost.
Systems that DO know how to mount HFS+ volumes also know how to=20
recognize embedded volumes and mount the embedded HFS+ volume instead of=20=
the wrapper volume. I believe by default volumes initialized on a Mac=20=
in "Mac OS Extended Format" (HFS+) are created as wrapped volumes with=20=
an embedded HFS+ volume, although that may have changed in a recent=20
build.
Hope that helps,
-Pat Dirks.
On Thursday, February 21, 2002, at 11:32 PM, Entwicklung wrote:
> Hi,
> =A0=A0 what exactly does the term embedded volume mean? I've noticed =
that=20
> the HFS MDB has some fields related to this but the HFS+ volume header=20=
> doesn't seem to. I'm not really using these fields but I'd like to =
know=20
> what they're used for in any case. So if anyone could enlighten me I'd=20=
> appreciate it.
> =A0
> Regards,
> Nandini Hengen
> =A0
> =A0
--Apple-Mail-1--412396953
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Hi,
An "embedded volume" refers to an HFS+ volume that's tucked away
inside an HFS volume (the so-called "wrapper volume"). The usual
reason is that older systems may know how to mount HFS disks but not
HFS+ disks and the wrapper volume usually just has a note explaining
the volume can't be mounted but their files aren't lost.
Systems that DO know how to mount HFS+ volumes also know how to
recognize embedded volumes and mount the embedded HFS+ volume instead
of the wrapper volume. I believe by default volumes initialized on a
Mac in "Mac OS Extended Format" (HFS+) are created as wrapped volumes
with an embedded HFS+ volume, although that may have changed in a
recent build.
Hope that helps,
-Pat Dirks.
On Thursday, February 21, 2002, at 11:32 PM, Entwicklung wrote:
=
ArialHi,
Arial=A0=A0 what exactly does the =
term
embedded volume mean? I've noticed that the HFS MDB has some fields
related to this but the HFS+ volume header doesn't seem to. I'm not
really using these fields but I'd like to know what they're used for
in any case. So if anyone could enlighten me I'd appreciate =
it.
=A0
ArialRegards,
ArialNandini =
Hengen
=A0
=A0
=
--Apple-Mail-1--412396953--
From entwicklung@whengenibk.de Fri Feb 22 19:02:55 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 22 Feb 2002 20:02:55 +0100
Subject: [hfs-user] Desktop Database
Message-ID: <001b01c1bbd3$8a16ad00$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0018_01C1BBDB.EAC670B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Could someone tell me where exactly to find some documentation on the =
desktop DB for an external HFS volume?=20
I came across some interesting info on Thomas Tempelmann's developer's =
site and it said that one would have to request Apple for further =
technical info (?!) but the website didn't really furnish the kind of =
details I need.
I basically need info. as to how and where exactly (in the image) this =
file has to be present and what its exact contents (structure) =
are...links to any sample code, open sources or headers related to this =
would be greatly appreciated. =20
The technical notes for HFS+ and the related documentation for HFS =
volumes (part of Inside Macintosh) don't seem to contain elaborate info =
on this either.
Regards,
Nandini Hengen
PS. Thanks to everybody who replied to my previous mail on 'embedded =
volumes'.... I've come to the conclusion I'll need one after all.....at =
least at a later stage (once I start dealing with HFS+) to ensure that =
my CD-RW HFS+ volumes don't get erased on earlier Macs...
------=_NextPart_000_0018_01C1BBDB.EAC670B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Could someone tell me =
where exactly to=20
find some documentation on the desktop DB for an external HFS volume?=20
I came across some interesting info on =
Thomas=20
Tempelmann's developer's site and it said that one would have to request =
Apple=20
for further technical info (?!) but the website didn't really furnish =
the kind=20
of details I need.
I basically need info. as to =
how and where=20
exactly (in the image) this file has to be present =
and what its=20
exact contents (structure) are...links to any sample code, open sources =
or=20
headers related to this would be greatly appreciated. =
The technical notes for HFS+ and the related documentation for HFS =
volumes=20
(part of Inside Macintosh) don't seem to contain elaborate info on this=20
either.
Regards,
Nandini Hengen
PS. Thanks to everybody who replied to my previous mail on =
'embedded=20
volumes'.... I've come to the conclusion I'll need one after =
all.....at=20
least at a later stage (once I start dealing with HFS+) to ensure that =
my CD-RW=20
HFS+ volumes don't get erased on earlier=20
Macs...
------=_NextPart_000_0018_01C1BBDB.EAC670B0--
From sibaz@sibaz.com Fri Feb 22 20:03:23 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Fri, 22 Feb 2002 20:03:23 +0000
Subject: [hfs-user] HFS under DOS
Message-ID: <3C76A40A.CF4F9A1C@sibaz.com>
There is a standard layout that a mac uses on a DOS floppy, so that it
can support all the AppleDouble files and all the rest. Can someone
tell me where its documented.
I want to know how HFS+ should look when its mounted on a system that
doesn't support forks.
Simon
From jcpearso@ps.ucl.ac.uk Fri Feb 22 22:50:44 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Fri, 22 Feb 2002 22:50:44 +0000
Subject: [hfs-user] Desktop Database
In-Reply-To: Your message of Fri, 22 Feb 2002 20:02:55 +0100.
<001b01c1bbd3$8a16ad00$0400a7c0@modemserver>
Message-ID: <3430028.1014418244@ourhome.freeserve.co.uk>
> Could someone tell me where exactly to find some documentation on the
>desktop DB for an external HFS volume?
>I came across some interesting info on Thomas Tempelmann's developer's
>site and it said that one would have to request Apple for further
>technical info (?!) but the website didn't really furnish the kind of
>details I need.
>I basically need info. as to how and where exactly (in the image) this
>file has to be present and what its exact contents (structure)
>are...links to any sample code, open sources or headers related to this
>would be greatly appreciated.
When I asked this question to someone at Apple (sometime ago) I was told:
The files are considered undocumented proprietary information
to Apple, and change format slightly from release to release and depending
upon extensions added to the system. Apple won't disclose this information.
James Pearson
From gbeatty@cpc.gc.ca Fri Feb 22 23:09:09 2002
From: gbeatty@cpc.gc.ca (Gordon Beatty)
Date: Fri, 22 Feb 2002 18:09:09 -0500
Subject: [hfs-user] Desktop Database
In-Reply-To: <001b01c1bbd3$8a16ad00$0400a7c0@modemserver>
Message-ID: <001c01c1bbf5$eff53250$340aa8c0@cpc.gc.ca>
This is a multi-part message in MIME format.
------=_NextPart_000_001D_01C1BBCC.071F2A50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I would also be interested in information on where or how one could
obtain information concerning the structure of the Desktop files (Desktop,
Desktop DB, Desktop DF).
Thanks,
Gord Beatty
-----Original Message-----
From: hfs-user-admin@lists.mars.org
[mailto:hfs-user-admin@lists.mars.org]On Behalf Of Entwicklung
Sent: Friday, February 22, 2002 2:03 PM
To: hfs-user@lists.mars.org
Subject: [hfs-user] Desktop Database
Hi,
Could someone tell me where exactly to find some documentation on the
desktop DB for an external HFS volume?
I came across some interesting info on Thomas Tempelmann's developer's
site and it said that one would have to request Apple for further technical
info (?!) but the website didn't really furnish the kind of details I need.
I basically need info. as to how and where exactly (in the image) this
file has to be present and what its exact contents (structure) are...links
to any sample code, open sources or headers related to this would be greatly
appreciated.
The technical notes for HFS+ and the related documentation for HFS volumes
(part of Inside Macintosh) don't seem to contain elaborate info on this
either.
Regards,
Nandini Hengen
PS. Thanks to everybody who replied to my previous mail on 'embedded
volumes'.... I've come to the conclusion I'll need one after all.....at
least at a later stage (once I start dealing with HFS+) to ensure that my
CD-RW HFS+ volumes don't get erased on earlier Macs...
------=_NextPart_000_001D_01C1BBCC.071F2A50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I would also be interested =
in=20
information on where or how one could obtain information concerning the=20
structure of the Desktop files (Desktop, Desktop DB, Desktop=20
DF).
=
Thanks,
Gord =
Beatty
Hi,
Could someone tell me =
where exactly=20
to find some documentation on the desktop DB for an external HFS =
volume?=20
I came across some interesting info =
on Thomas=20
Tempelmann's developer's site and it said that one would have to =
request Apple=20
for further technical info (?!) but the website didn't really furnish =
the kind=20
of details I need.
I basically need info. as to =
how and where=20
exactly (in the image) this file has to be present =
and what its=20
exact contents (structure) are...links to any sample code, open =
sources or=20
headers related to this would be greatly appreciated. =20
The technical notes for HFS+ and the related documentation for =
HFS=20
volumes (part of Inside Macintosh) don't seem to contain elaborate =
info on=20
this either.
Regards,
Nandini Hengen
PS. Thanks to everybody who replied to my previous mail on =
'embedded=20
volumes'.... I've come to the conclusion I'll need one after =
all.....at=20
least at a later stage (once I start dealing with HFS+) to ensure that =
my=20
CD-RW HFS+ volumes don't get erased on earlier=20
Macs...
------=_NextPart_000_001D_01C1BBCC.071F2A50--
From jcpearso@ps.ucl.ac.uk Fri Feb 22 23:12:34 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Fri, 22 Feb 2002 23:12:34 +0000
Subject: [hfs-user] HFS under DOS
In-Reply-To: Your message of Fri, 22 Feb 2002 20:03:23 +0000.
<3C76A40A.CF4F9A1C@sibaz.com>
Message-ID: <3495301.1014419554@ourhome.freeserve.co.uk>
>There is a standard layout that a mac uses on a DOS floppy, so that it
>can support all the AppleDouble files and all the rest. Can someone
>tell me where its documented.
If you're talking about "PC Exchange", then I'm not sure if the layout was ever
published. What I found out about it is in the mkisofs/mkhybrid source code.
>I want to know how HFS+ should look when its mounted on a system that
>doesn't support forks.
I don't know if there is a 'standard' way ... the HFS support under Linux
can make the resource fork and finder info appear if the files are in CAP,
AppleDouble or Netatalk format.
HFS support under IRIX makes the files appear if they are in 'XINET' format.
James Pearson
From gbeatty@cpc.gc.ca Fri Feb 22 23:17:37 2002
From: gbeatty@cpc.gc.ca (Gordon Beatty)
Date: Fri, 22 Feb 2002 18:17:37 -0500
Subject: [hfs-user] Desktop Database
In-Reply-To: <3430028.1014418244@ourhome.freeserve.co.uk>
Message-ID: <002401c1bbf7$1ebb4470$340aa8c0@cpc.gc.ca>
Now, if only Darwin knew how to interpret it...
Gord Beatty
-----Original Message-----
From: hfs-user-admin@lists.mars.org
[mailto:hfs-user-admin@lists.mars.org]On Behalf Of James Pearson
Sent: Friday, February 22, 2002 5:51 PM
To: Entwicklung
Cc: hfs-user
Subject: Re: [hfs-user] Desktop Database
> Could someone tell me where exactly to find some documentation on the
>desktop DB for an external HFS volume?
>I came across some interesting info on Thomas Tempelmann's developer's
>site and it said that one would have to request Apple for further
>technical info (?!) but the website didn't really furnish the kind of
>details I need.
>I basically need info. as to how and where exactly (in the image) this
>file has to be present and what its exact contents (structure)
>are...links to any sample code, open sources or headers related to this
>would be greatly appreciated.
When I asked this question to someone at Apple (sometime ago) I was told:
The files are considered undocumented proprietary information
to Apple, and change format slightly from release to release and depending
upon extensions added to the system. Apple won't disclose this information.
James Pearson
From sibaz@sibaz.com Sat Feb 23 00:54:37 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Sat, 23 Feb 2002 00:54:37 +0000
Subject: [hfs-user] Embedded volume..
References: <4E473607-27B0-11D6-AD16-00039354009A@apple.com> <001801c1bbc6$7ac6eb60$0400a7c0@modemserver>
Message-ID: <3C76E84C.C4BA4051@sibaz.com>
I'm exadurating when I say it will erase the disk.
The mac won't recognise the disk as formated so at best will run a disk fixer on
it, or at worst will reformat it. I'm guessing it would ask you if its ok
before doing this.
If you put a normal one time CD in then as you say, the mac couldn't erase it
and would just complain that it can't understand it.
If you put in a CDRW then I don't know what it would do. I expect it would ask
you if its a new CD before going ahead and erasing it.
Id be supprised if a system with no HFS+ support knew anything about CDRW's
anyway.
Using a HFS Wrapper is nice and neat and takes up all of about 4k from your
disk, without any files on it (A default mac created HFS floppy disk image has
24k of data on it, when 2 files are present). Its very little effort on your
part to make a HFS Wrapper for your CD, and it'd keep everyone happy. If it was
me, I'd make the wrapper, unless you need every last k of the CD.
Simon
Entwicklung wrote:
> I noticed that the technical notes also mentioned -
> 'An HFS Plus volume is not required to have an HFS wrapper. In that case,
> the volume will start at the first sector of the disk, and the volume header
> will be at sector 2. However, Apple software currently initializes all HFS
> Plus volumes with an HFS wrapper.'
>
> Mark Day wrote :
> 'Since the Mac OS ROM only knows how to boot from HFS volumes, having an
> embedded HFS Plus volume means I can boot from it directly, rather than
> having to partition my disk with an HFS boot volume and an HFS Plus
> volume for all my data.'
>
> Simon Bazley wrote:
> 'You can create a HFS+ volume without the HFSWrapper if you
> like, but old macs will just erase the disk for you if they encounter it.
> Hence
> all new Macs use HFS Wrappers.'
>
> Going by the above statements could I conclude that if I want to create a
> non-bootable volume (a HFS/HFS+ CD-ROM to be specific) I don't need to
> consider using an embedded volume at all?
>
> I have a couple of questions to what Simon wrote - If my external HFS+
> volume happens to be on a CD-ROM which is in any case a one-time writable
> medium, how could older macs 'erase' the disk? I guess that probably happens
> to CD-RW's which can be formatted or erased..... or did you mean something
> else ?
>
> And if I do have a wrapper on a HFS+ volume and insert it into an older Mac,
> it would anyway not be readable though it doesn't get erased, right ?
>
> Regards,
> Nandini Hengen
From sibaz@sibaz.com Sat Feb 23 00:59:36 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Sat, 23 Feb 2002 00:59:36 +0000
Subject: [hfs-user] Desktop Database
References: <3430028.1014418244@ourhome.freeserve.co.uk>
Message-ID: <3C76E978.E65EC489@sibaz.com>
Oh well, I'll make something up then I s'pose.
The only thing I really care about is being able to access the BTrees directly,
but I was hoping the Database DB was something to do with that.
.AppleDouble (according to the HFS code in the kernel) does somethign with
finder information and stuff, so I'll use that as a basis for things.
Netatalk does something, perhaps Adrian Sun knows something about AppleDouble
files.
I'm a part of the Netatalk team and as far as I know AppleDouble is just
something we've always done.
ho hum,
Simon
James Pearson wrote:
> > Could someone tell me where exactly to find some documentation on the
> >desktop DB for an external HFS volume?
> >I came across some interesting info on Thomas Tempelmann's developer's
> >site and it said that one would have to request Apple for further
> >technical info (?!) but the website didn't really furnish the kind of
> >details I need.
> >I basically need info. as to how and where exactly (in the image) this
> >file has to be present and what its exact contents (structure)
> >are...links to any sample code, open sources or headers related to this
> >would be greatly appreciated.
>
> When I asked this question to someone at Apple (sometime ago) I was told:
>
> The files are considered undocumented proprietary information
> to Apple, and change format slightly from release to release and depending
> upon extensions added to the system. Apple won't disclose this information.
>
> James Pearson
From jcpearso@ps.ucl.ac.uk Sun Feb 24 10:28:59 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Sun, 24 Feb 2002 10:28:59 +0000
Subject: [hfs-user] Curious about the current interest in HFS ...
Message-ID: <3533880.1014546539@ourhome.freeserve.co.uk>
Having had virtually no traffic on this list for ages, over the past few
weeks or so, there seems to have been a rush of interest in HFS/HFS+ ...
I'm just curious to as why ...
I must admit that I haven't really kept up to date with more 'recent'
Apple developments (HFS+, MacOS X, etc), but I had assumed that as MacOS X
doesn't actually need the 'extras' HFS+ supplies, then HFS+ would eventually
disappear.
May be my assumption is a bit naive, but especially for writing CDs for
Macs on non-Mac platforms, creating a Rock Ridge/Joliet CD is much easier
than an HFS or HFS hybrid CD ...
James Pearson
P.S. does anyone else that posts to this list get a reply from
"" ...
From entwicklung@whengenibk.de Sun Feb 24 12:01:01 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 24 Feb 2002 13:01:01 +0100
Subject: [hfs-user] Curious about the current interest in HFS ...
References: <3533880.1014546539@ourhome.freeserve.co.uk>
Message-ID: <001a01c1bd2a$ef2a7de0$0400a7c0@modemserver>
I'm a student working part-time on a filesystems project and was just given
an outline of the project requirements to start off. I enrolled myself as
part of the student-dev and darwin-development mailing lists but the topics
discussed there are not really relevant to my requirements... besides I end
up getting more than a 100 mails from these which I can't really use
purposefully.
I'm glad that people have slowly started responding on this list and that a
healthy discussion of issues seems to have begun.... as compared to the
other apple mailing-lists I had begun to assume that this list was pretty
much in hibernation :)
> May be my assumption is a bit naive, but especially for writing CDs for
> Macs on non-Mac platforms, creating a Rock Ridge/Joliet CD is much easier
> than an HFS or HFS hybrid CD ...
I'm not too sure but do older Macs support Roc Ridge/Joliet too? I'm sure
there aren't too many people using older Macs but maybe this has to to do
with making things easier for them (?)
> P.S. does anyone else that posts to this list get a reply from
> "" ...
Aargh!...don't tell me they're mailing you too!....I don't intend to contact
Microsoft (by no means!) but their mails always begin with a 'Thank you for
contacting Microsoft...." ...maybe they don't know they're part of this list
? Besides if they're offering constructive suggestions we should be hearing
from 'support' not 'abuse' I think. I wrote to them about this once and it
doesn't seem to have made any difference.
Regards,
Nandini
From entwicklung@whengenibk.de Sun Feb 24 12:46:48 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 24 Feb 2002 13:46:48 +0100
Subject: Fw: [hfs-user] Curious about the current interest in HFS ...
Message-ID: <000801c1bd31$53ca0440$0400a7c0@modemserver>
----- Original Message -----
From: "Abuse at Microsoft"
To: "Entwicklung"
Sent: Sunday, February 24, 2002 1:51 PM
Subject: Re: [hfs-user] Curious about the current interest in HFS ...
Hello,
Thank you for contacting Microsoft.
We appreciate the information you have provided thus far. Though you may
have provided some of this information already, we will need more
information to create a case. Please assist us in further processing
your support request by providing the following information in an e-mail
message to Msupport@microsoft.com:
* Product name, version and Product Identification Number (PID)
* Operating system and version (For example: Windows XP)
* Browser type and version
* Memory (RAM)
* CPU type and speed
* Complete error messages
* Specifics of the problem
* All Contact Information (Name, e-mail address, and telephone number)
For help locating the Product Identification Number (PID), go to:
http://support.microsoft.com/support/webresponse/pid/pidfind.asp
If you have any additional questions, please let us know by replying to
this message.
Thank you,
Justin
Microsoft Online Customer Representative
------------------------
From: entwicklung@whengenibk.de
Received: 2/24/02 4:14 AM
To: Abuse at Microsoft
Subject: Re: [hfs-user] Curious about the current interest in HFS ...
Original Message Follows:
-------------------------
I'm a student working part-time on a filesystems project and was just
given
an outline of the project requirements to start off. I enrolled myself
as
part of the student-dev and darwin-development mailing lists but the
topics
discussed there are not really relevant to my requirements... besides I
end
up getting more than a 100 mails from these which I can't really use
purposefully.
I'm glad that people have slowly started responding on this list and
that a
healthy discussion of issues seems to have begun.... as compared to the
other apple mailing-lists I had begun to assume that this list was
pretty
much in hibernation :)
> May be my assumption is a bit naive, but especially for writing CDs
for
> Macs on non-Mac platforms, creating a Rock Ridge/Joliet CD is much
easier
> than an HFS or HFS hybrid CD ...
I'm not too sure but do older Macs support Roc Ridge/Joliet too? I'm
sure
there aren't too many people using older Macs but maybe this has to to
do
with making things easier for them (?)
> P.S. does anyone else that posts to this list get a reply from
> "" ...
Aargh!...don't tell me they're mailing you too!....I don't intend to
contact
Microsoft (by no means!) but their mails always begin with a 'Thank you
for
contacting Microsoft...." ...maybe they don't know they're part of this
list
? Besides if they're offering constructive suggestions we should be
hearing
from 'support' not 'abuse' I think. I wrote to them about this once and
it
doesn't seem to have made any difference.
Regards,
Nandini
From rob@mars.org Mon Feb 25 02:00:01 2002
From: rob@mars.org (Rob Leslie)
Date: Sun, 24 Feb 2002 18:00:01 -0800
Subject: [hfs-user] Microsoft abuse responses
Message-ID: <60FD6085-2993-11D6-BBC3-000393817488@mars.org>
Regarding the responses from :
It seems one of our subscribers was automatically forwarding messages
from this list. I've taken suggested measures to prevent this from
continuing. Hopefully the problem will end here, but there may still be
a few messages in the queue.
If anyone still receives responses from as a
result of posting to this list, please either ignore them or forward
them to me directly.
Thanks for everyone's understanding.
--
Rob Leslie
rob@mars.org
From sibaz@sibaz.com Mon Feb 25 02:41:02 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Mon, 25 Feb 2002 02:41:02 +0000
Subject: [hfs-user] Curious about the current interest in HFS ...
References: <3533880.1014546539@ourhome.freeserve.co.uk>
Message-ID: <3C79A43E.B98861FB@sibaz.com>
Yep, I seem to get replies from Microsoft, but I had one reply that seemed useful. I guess someone has cleverly subscribed them to the list.
My interest in HFS (and infact Macs) has come about after having to support an office full of them, and wherase over the last 5 years, I've become to love Linux, and find it quite capable of supporting networks of Windows PC's, there doesn't seem the same
level of support of Macs.
Since Apple has made the step towards POSIX, I think that should change. I can happily take a Windows PC's HardDisk, stick it in my Linux box and fix pretty much anything with tools I can find, wheras for Macs, I can't even read anything after OS 8.
Also I work on Netatalk, so I looked into some of the well documented Mac specs, and believe core to implementing a nice fluffy AFP server, you need a CatalogFile. Hence the HFS connection.
Simon
From mattgr@yahoo.com Mon Feb 25 02:38:53 2002
From: mattgr@yahoo.com (Matt Gradwohl)
Date: Sun, 24 Feb 2002 18:38:53 -0800
Subject: [hfs-user] Curious about the current interest in HFS ...
References: <3533880.1014546539@ourhome.freeserve.co.uk> <3C79A43E.B98861FB@sibaz.com>
Message-ID: <000601c1bda5$90a41350$6501a8c0@FUTZCO>
I'm the Microsoft guy.
I joined this list before I started at MSFT, while I was in college. I was
working on some Linux stuff and I was going to try to write a Windows app to
read Mac disks. Then work took over, and I never got it done, but I'm still
interested.
I work on Xbox, so the stuff I see here won't really help me, but it's still
interesting.
----- Original Message -----
From: "Simon Bazley"
To: "James Pearson"
Cc:
Sent: Sunday, February 24, 2002 6:41 PM
Subject: Re: [hfs-user] Curious about the current interest in HFS ...
> Yep, I seem to get replies from Microsoft, but I had one reply that seemed
useful. I guess someone has cleverly subscribed them to the list.
> My interest in HFS (and infact Macs) has come about after having to
support an office full of them, and wherase over the last 5 years, I've
become to love Linux, and find it quite capable of supporting networks of
Windows PC's, there doesn't seem the same
> level of support of Macs.
> Since Apple has made the step towards POSIX, I think that should change.
I can happily take a Windows PC's HardDisk, stick it in my Linux box and fix
pretty much anything with tools I can find, wheras for Macs, I can't even
read anything after OS 8.
> Also I work on Netatalk, so I looked into some of the well documented Mac
specs, and believe core to implementing a nice fluffy AFP server, you need a
CatalogFile. Hence the HFS connection.
> Simon
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
From biswaroopban@yahoo.co.in Mon Feb 25 08:41:08 2002
From: biswaroopban@yahoo.co.in (Biswaroop Banerjee)
Date: Mon, 25 Feb 2002 14:11:08 +0530
Subject: [hfs-user] Request for Comments on HFS or HFS+ on a Hybrid CD/DVD
Message-ID: <004201c1bdd8$35a55da0$1c0a0a0a@bisban>
This is a multi-part message in MIME format.
------=_NextPart_000_003D_01C1BE06.45388DE0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi Everybody,
Going through the few last topics discussed I want to=20
know whether an implementation of a HFS filesystem
would be the right choice on a CD.
=20
According to my understanding a CD can contain 650 Mb
of data so we wont have problems in making that volume
HFS like rather than HFS+.=20
But if the same is used for a Single sided DVD which gives
4.7 GB of space ; whether HFS would be the choice or=20
i should go for HFS+.
Another question is do any of u know about any premastering =
application which supports " HYBRID DVD".
Waiting for ur comments.
Biswaroop Banerjee
p.s. Yeah i have also received mails from "ABUSE" i also
replied to them for changing atleast their "abusive" =
name
------=_NextPart_000_003D_01C1BE06.45388DE0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi Everybody,
Going through the few last =
topics discussed=20
I want to
know whether an implementation of =
a HFS=20
filesystem
would be the right choice on a=20
CD.
According to my understanding a =
CD can=20
contain 650 Mb
of data so we wont have problems =
in making=20
that volume
HFS like rather than HFS+. =
But if the same is used for a =
Single sided=20
DVD which gives
4.7 GB of space ; whether HFS =
would be the=20
choice or
i should go for =
HFS+.
Another question is do any of u =
know about=20
any premastering application which supports " HYBRID =
DVD".
Waiting for ur comments.
Biswaroop Banerjee
p.s. Yeah i have also received mails =
from "ABUSE" i=20
also
=
replied to=20
them for changing atleast their "abusive" =20
name
------=_NextPart_000_003D_01C1BE06.45388DE0--
From biswaroopban@yahoo.co.in Tue Feb 26 10:48:46 2002
From: biswaroopban@yahoo.co.in (Biswaroop Banerjee)
Date: Tue, 26 Feb 2002 16:18:46 +0530
Subject: [hfs-user] Partition and Boot block Structures in a HFS CD image
Message-ID: <005001c1beb3$2c649fe0$1c0a0a0a@bisban>
This is a multi-part message in MIME format.
------=_NextPart_000_004B_01C1BEE1.440CE7A0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi all,
Can anybody give me a judgement??
If i am creating a file which contains a HFS filesystem image which =
will be then written to a CD.
THis image is not a Bootable Cd so should the file
contain partition and boot block structures.
Should i just write "zeros" in the first two sectors of the=20
image (i.e. 512 *2 =3D 1024 bytes) in the file, and then
write down the MDB structure in the image file after
1024 bytes??
Waiting for replies..
regards
Biswaroop Banerjee
=20
------=_NextPart_000_004B_01C1BEE1.440CE7A0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi all,
Can anybody give me a=20
judgement??
If i am creating a file which =
contains a HFS=20
filesystem image which will be then written to a CD.
THis image is not a Bootable Cd =
so should=20
the file
contain partition and boot block=20
structures.
Should i just write "zeros" in =
the first two=20
sectors of the
image (i.e. 512 *2 =3D 1024 =
bytes) in the file,=20
and then
write down the MDB structure in =
the image=20
file after
1024 bytes??
Waiting for =
replies..
regards
Biswaroop Banerjee
------=_NextPart_000_004B_01C1BEE1.440CE7A0--
From sibaz@sibaz.com Tue Feb 26 14:51:32 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Tue, 26 Feb 2002 14:51:32 +0000
Subject: [hfs-user] Partition and Boot block Structures in a HFS CD image
References: <005001c1beb3$2c649fe0$1c0a0a0a@bisban>
Message-ID: <3C7BA0F4.D8EC9393@sibaz.com>
I'm not sure about the partition stuff, Floppy disks don't need
partition info, so I'd guess you don't need it on a CD either, but I may
be wrong.
Both HFS and HFS+ state that the MDB (or VDB) must reside at sector 3
(sector 2 if you start with 0) and that sectors are 512 bytes.
The bit before that should contain the device driver, for the hard disk,
which I'm assuming will be ignored if its all zero's (and hence not
bootable).
My understanding is that a device may have a driver and not be bootable
(as the system files are stored elsewhere in HFS+), in which case you're
just loading a driver to read the disk. I guess that in HFS+ you could
have no device driver, but still have a system file, and hence be
bootable on modern macs.
Its a pretty sure bet though that 0's indicate no driver and no bootable
disk on HFS. Floppy disks have zeros for the first 2 sectors. Checkout
flexiblebtree from sourceforge and look at the diskimage.img file, it is
an example of a floppy disk as produced by a mac. Use the BinList
application to list the first 3 sectors and you'll see 2 sectors of
zeros and 1 with a MDB in it.
Simon
Biswaroop Banerjee wrote:
> Hi all, Can anybody give me a judgement?? If i am creating a file
> which contains a HFS filesystem image which will be then written to a
> CD. THis image is not a Bootable Cd so should the file contain
> partition and boot block structures. Should i just write "zeros" in
> the first two sectors of the image (i.e. 512 *2 = 1024 bytes) in the
> file, and then write down the MDB structure in the image file
> after 1024 bytes?? Waiting for replies.. regards Biswaroop
> Banerjee
From mday@apple.com Tue Feb 26 18:12:47 2002
From: mday@apple.com (Mark Day)
Date: Tue, 26 Feb 2002 10:12:47 -0800
Subject: [hfs-user] Partition and Boot block Structures in a HFS CD image
In-Reply-To: <3C7BA0F4.D8EC9393@sibaz.com>
Message-ID: <6FE2CE04-2AE4-11D6-B02D-00039354009A@apple.com>
On Tuesday, February 26, 2002, at 06:51 AM, Simon Bazley wrote:
> I'm not sure about the partition stuff, Floppy disks don't need
> partition info, so I'd guess you don't need it on a CD either, but I may
> be wrong.
I don't think you need the partition map as long as the volume isn't
bootable, but I'm not absolutely certain. I don't happen to have any
partitonless CDs lying around since all the ones I have are bootable.
> Both HFS and HFS+ state that the MDB (or VDB) must reside at sector 3
> (sector 2 if you start with 0) and that sectors are 512 bytes.
> The bit before that should contain the device driver, for the hard disk,
> which I'm assuming will be ignored if its all zero's (and hence not
> bootable).
Actually, that first 1024 bytes isn't a device driver. When it is
non-zero, it contains code and data that the Mac OS ROM would use to
boot from that volume. Filling it with zeroes ensures that the Mac OS
ROM won't try to boot from it.
Device drivers, if any, would actually go in separate partitions whose
type tells the system that the partition contains a driver.
-Mark
From Biswaroop Banerjee"
This is a multi-part message in MIME format.
------=_NextPart_000_0024_01C1C12B.E4EEE320
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi,
Can anybody tell me which char set is understood in
HFS volumes. For e.g. in DOS only A-Z, 0-9 and _ are
the valid characters.=20
So, what is for HFS.
Can anybody give me a list for HFS or a pointer to find
out ??
Again, for writing into a HFS volume for creating a CD image can we go =
for UNICODE .=20
For eg. the volume name length for HFS volumes is
27 characters in length. How do we store a UNICODE=20
volume name in that space???
The HFS volumes contain data in "Big Endian " format.
Can anybody tell me what are the fields which has to be
filled in Big Endian format.
For eg. in ISO9660 , in Primary Volume Desriptor some
fields are written in both Little and Big Endian format.
Waiting for u help and suggestions.
regards
Biswaroop Banerjee
------=_NextPart_000_0024_01C1C12B.E4EEE320
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi,
Can anybody tell me which char =
set is=20
understood in
HFS volumes. For e.g. in DOS =
only A-Z, 0-9=20
and _ are
the valid characters. =
So, what is for =
HFS.
Can anybody give me a list for =
HFS or a=20
pointer to find
out ??
Again, for writing into a HFS =
volume for=20
creating a CD image can we go for UNICODE .
For eg. the volume name length =
for HFS=20
volumes is
27 characters in length. How do =
we store a=20
UNICODE
volume name in that =
space???
The HFS volumes contain data in =
"Big Endian=20
" format.
Can anybody tell me what are the =
fields=20
which has to be
filled in Big Endian =
format.
For eg. in ISO9660 , in Primary =
Volume=20
Desriptor some
fields are written in both =
Little and Big=20
Endian format.
Waiting for u help and=20
suggestions.
regards
Biswaroop Banerjee
------=_NextPart_000_0024_01C1C12B.E4EEE320--
From mday@apple.com Fri Mar 1 16:02:59 2002
From: mday@apple.com (Mark Day)
Date: Fri, 1 Mar 2002 08:02:59 -0800
Subject: [hfs-user] Char set for HFS volumes
In-Reply-To: <002901c1c0fd$cd89bee0$1c0a0a0a@bisban>
Message-ID:
On Friday, March 1, 2002, at 12:48 AM, Biswaroop Banerjee wrote:
> Can anybody tell me which char set is understood in
> HFS volumes. For e.g. in DOS only A-Z, 0-9 and _ are
> the valid characters.
> So, what is for HFS.
Names on HFS are 31 bytes (27 bytes for volume names) and can consist of
any byte value except ASCII colon (":"). Note: that means a zero byte
*is* valid (which can make things difficult for implementations that use
C-style strings which are zero-terminated.
Above I said bytes, not characters. To support localizations to many
languages, Mac OS supports a variety of character set encodings. Some
of those encodings use two bytes to represent a single character. That
means that file names might only contain 15 characters, which would
occupy 30 bytes.
Off hand, I don't know if or where the various encodings are described.
There may be documentation on Apple's developer web site.
Remember that HFS is case insensitive. The definition of what
characters are "upper case" or "lower case" is based on the MacRoman
encoding. MacRoman is similar to ISO Latin 1. Take a look at the
Darwin sources for code that does a case insensitive string compare
using MacRoman (it will be called as part of the B-tree key comparison
function for the catalog B-tree).
> Again, for writing into a HFS volume for creating a CD image can we
> go for UNICODE .
I would advise against that. While you can store just about any byte
sequence (as long as it doesn't contain an ASCII colon), storing Unicode
(eg., UTF-8 or UTF-16) would make for garbage-looking filenames when
viewed on a Macintosh.
> The HFS volumes contain data in "Big Endian " format.
> Can anybody tell me what are the fields which has to be
> filled in Big Endian format.
Everything is big endian. That even includes file names. So, Macintosh
encodings that use two bytes per character will store those two bytes in
big endian form on HFS. And the two bytes per UTF-16 code point are
stored in big endian form on HFS Plus.
-Mark
From Biswaroop Banerjee"
This is a multi-part message in MIME format.
------=_NextPart_000_002B_01C1C19E.34AC86C0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
hi,
When storing text documents from windows to a HFS volume should =
change the End Of Line character which in
Windows is "\n" to Macs EOL character "\r".
regards
Biswaroop Banerjee
------=_NextPart_000_002B_01C1C19E.34AC86C0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
hi,
When storing text =
documents from=20
windows to a HFS volume should change the End Of Line character which=20
in
Windows is "\n" to Macs EOL =
character=20
"\r".
regards
Biswaroop =
Banerjee
------=_NextPart_000_002B_01C1C19E.34AC86C0--
From sibaz@sibaz.com Mon Mar 4 15:35:09 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Mon, 04 Mar 2002 15:35:09 +0000
Subject: [hfs-user] Windows EOL("\n") and Mac's EOL("\r")
References: <002e01c1c170$1b0e3b60$1c0a0a0a@bisban>
Message-ID: <3C83942D.3B653AB5@sibaz.com>
Thats debatable.
Don't forget the file system doesn't neccesarily know the difference between a binary and textual document (unless it interprets the finder information, which is shouldn't have to). Consequently you might cause massive problems with all non text
applications by doing eol translations.
In reality the best option is to realise the difference and keep files stored in whatever format you want to use them in. I personally have this issue with PC and UNIX eol's, but I just try to keep things in whichever format is most appropriate.
I have an application that converts from one type of eol to another if you need it.
Simony
From Biswaroop Banerjee"
This is a multi-part message in MIME format.
------=_NextPart_000_0073_01C1C5F0.AE1F6300
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi Everybody,
Can anybody of u give me the types of files found on a Windows volume =
which can be opened on a Mac system also.
I know of the following list..
1. HTML files
2. GIF image files
3. Text files( should i convert "CRLF" combinations to "CR" for =
Macintosh
4. PDF documents
Please add to these list if u know something more..
Again , how to find the CREATOR and TYPE fields for the above formats.
If i write "????" as default creator and default field types for any =
unknown file format..Will it work???
Waiting for u inputs.
regards
Biswaroop Banerjee
------=_NextPart_000_0073_01C1C5F0.AE1F6300
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi Everybody,
Can anybody of u give me the =
types of files=20
found on a Windows volume which can be opened on a Mac system =
also.
I know of the following =
list..
1. HTML files
2. GIF image files
3. Text files( should i convert "CRLF" =
combinations=20
to "CR" for Macintosh
4. PDF documents
Please add to these list if u =
know something=20
more..
Again , how to find the CREATOR =
and TYPE=20
fields for the above formats.
If i write "????" as default =
creator and=20
default field types for any unknown file format..Will it =
work???
Waiting for u =
inputs.
regards
Biswaroop =
Banerjee
------=_NextPart_000_0073_01C1C5F0.AE1F6300--
From Biswaroop Banerjee"
This is a multi-part message in MIME format.
------=_NextPart_000_00CE_01C1C5F7.5812B6E0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Dear Mark,
First of all I want to thank you
from my heart the help you are giving to me and others on the list.
Your positive and detailed responses makes me feel secured
that atlest someone is there to
solve my queries.
Keep on the good work!brother.
Some more queries..
1. As my CD image creation program is for Windows platforms.There both =
':'
and "\0" are invalid characters for filenames.So, I wont face the =
problem,i
believe.
I will be using "TCHAR*" than "char*" for strings .My aim is HFS CD
image.So,can u tell me if the
end user selects some files from a Windows volume(eg. Korean =
windows)that
means filenames will
be in Korean then the HFS image(which I will create from the selected =
files
by the End user)
will not be "understood" by a Mac machine (for eg. in English)or
vice-versa.Am I right???
2. As u said Mac OS supports many character encodings.Is there any field =
in
the HFS volume
where information about the character set used is stored?
3. (Most Important for me)please suggest.
For my understanding I am reffering to "mkhybrid" and "mkhfs"
application code and trying
to do it on Windows. You must be already aware of these premastering
applications for Linux.
I am trying to understand the implementation logic of the B*tree from
them and how they
create the Image file. I just want an answer Whether my approach is
correct and what more
I should be in touch?? As far my understanding the latter part is =
going
to be same(I mean the logic of creating the HFS filesystem will be =
same)only
the selection of files and their validations will be different??
Waitng for your answers anxiously!
regards
Biswaroop Banerjee
------=_NextPart_000_00CE_01C1C5F7.5812B6E0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Dear Mark,
=
First of all I=20
want to thank you
from my heart the help you are giving to me =
and=20
others on the list.
Your positive and detailed responses makes me =
feel=20
secured
that atlest someone is there to
solve my queries.
Keep =
on the=20
good work!brother.
Some more queries..
1. As my CD image =
creation=20
program is for Windows platforms.There both ':'
and "\0" are invalid=20
characters for filenames.So, I wont face the problem,i
believe.
I =
will be=20
using "TCHAR*" than "char*" for strings .My aim is HFS =
CD
image.So,can u tell=20
me if the
end user selects some files from a Windows volume(eg. =
Korean=20
windows)that
means filenames will
be in Korean then the HFS=20
image(which I will create from the selected files
by the End=20
user)
will not be "understood" by a Mac machine (for eg. in=20
English)or
vice-versa.Am I right???
2. As u said Mac OS =
supports many=20
character encodings.Is there any field in
the HFS =
volume
=20
where information about the character set used is stored?
3. =
(Most=20
Important for me)please suggest.
For my=20
understanding I am reffering to "mkhybrid" and "mkhfs"
application =
code and=20
trying
to do it on Windows. You must be already aware of =
these=20
premastering
applications for Linux.
I am trying to=20
understand the implementation logic of the B*tree from
them and how=20
they
create the Image file. I just want an answer =
Whether my=20
approach is
correct and what more
I should be in =
touch?? As=20
far my understanding the latter part is going
to be same(I mean the =
logic of=20
creating the HFS filesystem will be same)only
the selection of files =
and=20
their validations will be different??
Waitng for your =
answers=20
anxiously!
regards
Biswaroop =
Banerjee
------=_NextPart_000_00CE_01C1C5F7.5812B6E0--
From Biswaroop Banerjee"
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1C6BA.8481CB80
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi,
Can anybody tell me whether the image file created by the
mkhybrid premastering application on Linux dumps the=20
files 2 times i.e. once for the ISO and then for the HFS.
or they dump the file contents only once and provide
ISO view and HFS view for the same.
If not?? then is it possible how to do it??
Again, can anybody give me a link to shareware programs
on Windows which will create HFS image from Windows selected files.=20
regards
Biswaroop
------=_NextPart_000_0007_01C1C6BA.8481CB80
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi,
Can anybody tell me whether the image =
file created=20
by the
mkhybrid premastering application =
on Linux=20
dumps the
files 2 times i.e. once for the =
ISO and then=20
for the HFS.
or they dump the file contents =
only once and=20
provide
ISO view and HFS view for the=20
same.
If not?? then is it possible how =
to do=20
it??
Again, can anybody give me a =
link to=20
shareware programs
on Windows which will create HFS =
image from=20
Windows selected files.
regards
Biswaroop
------=_NextPart_000_0007_01C1C6BA.8481CB80--
From jcpearso@ps.ucl.ac.uk Fri Mar 8 11:02:37 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Fri, 08 Mar 2002 11:02:37 +0000
Subject: [hfs-user] Mkhybrid application and HFS image
In-Reply-To: Your message of Fri, 08 Mar 2002 16:01:33 +0530.
<000a01c1c68c$6c087820$1c0a0a0a@bisban>
Message-ID: <221440.1015585357@ourhome.freeserve.co.uk>
> Can anybody tell me whether the image file created by the
> mkhybrid premastering application on Linux dumps the
> files 2 times i.e. once for the ISO and then for the HFS.
> or they dump the file contents only once and provide
> ISO view and HFS view for the same.
> If not?? then is it possible how to do it??
Note: the mkhybrid code is now part of mkisofs. You should be using
mkisofs instead of mkhybrid.
mkisofs creates a "shared" HFS hybrid i.e. the file data only exists once
on the CD.
> Again, can anybody give me a link to shareware programs
> on Windows which will create HFS image from Windows selected files
mkisofs can be compiled on Windows - using the Cygwin environment.
The cdrtools package (mkisofs is part of cdrtools) should provide info
on this.
James Pearson
From sibaz@sibaz.com Fri Mar 8 15:22:15 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Fri, 08 Mar 2002 15:22:15 +0000
Subject: [hfs-user] Mkhybrid application and HFS image
References: <000a01c1c68c$6c087820$1c0a0a0a@bisban>
Message-ID: <3C88D727.9CAFE0B4@sibaz.com>
I think you're getting a few things confused Biswaroop.
Firstly, HFS only supports one system of charachter incoding, MacRoman.
If your korean charachters aren't there, then you can't use them.
Secondly, when I installed hfsutils, I didn't use mkhybrid (the hard
links to the hfsutils application didn't work under cygwin, so I had to
guess at what to call it. I never tried mkhybrid). Cygwin is a massive
application (600Mb) if you install all of it, which you probably don't
need to do, so I'd suggest trying to get the setup.exe application
again. It will download the relevant parts as needed depending on what
you choose to install. You'll need gcc, binutils, make and cygwin (and
win32api) to make hfsutils. Just select the whole compiler section in
the setup options. The thing to remember though is that
cygwin/setup.exe is a symlink to cygwin/latest/setup.exe, so if you're
in an ftp browser, and you have problems with the main setup.exe, get
the other one. To get cygwin goto http://cygwin.com/mirrors.html and
pick a mirror (such as ftp.mirror.ac.uk) then go to the latest
directory, et voila.
Thirdly, every filetype available on a PC is availiable on a mac, as
long as a compatible application is avaliable (so include all M$
applications and adobe applications, and any other company thats any
good). The finder uses a long (4 bytes) to store the application type.
There are therefore at least 64*64*64*64 possible applications that use
normal ascii for that. Have a look at netatalk for a list of some
avaliable (the etc/AppleVolumes.system file contains a list). On my
system there are about 250 extension to Finder Tag conversions, but what
most people do is run a netatalk application to regenerate that file,
based on what a particular system has used. Remember the Finder Tag
referes to the Application that made it, not the file type, so things
like .wav .jpg .gif may have several different tags, one for each
application that can create them. You need to pick the one that your
system uses.
A Hybrid CD contains 2 different partitions, only one of which will be
visible on a non linux system (I belive). The difference being ISO
contains MBCS (or atleast DBCS) filenames, and supports file system
'extensions'. I don't know what the standard is for the HFS part of
that. I'd guess you can make the HFS partition HFS+, but apart from
that, don't use it unless you really need forks.
You need to decide whether forks are more important than filenames, and
decide what you're going to store where I think. Unless forks are a
MUST, ISO is easier.
Simon
From pwd@apple.com Sat Mar 9 00:21:20 2002
From: pwd@apple.com (Patrick Dirks)
Date: Fri, 8 Mar 2002 16:21:20 -0800
Subject: [hfs-user] Type and Creator Information for Windows files.
In-Reply-To: <007601c1c5c2$ba8218a0$1c0a0a0a@bisban>
Message-ID: <94A9CA84-32F3-11D6-B251-003065A0E6DE@apple.com>
--Apple-Mail-5-818858662
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Hello Biswaroop,
You seem to be going through an awful lot of hard work to create a=20
Windows-based CD-ROM authoring application when there must be a number=20=
of them already available. May I ask why you're starting from scratch=20=
on one?
For what it's worth, there's an awful lot of information about CD-ROMs=20=
and other optical media on the Optical Storage Technology Association's=20=
web site. They have a Question & Answer section at
http://www.osta.org/technology/cdqa.htm
which includes a lengthy listing of all sorts of CD-ROM related=20
resources at
http://www.osta.org/technology/cdqa14.htm
including a list of recording software developers at
http://www.osta.org/technology/cdqa14.htm#e
Hope that helps.
Good luck,
-Pat Dirks.
On Thursday, March 7, 2002, at 02:26 AM, Biswaroop Banerjee wrote:
> Hi Everybody,
> =A0
> =A0 Can anybody of u give me the types of files found on a Windows =
volume=20
> which can be opened on a Mac system also.
> =A0 I know of the following list..
> =A01. HTML files
> 2.=A0 GIF image files
> 3. Text files( should i convert "CRLF" combinations to "CR" for=20
> Macintosh
> 4. PDF documents
> =A0 Please add to these list if u know something more..
> =A0
> =A0Again , how to find the CREATOR and TYPE fields for the above =
formats.
> =A0If i write "????" as default creator and default field types for =
any=20
> unknown file format..Will it work???
> =A0
> =A0Waiting for u inputs.
> =A0
> =A0regards
> =A0Biswaroop Banerjee
--Apple-Mail-5-818858662
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Hello Biswaroop,
You seem to be going through an awful lot of hard work to create a
Windows-based CD-ROM authoring application when there must be a number
of them already available. May I ask why you're starting from scratch
on one?
For what it's worth, there's an awful lot of information about CD-ROMs
and other optical media on the Optical Storage Technology
Association's web site. They have a Question & Answer section at
http://www.osta.org/technology/cdqa.htm
which includes a lengthy listing of all sorts of CD-ROM related
resources at
http://www.osta.org/technology/cdqa14.htm
including a list of recording software developers at
http://www.osta.org/technology/cdqa14.htm#e
Hope that helps.
Good luck,
-Pat Dirks.
On Thursday, March 7, 2002, at 02:26 AM, Biswaroop Banerjee wrote:
ArialHi =
Everybody,
=A0
Arial=A0 Can anybody of u give me
the types of files found on a Windows volume which can be opened on a
Mac system also.
Arial=A0 I know of the following
list..
Arial=A01. HTML =
files
Arial2.=A0 GIF image =
files
Arial3. Text files( should i
convert "CRLF" combinations to "CR" for Macintosh
Arial4. PDF =
documents
Arial=A0 Please add to these list if
u know something more..
=A0
Arial=A0Again , how to find the
CREATOR and TYPE fields for the above formats.
Arial=A0If i write "????" as default
creator and default field types for any unknown file format..Will it
work???
=A0
Arial=A0Waiting for u =
inputs.
=A0
Arial=A0regards=
Arial=A0Biswaroop =
Banerjee
=
--Apple-Mail-5-818858662--
From drechsel@verkehrsplanung.com Mon Mar 11 21:24:04 2002
From: drechsel@verkehrsplanung.com (Wolf Drechsel)
Date: Mon, 11 Mar 2002 22:24:04 +0100
Subject: [hfs-user] delete not-empty directories
Message-ID:
Hello friends,
this sounds easy - but I didnt find something about it in the docs:
How do I delete a not-empty directory in a mounted hfs volume?
hdel -r seems not to be working...
Thanks
WD
--
************************************************************
# Gesellschaft für fahrgastorientierte Verkehrsplanung b.R.
# Köhnstr. 54 D-90478 Nürnberg
#
# Telephon: 0911/4 71 98 49
# Telefax: 0911/47 39 36
#
# drechsel@verkehrsplanung.com
# www.verkehrsplanung.com
#************************************************************
From rob@mars.org Mon Mar 11 22:54:34 2002
From: rob@mars.org (Rob Leslie)
Date: Mon, 11 Mar 2002 14:54:34 -0800
Subject: [hfs-user] delete not-empty directories
In-Reply-To:
Message-ID:
On Monday, March 11, 2002, at 01:24 PM, Wolf Drechsel wrote:
> this sounds easy - but I didnt find something about it in the docs:
>
> How do I delete a not-empty directory in a mounted hfs volume?
>
> hdel -r seems not to be working...
You need to delete the contents first using hdel and/or hrmdir, then you
can hrmdir the directory. Wildcards may help, e.g.
% hdel ':dir:*'
% hrmdir :dir
It is an unfortunate oversight that hdel does not have a recursive
option. You can, however, use xhfs to delete most directories
recursively.
--
Rob Leslie
rob@mars.org
From Biswaroop Banerjee"
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1CC3C.040009E0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
hi everybody,
In the MDB structure for a HFS volume has a member.
drxtTClpSiz, this member stores the clump size for the
extents overflow file.
In the linux code it is calculated as follows
vol.mdb.drXTClpSiz =3D vol.mdb.drNmAlBlks / 128 * vol.mdb.drAlBlkSiz;
where
vol.mdb.drXTClpSiz =3D Stores the Clump size for the extents overflow =
file.
vol.mdb.drNmAlBlks =3D Stores the number of Allocation blocks for the =
HFS volume =20
vol.mdb.drAlBlkSiz =3D Stores the number of bytes per Allocation Block.
My doubt is why this formula is used to calculate the Extent file's =
clump size.
Can i make it equal to just clump size calculated for the Volume??
/*Info*/
1. A allocation block is integral times of a Logical Block , which for =
HFS is 512 bytes.
2. Clump size is integral times of Allocation Block size and it is the =
amount of space allocated when a file is created to store the file =
contents.
Waiting for your explanations!
Bye
Biswaroop
=20
------=_NextPart_000_0007_01C1CC3C.040009E0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
hi everybody,
In the MDB structure for a HFS volume =
has a=20
member.
drxtTClpSiz, this member stores the =
clump size for=20
the
extents overflow file.
In the linux code it is calculated as=20
follows
vol.mdb.drXTClpSiz =3D =
vol.mdb.drNmAlBlks / 128 *=20
vol.mdb.drAlBlkSiz;
where
vol.mdb.drXTClpSiz =3D Stores the Clump =
size for the=20
extents overflow file.
vol.mdb.drNmAlBlks =3D Stores the =
number of=20
Allocation blocks for the HFS volume
vol.mdb.drAlBlkSiz =3D Stores the =
number of bytes per=20
Allocation Block.
My doubt is why this formula is used to =
calculate=20
the Extent file's clump size.
Can i make it equal to just clump size =
calculated=20
for the Volume??
/*Info*/
1. A allocation block is integral times =
of a=20
Logical Block , which for HFS is 512 bytes.
2. Clump size is integral times =
of Allocation=20
Block size and it is the amount of space allocated when a =
file is=20
created to store the file contents.
Waiting for your =
explanations!
Bye
Biswaroop
------=_NextPart_000_0007_01C1CC3C.040009E0--
From mday@apple.com Fri Mar 15 17:40:05 2002
From: mday@apple.com (Mark Day)
Date: Fri, 15 Mar 2002 09:40:05 -0800
Subject: [hfs-user] (no subject)
In-Reply-To: <000a01c1cc0d$eaefa6a0$1c0a0a0a@bisban>
Message-ID:
On Friday, March 15, 2002, at 02:41 AM, Biswaroop Banerjee wrote:
> vol.mdb.drXTClpSiz = vol.mdb.drNmAlBlks / 128 * vol.mdb.drAlBlkSiz;
That is making it 1/128 of the total volume size.
That is basically what Mac OS 9 uses, though Mac OS 9 also tries to
limit the size to 4MB (which means that for volumes over 512 MB, the
clump size will be 4 MB rounded up to a multiple of the allocation block
size).
> Can i make it equal to just clump size calculated for the Volume??
Depends on your volume's clump size.
For the extents B-tree in particular, you want to avoid making the clump
size too small. The extents B-tree can't grow beyond 3 extents for HFS
(8 extents for HFS Plus), so if the clump size is too small, and files
(including the B-trees!) get too fragmented, you may be unable allocate
space to files because the extents B-tree is too fragmented.
Essentially, you'd get a "disk full" condition even when there is lots
of free space on the volume.
When mastering read-only media, I'd set the clump size to one allocation
block. And since you should be able to lay out the fork content
contiguously, you can also make both of the B-trees the minimum possible
size (meaning an extents B-tree with just a header node).
-Mark
From entwicklung@whengenibk.de Sun Mar 17 19:13:31 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 17 Mar 2002 20:13:31 +0100
Subject: [hfs-user] Fw: desktop database
Message-ID: <000c01c1cde7$d486d470$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C1CDF0.35B9F8F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I had sent the following email a couple of weeks back to some =
Apple employees who respond frequently to the hfs-user mailing list. But =
I didn't get any response from them. This is a general request to anyone =
on the list who cares to respond. In case it is not at all possible to =
get the data I need I would be grateful if someone from Apple could tell =
me that explicitly so that I could look for alternatives / continue with =
implementing other aspects.
My previous email follows -
Hi,
I had written to the list a few days back asking for info. regarding =
the desktop DB since I was unable to find any specific links on the web =
and had heard that Apple doesn't want it openly documented for some =
reason.
=20
One person had written that Apple wouldn't provide users with the =
related info for proprietary reasons.
But one other person wrote to me saying I could probably request Apple =
for any technical info. needed. Is this possible at all ?=20
I remember that after one of our earlier discussions I had come to the =
conclusion that a DTDB would be necessary to improve the =
user-experience. But the question is .. where do I get info. as to the =
structure of these 'hidden' files in an HFS-image ? I'm beginning to =
think there's no light at the end of the tunnel..... :(
Would be grateful for any info / links.
Regards,
Nandini Hengen
------=_NextPart_000_0009_01C1CDF0.35B9F8F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I had=20
sent the following email a couple of weeks back to some Apple employees =
who=20
respond frequently to the hfs-user mailing list. But I didn't get any =
response=20
from them. This is a general request to anyone on the list who cares to =
respond.=20
In case it is not at all possible to get the data I need I would be =
grateful if=20
someone from Apple could tell me that explicitly so that I could look =
for=20
alternatives / continue with implementing other aspects.
My previous email follows =
-
Hi,
I had written to the list =
a few days=20
back asking for info. regarding the desktop DB since I was unable =
to find=20
any specific links on the web and had heard that Apple doesn't want it =
openly=20
documented for some reason.
One person had written that Apple =
wouldn't provide=20
users with the related info for proprietary reasons.
But one other person wrote to me saying =
I could=20
probably request Apple for any technical info. needed. Is this possible =
at all ?=20
I remember that after one of our =
earlier=20
discussions I had come to the conclusion that a DTDB would be necessary =
to=20
improve the user-experience. But the question is .. where do I get =
info. as=20
to the structure of these 'hidden' files in an HFS-image ? I'm beginning =
to=20
think there's no light at the end of the tunnel..... :(
Would be grateful for any info /=20
links.
Regards,
Nandini =
Hengen
------=_NextPart_000_0009_01C1CDF0.35B9F8F0--
From entwicklung@whengenibk.de Mon Mar 18 06:54:21 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Mon, 18 Mar 2002 07:54:21 +0100
Subject: [hfs-user] Fw: Fw: desktop database
Message-ID: <001601c1ce49$bbad5d40$0400a7c0@modemserver>
----- Original Message -----
From: "Entwicklung"
To: "Matthew Jarjoura"
Sent: Monday, March 18, 2002 7:53 AM
Subject: Re: Fw: desktop database
> Hello,
> Thanks for replying.
>
> > What exactly are you hoping to accomplish by reading the Desktop DB
file?
> > I doubt Apple wants someone writing code that messes with that file
> > anyway. Besides Desktop DB is part of Mac OS 9 code. Mac OS X uses .rc
> > files per directory that I believe you can open with "Property List
> > Editor."
> >
> > If you want to save the state of a directory in Mac OS 9, all meta data
is
> > stored when using .SIT and .HQX compression. Using Toast to burn a CD
> > also saves that meta data.
>
> I'm trying to create an external HFS image from another platform - i.e. I
> want to write the desktop DB file into my image which is then written onto
> an external volume which I want to be readable under Mac OS 9
> and earlier. I've gathered that this is not absolutely necessary to ensure
> readability but that it would improve user-experience for Mac users to an
> extent ( when files present on my external volume were created using
> applications not installed on the Mac for instance ). I'm not considering
> recording a CD under Mac OS or saving the state of any directories already
> present on the Mac. And I'm not considering Mac OS X at all.
>
> Regards,
> Nandini Hengen
>
From entwicklung@whengenibk.de Wed Mar 20 10:50:20 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Wed, 20 Mar 2002 11:50:20 +0100
Subject: [hfs-user] Mapping of filename-extensions
Message-ID: <000a01c1cffd$08c1f910$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1D005.6957CC20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello everybody,
I'm looking for some kind of exhaustive list which =
maps filename extensions onto creator and filetype for MacOS ...say =
files with extension ".pdf" could be mapped on to a default filetype =
"PDF " and default creator "CARO" (4-byte values).
I could get hold of these mappings using a freeware tool and a bit of =
reverse-engineering but I'd rather stick to a standard mapping if =
anything like that is available. Somebody had told me I could retrieve =
this info from a Sytem-file on my iMac but I was unable to open this =
file and view its contents.
Would be grateful to anyone who knows something about this and can help =
me out.
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1D005.6957CC20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello everybody,
&nbs=
p; =20
I'm looking for some kind of exhaustive list which maps filename =
extensions onto=20
creator and filetype for MacOS ...say files with extension ".pdf" could =
be=20
mapped on to a default filetype "PDF " and default creator "CARO" =
(4-byte=20
values).
I could get hold of these mappings =
using a freeware=20
tool and a bit of reverse-engineering but I'd rather stick to a standard =
mapping=20
if anything like that is available. Somebody had told me I could =
retrieve this=20
info from a Sytem-file on my iMac but I was unable to open this file and =
view=20
its contents.
Would be grateful to anyone who knows =
something=20
about this and can help me out.
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1D005.6957CC20--
From sibaz@sibaz.com Wed Mar 20 12:14:27 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Wed, 20 Mar 2002 12:14:27 +0000
Subject: [hfs-user] Mapping of filename-extensions
References: <000a01c1cffd$08c1f910$0400a7c0@modemserver>
Message-ID: <3C987D23.173DDDF9@sibaz.com>
I refer you to the mail I sent you on 08/03/02 15:22 entitled Re:
[hfs-user] Mkhybrid application and HFS image, Paragraph 3, where I
answered this question.
Simon
Entwicklung wrote:
> Hello everybody, I'm looking for some kind of
> exhaustive list which maps filename extensions onto creator and
> filetype for MacOS ...say files with extension ".pdf" could be mapped
> on to a default filetype "PDF " and default creator "CARO" (4-byte
> values). I could get hold of these mappings using a freeware tool and
> a bit of reverse-engineering but I'd rather stick to a standard
> mapping if anything like that is available. Somebody had told me I
> could retrieve this info from a Sytem-file on my iMac but I was unable
> to open this file and view its contents.Would be grateful to anyone
> who knows something about this and can help me out. Regards,Nandini
> Hengen
From entwicklung@whengenibk.de Wed Mar 20 14:15:26 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Wed, 20 Mar 2002 15:15:26 +0100
Subject: [hfs-user] Re: Mapping of...
References: <000a01c1c68c$6c087820$1c0a0a0a@bisban> <3C88D727.9CAFE0B4@sibaz.com>
Message-ID: <001e01c1d019$aef1b340$0400a7c0@modemserver>
Hi,
Thanks for responding!
> Thirdly, every filetype available on a PC is availiable on a mac, as
> long as a compatible application is avaliable (so include all M$
> applications and adobe applications, and any other company thats any
> good). The finder uses a long (4 bytes) to store the application type.
> There are therefore at least 64*64*64*64 possible applications that use
> normal ascii for that. Have a look at netatalk for a list of some
> avaliable (the etc/AppleVolumes.system file contains a list). On my
> system there are about 250 extension to Finder Tag conversions, but what
> most people do is run a netatalk application to regenerate that file,
> based on what a particular system has used. Remember the Finder Tag
> referes to the Application that made it, not the file type, so things
> like .wav .jpg .gif may have several different tags, one for each
> application that can create them. You need to pick the one that your
> system uses.
What I'm trying to achieve is to set the filetype and creator fields on my
external HFS-volume so that the correct icon appears on my Mac. I noticed
that say for a .jpg or for a .txt even if these fields contain 0 this
assignment is automatically done by Mac-OS when an external volume is
mounted but for a .pdf or a .cpp file for eg. the generic icon appears. Once
I set some default filetype and creator for a .pdf file the correct icon
does appear.
So what I need actually is not a one-to-many mapping (of all possible
applications which deal with a particular kind of file) but some default
one-to-one mapping of standard applications used to open a particular file -
say MSWD for .doc files and so on.
I am not familiar with netatalk at all. Sorry if this is a newbie question
but how exactly do I proceed ?
Regards,
Nandini
From entwicklung@whengenibk.de Wed Mar 20 15:22:17 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Wed, 20 Mar 2002 16:22:17 +0100
Subject: [hfs-user] Mapping of filename-extensions
References:
Message-ID: <003d01c1d023$05ba1b00$0400a7c0@modemserver>
Thanks a ton ! That's exactly what I needed.
Regards,
Nandini Hengen
----- Original Message -----
From: "Chris Harwell"
To: "Entwicklung"
Sent: Wednesday, March 20, 2002 4:23 PM
Subject: Re: [hfs-user] Mapping of filename-extensions
> On Wed, 20 Mar 2002, Entwicklung wrote:
>
> > Hello everybody,
> > I'm looking for some kind of exhaustive list which
maps filename extensions onto creator and filetype for MacOS ...say files
with extension ".pdf" could be mapped on to a default filetype "PDF " and
default creator "CARO" (4-byte values).
> >
> > I could get hold of these mappings using a freeware tool and a bit of
reverse-engineering but I'd rather stick to a standard mapping if anything
like that is available. Somebody had told me I could retrieve this info from
a Sytem-file on my iMac but I was unable to open this file and view its
contents.
> > Would be grateful to anyone who knows something about this and can help
me out.
> >
> > Regards,
> > Nandini Hengen
> hello,
>
> this list is from the netatalk distribution - seems similar to what your
> looking for. i got it from http://sourceforge.net/projects/netatalk/
>
> --
> chris
> charwell@digitalpulp.com
>
From entwicklung@whengenibk.de Sun Mar 24 18:59:21 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 24 Mar 2002 19:59:21 +0100
Subject: [hfs-user] Clarification needed wrt B/B*-Trees
Message-ID: <000a01c1d366$02b42590$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1D36E.63ED8BA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
The technical notes for HFS+ TN1150 refers to =
'B-Trees' and the documentation for HFS in 'Inside Macintosh - Data =
Organisation on volumes' refers to 'B*- Trees'
Going by the definitions provided by NIST (the national institute of =
standards) a B-Tree is defined as
Definition: A balanced search tree in which every node has between t-1 =
and 2t-1 children, where t is an arbitrary constant. This is a good =
structure if much of the tree is in slow memory (disk), since the =
height, and hence the number of accesses, can be kept small, say one or =
two, by picking a large t.=20
and a B*-Tree is defined as :=20
Definition: A B-tree in which nodes are kept 2/3 full by redistributing =
keys to fill two child nodes, then splitting them into three nodes.=20
As far as I can gather from the definitions and the documentation, HFS =
uses a B*-Tree and HFS+ uses a B-Tree.... does anybody know why ? Does =
this mean that in case of HFS I would have to perform an additional =
redistribution of keys to keep the nodes just 2/3 full ( which I am not =
considering right now ) ? The HFS-Specs as such do not mention anything =
about keeping the nodes just 2/3 full ...or am I wrong there ?
Would be glad to hear your comments/feedback ...
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1D36E.63ED8BA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
&nbs=
p; =20
The technical notes for HFS+ TN1150 refers to 'B-Trees' and the =
documentation=20
for HFS in 'Inside Macintosh - Data Organisation on volumes' refers to =
'B*-=20
Trees'
Going by the definitions provided by =
NIST (the=20
national institute of standards) a B-Tree is defined =
as
Definition: A balanced search tree in which every node has =
between=20
t-1 and 2t-1 children=
, where t=20
is an arbitrary constant. This is a good structure if much of the tree =
is in=20
slow memory (disk), since the height,=
and=20
hence the number of accesses, can be kept small, say one or two, by =
picking a=20
large t.
and a B*-Tree is defined as :=20
Definition: A B-tree in =
which nodes =
are kept 2/3=20
full by redistributing keys to =
fill two child =
nodes, then=20
splitting them into three nodes.
As far as I can gather from the definitions and the documentation, =
HFS uses a=20
B*-Tree and HFS+ uses a B-Tree.... does anybody know why ? Does =
this mean=20
that in case of HFS I would have to perform an additional redistribution =
of keys=20
to keep the nodes just 2/3 full ( which I am not considering right now ) =
? The=20
HFS-Specs as such do not mention anything about keeping the nodes just =
2/3 full=20
...or am I wrong there ?
Would be glad to hear your comments/feedback ...
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1D36E.63ED8BA0--
From sibaz@eyeeye.com Wed Mar 20 17:41:44 2002
From: sibaz@eyeeye.com (Simon Bazley)
Date: Wed, 20 Mar 2002 17:41:44 +0000
Subject: [hfs-user] Re: Mapping of...
References: <000a01c1c68c$6c087820$1c0a0a0a@bisban> <3C88D727.9CAFE0B4@sibaz.com> <001e01c1d019$aef1b340$0400a7c0@modemserver>
Message-ID: <3C98C9D8.8D80DC61@eyeeye.com>
As I understand it the mac looking at your CD will check the application tag of
a file against the applications is has installed, and if appropriate, get an
icon and display it. If there is no application data, it assumes its a dos file
and tries to work thigns out by extension (if modern os's). The Resource file
can contain icon information, but I think this is only for applications.
I would definately suggest you look at the etc/AppleVolumes.system file and
start from there. Try that before anything else. It worked in my office
without me having to do anything.
Simon
Entwicklung wrote:
> Hi,
> Thanks for responding!
>
> > Thirdly, every filetype available on a PC is availiable on a mac, as
> > long as a compatible application is avaliable (so include all M$
> > applications and adobe applications, and any other company thats any
> > good). The finder uses a long (4 bytes) to store the application type.
> > There are therefore at least 64*64*64*64 possible applications that use
> > normal ascii for that. Have a look at netatalk for a list of some
> > avaliable (the etc/AppleVolumes.system file contains a list). On my
> > system there are about 250 extension to Finder Tag conversions, but what
> > most people do is run a netatalk application to regenerate that file,
> > based on what a particular system has used. Remember the Finder Tag
> > referes to the Application that made it, not the file type, so things
> > like .wav .jpg .gif may have several different tags, one for each
> > application that can create them. You need to pick the one that your
> > system uses.
>
> What I'm trying to achieve is to set the filetype and creator fields on my
> external HFS-volume so that the correct icon appears on my Mac. I noticed
> that say for a .jpg or for a .txt even if these fields contain 0 this
> assignment is automatically done by Mac-OS when an external volume is
> mounted but for a .pdf or a .cpp file for eg. the generic icon appears. Once
> I set some default filetype and creator for a .pdf file the correct icon
> does appear.
> So what I need actually is not a one-to-many mapping (of all possible
> applications which deal with a particular kind of file) but some default
> one-to-one mapping of standard applications used to open a particular file -
> say MSWD for .doc files and so on.
>
> I am not familiar with netatalk at all. Sorry if this is a newbie question
> but how exactly do I proceed ?
>
> Regards,
> Nandini
From simon@sibaz.com Sun Mar 24 20:15:18 2002
From: simon@sibaz.com (Simon Bazley )
Date: Sun, 24 Mar 2002 20:15:18 +0000 (GMT)
Subject: [hfs-user] Clarification needed wrt B/B*-Trees
In-Reply-To: <000a01c1d366$02b42590$0400a7c0@modemserver>
Message-ID:
Entwicklung,
This is completely academic for what you're trying to do as you
are only going to write to the tree once, so you don't have to maintain it
in a balanced state. Just get your data, sort it and write it. Every
node you make should be set exactly how you want it. I reccoment using
the maximum 8 tree depths, then evenly filling everything under that with
your data. You may find just filling each node is better, I'm not sure.
Remember the redistruction you talk about is purely a toss up
between searchability and writability. That is the whole point in btrees
Simon
On Sun, 24 Mar 2002, Entwicklung wrote:
> Hello listers,
> The technical notes for HFS+ TN1150 refers to 'B-Trees' and the documentation for HFS in 'Inside Macintosh - Data Organisation on volumes' refers to 'B*- Trees'
>
> Going by the definitions provided by NIST (the national institute of standards) a B-Tree is defined as
> Definition: A balanced search tree in which every node has between t-1 and 2t-1 children, where t is an arbitrary constant. This is a good structure if much of the tree is in slow memory (disk), since the height, and hence the number of accesses, can be kept small, say one or two, by picking a large t.
>
>
> and a B*-Tree is defined as :
> Definition: A B-tree in which nodes are kept 2/3 full by redistributing keys to fill two child nodes, then splitting them into three nodes.
>
> As far as I can gather from the definitions and the documentation, HFS uses a B*-Tree and HFS+ uses a B-Tree.... does anybody know why ? Does this mean that in case of HFS I would have to perform an additional redistribution of keys to keep the nodes just 2/3 full ( which I am not considering right now ) ? The HFS-Specs as such do not mention anything about keeping the nodes just 2/3 full ...or am I wrong there ?
>
> Would be glad to hear your comments/feedback ...
>
> Regards,
>
> Nandini Hengen
>
>
>
>
>
>
From mday@apple.com Mon Mar 25 17:52:09 2002
From: mday@apple.com (Mark Day)
Date: Mon, 25 Mar 2002 09:52:09 -0800
Subject: [hfs-user] Clarification needed wrt B/B*-Trees
In-Reply-To: <000a01c1d366$02b42590$0400a7c0@modemserver>
Message-ID: <075D5E04-4019-11D6-B214-00039354009A@apple.com>
On Sunday, March 24, 2002, at 10:59 AM, Entwicklung wrote:
> As far as I can gather from the definitions and the documentation, HFS
> uses a B*-Tree and HFS+ uses a B-Tree.... does anybody know why ? Does
> this mean that in case of HFS I would have to perform an additional
> redistribution of keys to keep the nodes just 2/3 full ( which I am not
> considering right now ) ? The HFS-Specs as such do not mention anything
> about keeping the nodes just 2/3 full ...or am I wrong there ?
It's just an imprecise use of terminology. Both HFS and HFS Plus can
use the same implementation for B-trees (and they do in Mac OS 8, 9 and
Mac OS X).
Actually, I think "B+-Tree" is more accurate. A B+-Tree is really just
a B-tree where all of the data is kept in leaf nodes (and interior nodes
contain only keys and pointers). The B-trees in HFS and HFS Plus do
have that characteristic.
The difference between B-tree and B*-Tree is a difference in how full
the nodes are kept in the face of inserts and deletes. Apple's code
splits an overly full node into two nodes (not splitting two siblings
into three like a B*-tree). However, Apple's code does have an extra
optimization that tends to keep nodes fuller than a plain B-tree. When
a node is too full to insert a new record, it first tries to "rotate"
one or more records to a sibling. I know it tries rotating to the left;
I can't remember whether it tries rotating to the right. If rotation is
not possible, the node is split into two.
-Mark
From entwicklung@whengenibk.de Tue Mar 26 07:37:14 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 26 Mar 2002 08:37:14 +0100
Subject: [hfs-user] Restrictions on root/index nodes ???
Message-ID: <011001c1d499$0e8bc3d0$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_010D_01C1D4A1.6DEB60D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
I've encountered a problem which I am not able to =
attribute to anything particular and would like to know if I am making =
any basic mistake or have overlooked something.
I'm creating a catalog B-Tree with 1 root node (index) containing five =
ptr recs to a second level of five index nodes, each of which contains =
11 pointer records to 11 leaf nodes each.
The problem I'm facing is that the files referenced by the last 22 ptr =
recs i.e. in the last 2 lower level index nodes
are not readable on my Mac although the correct Icons do appear and all =
my files are displayed.
I think there must be some problem with the referencing (data fork =
locations in the leaf nodes) so I checked this but it seems to be fine =
(just like it is for the first 3 index nodes which work perfectly) . =
Since all the icons get displayed correctly I thought the problem must =
lie within the leaf nodes but this doesn't seem to be the case.
On my Mac I get an error of the form "Schreib/Lese Fehler" or =
"Read/Write error"..... What could this be due to ? Checking with =
hfsutils under Linux gives me the error "Wrong logical location" or =
similar.... does anybody know what this is due to?
I think it must be some basic mistake I am making (related to the =
HFS-Specifications perhaps ?) but I have been unable to narrow it down =
so far..(hlp!).. would be glad of some professional advice.
Regards,
Nandini Hengen
------=_NextPart_000_010D_01C1D4A1.6DEB60D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
&nbs=
p; =20
I've encountered a problem which I am not able to attribute to anything=20
particular and would like to know if I am making any basic mistake or =
have=20
overlooked something.
I'm creating a catalog B-Tree with 1 =
root node=20
(index) containing five ptr recs to a second level of five index nodes, =
each of=20
which contains 11 pointer records to 11 leaf nodes each.
The problem I'm facing is that the =
files referenced=20
by the last 22 ptr recs i.e. in the last 2 lower level index =
nodes
are not readable on my Mac =
although the=20
correct Icons do appear and all my files are displayed.
I think there must be some problem with =
the=20
referencing (data fork locations in the leaf nodes) so I checked this =
but it=20
seems to be fine (just like it is for the first 3 index nodes which work =
perfectly) . Since all the icons get displayed correctly I thought the =
problem=20
must lie within the leaf nodes but this doesn't seem to be the=20
case.
On my Mac I get an error of the form =
"Schreib/Lese=20
Fehler" or "Read/Write error"..... What could this be due to ? Checking =
with=20
hfsutils under Linux gives me the error "Wrong logical location" or =
similar.... does anybody know what this is due to?
I think it must be some basic mistake I =
am making=20
(related to the HFS-Specifications perhaps ?) but I have been unable to =
narrow=20
it down so far..(hlp!).. would be glad of some professional =
advice.
Regards,
Nandini =
Hengen
------=_NextPart_000_010D_01C1D4A1.6DEB60D0--
From entwicklung@whengenibk.de Tue Mar 26 11:03:33 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 26 Mar 2002 12:03:33 +0100
Subject: [hfs-user] Clarification needed wrt B/B*-Trees
References: <075D5E04-4019-11D6-B214-00039354009A@apple.com>
Message-ID: <001101c1d4b5$df0f1040$0400a7c0@modemserver>
Thanks a ton! - that answers my question...
Regards,
N.Hengen
----- Original Message -----
From: "Mark Day"
To: "Entwicklung"
Cc: ;
Sent: Monday, March 25, 2002 6:52 PM
Subject: Re: [hfs-user] Clarification needed wrt B/B*-Trees
On Sunday, March 24, 2002, at 10:59 AM, Entwicklung wrote:
> As far as I can gather from the definitions and the documentation, HFS
> uses a B*-Tree and HFS+ uses a B-Tree.... does anybody know why ? Does
> this mean that in case of HFS I would have to perform an additional
> redistribution of keys to keep the nodes just 2/3 full ( which I am not
> considering right now ) ? The HFS-Specs as such do not mention anything
> about keeping the nodes just 2/3 full ...or am I wrong there ?
It's just an imprecise use of terminology. Both HFS and HFS Plus can
use the same implementation for B-trees (and they do in Mac OS 8, 9 and
Mac OS X).
Actually, I think "B+-Tree" is more accurate. A B+-Tree is really just
a B-tree where all of the data is kept in leaf nodes (and interior nodes
contain only keys and pointers). The B-trees in HFS and HFS Plus do
have that characteristic.
The difference between B-tree and B*-Tree is a difference in how full
the nodes are kept in the face of inserts and deletes. Apple's code
splits an overly full node into two nodes (not splitting two siblings
into three like a B*-tree). However, Apple's code does have an extra
optimization that tends to keep nodes fuller than a plain B-tree. When
a node is too full to insert a new record, it first tries to "rotate"
one or more records to a sibling. I know it tries rotating to the left;
I can't remember whether it tries rotating to the right. If rotation is
not possible, the node is split into two.
-Mark
From entwicklung@whengenibk.de Tue Mar 26 15:36:44 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 26 Mar 2002 16:36:44 +0100
Subject: [hfs-user] Restrictions on root/index nodes ???
Message-ID: <001201c1d4dc$0933ae00$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C1D4E4.6A97CD90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
This is wrt my previous email to the list....
I just noted that if I try copying files over =
from my CD to my desktop (i.e. those files which I could open and read =
initially from my CD ) I get the error - The file 'xyz.txt' can't be =
read since a read/write error has occured - Do you wish to proceed ? And =
when I say yes it doesn't get copied anyway (as expected ).=20
Does anyone have an inkling as to what this could be due to ? I'm =
probably missing out on something basic here and need to proceed... any =
suggestions/tips would be greatly appreciated.
Regards,
Nandini Hengen
------=_NextPart_000_000F_01C1D4E4.6A97CD90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
&nbs=
p; =20
This is wrt my previous email to the list....
&nbs=
p;  =
; I=20
just noted that if I try copying files over from my CD to my desktop =
(i.e. those=20
files which I could open and read initially from my CD ) I get the error =
- The=20
file 'xyz.txt' can't be read since a read/write error has occured - Do =
you wish=20
to proceed ? And when I say yes it doesn't get copied anyway (as =
expected ).=20
Does anyone have an inkling as to what =
this could=20
be due to ? I'm probably missing out on something basic here and need to =
proceed... any suggestions/tips would be greatly =
appreciated.
Regards,
Nandini =
Hengen
------=_NextPart_000_000F_01C1D4E4.6A97CD90--
From entwicklung@whengenibk.de Tue Mar 26 15:57:22 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 26 Mar 2002 16:57:22 +0100
Subject: [hfs-user] Mac Error Codes
Message-ID: <001201c1d4de$eab6a0b0$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C1D4E7.4C056380
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I remember I had asked the list a long time back if anyone knew =
where to find a list of Mac error codes.
I found them and the link is:
http://www.cbcu.cam.ac.uk/gds/errorcodes.htm for anyone else who =
needs it too.
- Nandini
------=_NextPart_000_000F_01C1D4E7.4C056380
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I remember I had =
asked the list=20
a long time back if anyone knew where to find a list of Mac error=20
codes.
I found them and the link =
is:
- Nandini
------=_NextPart_000_000F_01C1D4E7.4C056380--
From mday@apple.com Tue Mar 26 16:47:19 2002
From: mday@apple.com (Mark Day)
Date: Tue, 26 Mar 2002 08:47:19 -0800
Subject: [hfs-user] Restrictions on root/index nodes ???
In-Reply-To: <011001c1d499$0e8bc3d0$0400a7c0@modemserver>
Message-ID: <22F818A7-40D9-11D6-9F1C-00039354009A@apple.com>
On Monday, March 25, 2002, at 11:37 PM, Entwicklung wrote:
> I think there must be some problem with the referencing (data fork
> locations in the leaf nodes) so I checked this but it seems to be fine
> (just like it is for the first 3 index nodes which work perfectly) .
> Since all the icons get displayed correctly I thought the problem must
> lie within the leaf nodes but this doesn't seem to be the case.
> On my Mac I get an error of the form "Schreib/Lese Fehler" or
> "Read/Write error"..... What could this be due to ? Checking with
> hfsutils under Linux gives me the error "Wrong logical location" or
> similar.... does anybody know what this is due to?
Two quick guesses: you have keys out of order, or one of the node
numbers ("pointers") in an index node is wrong.
When Mac OS iterates over the contents of a directory, it generally
starts by searching for the thread record of the parent directory (the
key is the directory ID and empty string), and then iterating to the
next leaf record. It continues iterating to the next leaf record until
it finds a record where the parent ID is different. The code maintains
some state about the current position of the iteration (i.e. node number
and record index within the node). The "next leaf record" operation
just increments the record index until that is larger than the number of
records in the node; then it follow's the leaf node's "next" pointer.
This kind of iteration tends to ignore the index nodes, so corruption in
the index nodes isn't detected yet.
Then when you try to do something with one of those objects (eg., open a
file), the object is specified by parent ID and name. That means the
File Manager has to search through the B-Tree for that specific object.
That requires comparing keys and following pointers in the index nodes.
If the keys are out of order, or index nodes are pointing to the wrong
nodes, you are more likely to get some kind of "not found" error. The
"Read/Write error" and "Wrong logical location" suggest that some number
(such as a node number in an index node) is out of range. Another
possibility is that the extent information or end-of-file for the B-tree
is wrong (probably too few allocation blocks), so the node numbers refer
to offsets beyond what the File Manager things is the end of the B-tree.
-Mark
From simon@sibaz.com Tue Mar 26 16:10:13 2002
From: simon@sibaz.com (Simon Bazley )
Date: Tue, 26 Mar 2002 16:10:13 +0000 (GMT)
Subject: [hfs-user] Restrictions on root/index nodes ???
In-Reply-To: <011001c1d499$0e8bc3d0$0400a7c0@modemserver>
Message-ID:
At a guess I'd say check all the FID and DIDs are valid and unique
On Tue, 26 Mar 2002, Entwicklung wrote:
> Hello listers,
> I've encountered a problem which I am not able to attribute to anything particular and would like to know if I am making any basic mistake or have overlooked something.
>
> I'm creating a catalog B-Tree with 1 root node (index) containing five ptr recs to a second level of five index nodes, each of which contains 11 pointer records to 11 leaf nodes each.
> The problem I'm facing is that the files referenced by the last 22 ptr recs i.e. in the last 2 lower level index nodes
> are not readable on my Mac although the correct Icons do appear and all my files are displayed.
>
> I think there must be some problem with the referencing (data fork locations in the leaf nodes) so I checked this but it seems to be fine (just like it is for the first 3 index nodes which work perfectly) . Since all the icons get displayed correctly I thought the problem must lie within the leaf nodes but this doesn't seem to be the case.
> On my Mac I get an error of the form "Schreib/Lese Fehler" or "Read/Write error"..... What could this be due to ? Checking with hfsutils under Linux gives me the error "Wrong logical location" or similar.... does anybody know what this is due to?
>
> I think it must be some basic mistake I am making (related to the HFS-Specifications perhaps ?) but I have been unable to narrow it down so far..(hlp!).. would be glad of some professional advice.
>
> Regards,
> Nandini Hengen
>
From entwicklung@whengenibk.de Wed Mar 27 10:22:44 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Wed, 27 Mar 2002 11:22:44 +0100
Subject: [hfs-user] Restrictions on root/index nodes ???
References: <22F818A7-40D9-11D6-9F1C-00039354009A@apple.com>
Message-ID: <001201c1d579$56a30d50$0400a7c0@modemserver>
Hi,
> If the keys are out of order, or index nodes are pointing to the wrong
> nodes, you are more likely to get some kind of "not found" error. The
> "Read/Write error" and "Wrong logical location" suggest that some number
> (such as a node number in an index node) is out of range. Another
> possibility is that the extent information or end-of-file for the B-tree
> is wrong (probably too few allocation blocks), so the node numbers refer
> to offsets beyond what the File Manager things is the end of the B-tree.
I finally found out what the error was due to. Thanks for the explanation
regarding the sequence of events - I didn't know that Mac iterates thru' the
leaf nodes at the start. The problem was with the index nodes present in the
final sectors which had got currupted while recording onto a disk. Since the
Mac didn't complain about the absence of an alternate MDB and I used a local
image for verification I didn't quite understand what was happening.... now
that the final sectors have been 'set right' the index nodes are also read
correctly and all the files can be opened.
I've been following up threads on other lists as well. I would just like to
convey to the list that I think that Apple is doing a great job out here.
Everyone has rules which have to be stuck to though rules can never be in
the interests of everybody and may not be always fair in everyone's eyes. I
just want to mention that the Apple employees don't have to reply to every
email they get but the fact that some of them do find the time to do so has
to be appreciated. I'd probably be totally lost but for the tips I get from
them once in a while. Thanks !
Regards,
Nandini Hengen
From entwicklung@whengenibk.de Thu Mar 28 09:33:29 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 28 Mar 2002 10:33:29 +0100
Subject: [hfs-user] Date Offset
Message-ID: <000a01c1d63b$a0209930$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1D644.00379F50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
I've calculated the date and time offset between 1904, =
Jan 1 midnight and 1970 as :
time_t offset =3D (365*66 + 17 ) *24*3600
1. I'd just like to know if my calculations are ok. The 17 accounts for =
the extra day in the 17 leap years which occur in this interval.
2. I gathered that Mac uses GMT and the standard C-library time.h bases =
its calculations on UTC. Would this create any further offset to what =
I'm considering right now ? If so what would it be ?
3. I also gathered that HFS uses local time and HFS plus uses GMT. Would =
it be a mistake to save up HFS dates as GMT ? In what way could this =
create problems ?
Could anybody who knows more about this please help me out ?.. would be =
grateful for any tips / suggestions.
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1D644.00379F50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
I've calculated the date and time offset between 1904, Jan 1 midnight =
and 1970=20
as :
time_t offset =3D (365*66 + 17 )=20
*24*3600
1. I'd just like to know if my =
calculations are ok.=20
The 17 accounts for the extra day in the 17 leap years which occur in =
this=20
interval.
2. I gathered that Mac uses GMT and the =
standard=20
C-library time.h bases its calculations on UTC. Would this create any =
further=20
offset to what I'm considering right now ? If so what would it be =
?
3. I also gathered that HFS uses local =
time and HFS=20
plus uses GMT. Would it be a mistake to save up HFS dates as GMT ? In =
what way=20
could this create problems ?
Could anybody who knows more about this =
please help=20
me out ?.. would be grateful for any tips / suggestions.
Regards,
Nandini =
Hengen
------=_NextPart_000_0007_01C1D644.00379F50--
From Emmanuel.Pagnacco@insa-rouen.fr Thu Mar 28 10:40:50 2002
From: Emmanuel.Pagnacco@insa-rouen.fr (Emmanuel Pagnacco)
Date: Thu, 28 Mar 2002 11:40:50 +0100
Subject: [hfs-user] unsubsribe
Message-ID: <3CA2F332.AE0F62C3@insa-rouen.fr>
From jcpearso@ps.ucl.ac.uk Thu Mar 28 11:40:15 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Thu, 28 Mar 2002 11:40:15 +0000
Subject: [hfs-user] Date Offset
In-Reply-To: Your message of Thu, 28 Mar 2002 10:33:29 +0100.
<000a01c1d63b$a0209930$0400a7c0@modemserver>
Message-ID: <281487.1017315615@ourhome.freeserve.co.uk>
> I've calculated the date and time offset between 1904,
>Jan 1 midnight and 1970 as :
>
>time_t offset (365*66 + 17 ) *24*3600
Seems to agree with the value in the hfsutils source.
>1. I'd just like to know if my calculations are ok. The 17 accounts for
>the extra day in the 17 leap years which occur in this interval.
>2. I gathered that Mac uses GMT and the standard C-library time.h bases
>its calculations on UTC. Would this create any further offset to what
>I'm considering right now ? If so what would it be ?
>3. I also gathered that HFS uses local time and HFS plus uses GMT. Would
>it be a mistake to save up HFS dates as GMT ? In what way could this
>create problems ?
No idea - you may want to look at the hfsutils source and see how it deals
with times ...
James Pearson
From entwicklung@whengenibk.de Thu Mar 28 13:47:47 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 28 Mar 2002 14:47:47 +0100
Subject: [hfs-user] Date Offset
References: <281487.1017315615@ourhome.freeserve.co.uk>
Message-ID: <001a01c1d65f$25d70410$0400a7c0@modemserver>
Thanks..I'll do that !
Nandini Hengen
> No idea - you may want to look at the hfsutils source and see how it deals
> with times ...
> James Pearson
From Biswaroop\(External\)"
This is a multi-part message in MIME format.
------=_NextPart_000_0015_01C1D744.98D61740
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
HI, Everybody
Wishing u all a very Happy Holi.( An Indian festival played
with colours)
Well in the MDB structure for an HFS volume the
field
vol.drXTClpSiz /* clump size for extents overflow file */
is 4 bytes long.
Again in the Catalog Data Record structure the member
filClpSize; /* file clump size */
takes 2 bytes.
=20
Therefore when i assign the value of the first variable to
the second I lose information.
But then one way is to make the MDB's variable contain
a value only for 2 bytes then assignment won't make=20
a data loss. But the value for the MDB's variable was
calculated as 1/128 th part of the Total volume size.
An emphirical formula used in the hfsutils package.
Any comments on this???
Please is there any simple formula to find out the
extent file size and the catalog file size for a volume
when we know before hand how many files have to be
in that volume.
For eg. if i know i have to write "X" files contained in
"Y" number of directories.
Then can i calculate what should be the volume's=20
clump size for the extents overflow file and the catalog=20
file.
Waiting for ur explanations.
=20
Bye
Biswaroop
Each Day gives us an Opprutunity to
Ruin it, those who Fail, Succeed in Life.
-- Bisban
------=_NextPart_000_0015_01C1D744.98D61740
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
HI, Everybody
Wishing u all a very Happy Holi.( =
An Indian=20
festival played
with colours)
Well in the MDB structure for an =
HFS volume=20
the
field
vol.drXTClpSiz /* clump size for =
extents=20
overflow file */
is 4 bytes long.
Again in the Catalog Data Record =
structure=20
the member
filClpSize; /* file clump =
size=20
*/
takes 2 bytes.
Therefore when i assign the =
value of the=20
first variable to
the second I lose =
information.
But then one way is to make the =
MDB's=20
variable contain
a value only for 2 bytes then =
assignment=20
won't make
a data loss. But the value for =
the MDB's=20
variable was
calculated as 1/128 th part of =
the Total=20
volume size.
An emphirical formula used in =
the hfsutils=20
package.
Any comments on =
this???
Please is there any simple =
formula to find=20
out the
extent file size and the catalog =
file size=20
for a volume
when we know before hand how =
many files have=20
to be
in that volume.
For eg. if i know i have to =
write "X"=20
files contained in
"Y" number of =
directories.
Then can i calculate what =
should be=20
the volume's
clump size for the extents =
overflow=20
file and the catalog
file.
Waiting for ur =
explanations.
Bye
Biswaroop
Each Day gives us an Opprutunity =
to
Ruin it,=20
those who Fail, Succeed in=20
Life.
&nbs=
p;  =
; =
=
-- Bisban
------=_NextPart_000_0015_01C1D744.98D61740--
From sibaz@sibaz.com Fri Mar 29 14:41:39 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Fri, 29 Mar 2002 14:41:39 +0000
Subject: [hfs-user] Difference in Data types??
References: <001801c1d716$80320a60$1c0a0a0a@bisban>
Message-ID: <3CA47D23.948787B6@sibaz.com>
Firstly, check out the code for the hfs file system on linux. Theres a
lot of helpful little tricks when implementing things in C. In
particular there is a directive which when added to the end of a struct
made it pack as you'd expect it to instead of doing strange things
similar to what you're suggesting.
Again working out assumtions is easy when you can see how someone else
has done it.
As for working out catalog file sizes based on the number of files, you
can't. The problem is the eventual catalog size will be based on the
number of nodes in the file, and the number of nodes depends on howmany
files you can get in each node. That depends on the record size within
the node and that varies for some node types, depending on the length of
the filename. There are 4 types of node in a catalog file, I believe
only 2 will vary in this way. It may be all 4, I'm not sure. Extent
files however don't vary like this so you can work it out. Just
checkout how big key structure is in an extents file, then work out the
packing density of that structure in a node. Remember though that Nodes
are 512 bytes (I think) in HFS, but 4k in HFS+ (this is because the
maximum name length changed in HFS+, so records could be up to 4k big).
I suspect you're best just to create all the keys then just combine them
together and see what you get. I'm sure you could work it out, but It'd
be easier just to make a massive file, then shrink it to the used size
when you've finished adding stuff.
The size of the Catalog file and extents file (allocated size and nodes
used) are stored in the mdb, incase that was what you meant.
Simon
"Biswaroop(External)" wrote:
> HI, Everybody Wishing u all a very Happy Holi.( An Indian festival
> played with colours) Well in the MDB structure for an HFS volume
> the field vol.drXTClpSiz /* clump size for extents overflow file */
> is 4 bytes long. Again in the Catalog Data Record structure the
> member filClpSize; /* file clump size */ takes 2 bytes. Therefore
> when i assign the value of the first variable to the second I lose
> information. But then one way is to make the MDB's variable contain
> a value only for 2 bytes then assignment won't make a data loss. But
> the value for the MDB's variable was calculated as 1/128 th part of
> the Total volume size. An emphirical formula used in the hfsutils
> package. Any comments on this??? Please is there any simple formula
> to find out the extent file size and the catalog file size for a
> volume when we know before hand how many files have to be in that
> volume. For eg. if i know i have to write "X" files contained in
> "Y" number of directories. Then can i calculate what should be the
> volume's clump size for the extents overflow file and the catalog
> file. Waiting for ur explanations. Bye Biswaroop Each Day gives us
> an Opprutunity to
> Ruin it, those who Fail, Succeed in Life.
> -- Bisban
From mday@apple.com Fri Mar 29 17:07:55 2002
From: mday@apple.com (Mark Day)
Date: Fri, 29 Mar 2002 09:07:55 -0800
Subject: [hfs-user] Difference in Data types??
In-Reply-To: <001801c1d716$80320a60$1c0a0a0a@bisban>
Message-ID: <82FABBB5-4337-11D6-AEAE-00039354009A@apple.com>
On Friday, March 29, 2002, at 03:40 AM, Biswaroop(External) wrote:
> Well in the MDB structure for an HFS volume the
> field
> vol.drXTClpSiz /* clump size for extents overflow file */
> is 4 bytes long.
> Again in the Catalog Data Record structure the member
> filClpSize; /* file clump size */
> takes 2 bytes.
>
> Therefore when i assign the value of the first variable to
> the second I lose information.
I'm not sure why you're copying from one to the other. The drXTClpSiz
is the clump size for the extents B-tree only. Since the B-tree is used
in a very different way from typical user files, I don't see a reason to
try and set an ordinary file's clump size to be the same as one of the
B-trees.
I believe Apple's code sets the clump size in a catalog record to zero;
I think you can do the same. It turns out that having different clump
sizes for different files wasn't very useful. If an application really
wanted to make sure that a file was allocated in large contiguous
pieces, it was generally better to try and pre-allocate it in one giant
contiguous piece (or when allocating additional space, make the entire
allocation contiguous). At runtime, Apple's code just uses a
volume-wide default for ordinary files (i.e. ones with a catalog record).
> Please is there any simple formula to find out the
> extent file size and the catalog file size for a volume
> when we know before hand how many files have to be
> in that volume.
> For eg. if i know i have to write "X" files contained in
> "Y" number of directories.
> Then can i calculate what should be the volume's
> clump size for the extents overflow file and the catalog
> file.
Certainly no simple formula for the catalog B-tree. In part that is
because the size of the catalog is determined in part by the lengths of
the file and directory names (even more so on HFS Plus, where the keys
in index nodes are variable length). And for volumes that are modified
over time, the order of operations will affect the size of the B-tree in
complex ways. I'm sure you could come up with a statistical guess based
on average name lengths, average density of nodes (i.e. how "full" they
are), etc.
Your particular case of creating a CD is actually a much simpler
problem, and you can compute an exact answer if you want. Since the
files won't be modified over time, you can guarantee that they will not
be fragmented. That means you can get by with a minimal extents B-tree
containing no leaf records. That means a single allocation block (for
the header node; the other nodes are unused and should be filled with
zeroes).
Since you know the complete set of files and directories in advance, you
can build an optimal tree by packing as many leaf records in a node as
possible, and then moving to the next node. All it requires is knowing
the order that you will assign directory IDs to directories, and then be
able to sort the file and directory names for the items in a single
directory. That way you can predict the entire leaf sequence. Once you
know the number of leaf nodes, you can calculate the number of index
nodes that will be parents of the leaf nodes, and so on up the tree
until you get to a level containing exactly one node (the root). This
should be relatively easy for HFS because the records in index nodes are
constant size, so the calculation for each level should just be a simple
divide and round up. For HFS Plus, you would have to keep track of the
actual file or directory names since the length of the keys in index
nodes vary based on the name lengths.
If that's too complicated, you could always fall back to assuming a
constant size (maximum or average) for all of the records. Don't forget
that for thread records, the key is of fixed size but the data is
variable (since it contains a variable-length string).
-Mark
From jcpearso@ps.ucl.ac.uk Tue Apr 2 11:57:31 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Tue, 02 Apr 2002 12:57:31 +0100
Subject: [hfs-user] Difference in Data types??
In-Reply-To: Your message of Fri, 29 Mar 2002 09:07:55 -0800.
<82FABBB5-4337-11D6-AEAE-00039354009A@apple.com>
Message-ID: <281412.1017748651@ourhome.freeserve.co.uk>
>Certainly no simple formula for the catalog B-tree. In part that is
>because the size of the catalog is determined in part by the lengths of
>the file and directory names (even more so on HFS Plus, where the keys
>in index nodes are variable length). And for volumes that are modified
>over time, the order of operations will affect the size of the B-tree in
>complex ways. I'm sure you could come up with a statistical guess based
>on average name lengths, average density of nodes (i.e. how "full" they
>are), etc.
> ....
>If that's too complicated, you could always fall back to assuming a
>constant size (maximum or average) for all of the records. Don't forget
>that for thread records, the key is of fixed size but the data is
>variable (since it contains a variable-length string).
That's what I did for the mkhybrid code - I didn't want the catalog "file"
to grow, so by trial and error, I set the initial size of the catalog file
to twice the "default" used by the libhfs routines in hfsutils. This seems
to work OK for virtually all cases (if this is isn't big enough, the mkhybrid
code uses a brute force approach and 're-creates' the HFS side of the file
system with a new default size twice as big again ...).
James Pearson
From entwicklung@whengenibk.de Tue Apr 2 14:33:26 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 2 Apr 2002 16:33:26 +0200
Subject: [hfs-user] Differences - HFS/HFS+
Message-ID: <000a01c1da53$5a2bdf90$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1DA64.1D2E4180
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
I'm trying to extend an HFS-volume to an HFS+ volume. =
Going by the specifications I've gathered the major differences which =
would play a role in the construction of an image.....
1) Difference in Allocation Block Size
2) Difference in basic structure of B-Tree components , MDB Vs. Volume =
Header etc. (incl. respective fields, kind of fields etc.)
3) Difference in NodeSize of the catalog
4) Thread records must be maintained even for files in HFS+
Anything else I've left out / overlooked ?=20
All I want to achieve is to modify my algos for HFS to work for HFS+ as =
well . I guess the variation in the allocation block size would help =
optimize disk space for HFS+.
Any other major / minor aspect I should be considering ?=20
Regards,
Nandini=20
------=_NextPart_000_0007_01C1DA64.1D2E4180
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
&nbs=
p; =20
I'm trying to extend an HFS-volume to an HFS+ volume. Going by the=20
specifications I've gathered the major differences which would play a =
role in=20
the construction of an image.....
1) Difference in Allocation Block =
Size
2) Difference in basic structure of =
B-Tree=20
components , MDB Vs. Volume Header etc. (incl. respective fields, kind =
of fields=20
etc.)
3) Difference in NodeSize of the=20
catalog
4) Thread records must be maintained =
even for files=20
in HFS+
Anything else I've left out / =
overlooked ?=20
All I want to achieve is to modify my =
algos for HFS=20
to work for HFS+ as well . I guess the variation in the allocation block =
size=20
would help optimize disk space for HFS+.
Any other major / minor aspect I should =
be=20
considering ?
Regards,
Nandini
------=_NextPart_000_0007_01C1DA64.1D2E4180--
From mday@apple.com Tue Apr 2 18:51:59 2002
From: mday@apple.com (Mark Day)
Date: Tue, 2 Apr 2002 10:51:59 -0800
Subject: [hfs-user] Differences - HFS/HFS+
In-Reply-To: <000a01c1da53$5a2bdf90$0400a7c0@modemserver>
Message-ID:
On Tuesday, April 2, 2002, at 06:33 AM, Entwicklung wrote:
> I'm trying to extend an HFS-volume to an HFS+ volume.
> Going by the specifications I've gathered the major differences which
> would play a role in the construction of an image.....
>
> 1) Difference in Allocation Block Size
> 2) Difference in basic structure of B-Tree components , MDB Vs. Volume
> Header etc. (incl. respective fields, kind of fields etc.)
> 3) Difference in NodeSize of the catalog
> 4) Thread records must be maintained even for files in HFS+
>
> Anything else I've left out / overlooked ?
The keys in index nodes of an HFS Plus catalog are variable sized (based
on the actual length of the string part of the key). If the keys are
longer than they need to be (i.e. you have bytes in the key beyond the
end of the string), the disk isn't technically corrupt, but it is
wasteful, and some repair utilities will complain.
If you're modifying an existing HFS Plus catalog, this leads to a
behavior that may be surprising. Deleting a file or directory can cause
the catalog B-tree to grow. If you end up deleting the first key in a
leaf node, that key needs to be replaced in its parent (an index node),
and perhaps other ancestors. If the replacement key is longer, there
might not be room in the index nodes, so they may have to split.
For mastering read-only volumes, you may not have to worry about that.
You could just build up the leaf sequence directly, and then each of the
levels of index nodes.
-Mark
From entwicklung@whengenibk.de Thu Apr 4 13:44:00 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 4 Apr 2002 15:44:00 +0200
Subject: [hfs-user] Problems with HFS+ empty volume...
Message-ID: <000a01c1dbde$c750aba0$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1DBEF.8A5D94E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
I just wanted to check if anyone knows if it is =
essential to have an empty B-Tree for the attribute and startup file in =
an HFS+ image. In case of HFS these weren't present in my image. In case =
of HFS+ I've increased the node size of the catalog to 4kB and included =
the other changes as discussed. Only thing I haven't done is to create a =
B-Tree for the attributes file and the start up file - in short I'm not =
writing anything into the image for these and have set the respective =
extents, sizes setc. to 0 in the Volume Header. Is this right or should =
these be present in the image as 'empty' B-Trees ???
I'm right now creating an empty volume with 0 contents but just the =
basic structures needed (the way I started off for HFS). The only =
problem is that I don't have any utilities to create sample HFS+ images =
which I can cross-check my image with.... Disk Copy on my iMac with =
MacOS 9 creates only HFS-Volumes by default and Norton Disk Doctor on my =
Mac recognizes the volume as MacOS Extended but doesn't really bring me =
any further (since my Mac is unable to mount the volume). There seems to =
be a hfsplus reader on Sourceforge since the end of last year but I need =
something like a sample hfsplus writer. Any idea if sth like this exists =
on the Mac or on other platforms. My Mac has just a CD-drive (no writer) =
and no floppy drive which make file transfer as cumbersome as it can =
get.
Any idea why this fails ? Would be glad for any suggestions/tips...
Regards,
Nandini=20
------=_NextPart_000_0007_01C1DBEF.8A5D94E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
I just wanted to check if anyone knows if it is essential to have =
an empty=20
B-Tree for the attribute and startup file in an HFS+ image. In case of =
HFS these=20
weren't present in my image. In case of HFS+ I've increased the node =
size of the=20
catalog to 4kB and included the other changes as discussed. Only thing I =
haven't=20
done is to create a B-Tree for the attributes file and the start up file =
- in=20
short I'm not writing anything into the image for these and have set the =
respective extents, sizes setc. to 0 in the Volume Header. Is this right =
or=20
should these be present in the image as 'empty' B-Trees ???
I'm right now creating an empty volume =
with 0=20
contents but just the basic structures needed (the way I started off for =
HFS). The only problem is that I don't have any utilities to create =
sample HFS+ images which I can cross-check my image with.... Disk =
Copy on=20
my iMac with MacOS 9 creates only HFS-Volumes by default and Norton Disk =
Doctor=20
on my Mac recognizes the volume as MacOS Extended but doesn't =
really bring=20
me any further (since my Mac is unable to mount the volume). There seems =
to be a=20
hfsplus reader on Sourceforge since the end of last year but I need =
something=20
like a sample hfsplus writer. Any idea if sth like this exists on the =
Mac or on=20
other platforms. My Mac has just a CD-drive (no writer) and no floppy =
drive=20
which make file transfer as cumbersome as it can get.
Any idea why this fails ? =
Would be glad for any =
suggestions/tips...
Regards,
Nandini
------=_NextPart_000_0007_01C1DBEF.8A5D94E0--
From entwicklung@whengenibk.de Fri Apr 5 10:02:37 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 5 Apr 2002 12:02:37 +0200
Subject: Fw: [hfs-user] Problems with HFS+ empty volume...
Message-ID: <002001c1dc89$0494b790$0400a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_001D_01C1DC99.C750C1B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
I would be grateful to anyone who could just take a =
look at the following code ( for the HFS+ Volume Header) and let me know =
if there are any major defects. I'm having a problem detecting the point =
of failure - the volume contains 0 files or directories and is not even =
getting mounted.
Could it be that not setting the attributes file and startupfile to =
anthing is creating some problem ?
I'm probably missing out on something basic here and am not able to =
proceed...please help if you can.
Regards,
Nandini
=20
HFSPlusVolumeHeader myVolumeHeader;=20
myVolHeader.signature=3DkHFSPlusSigWord;
myVolHeader.version=3DkHFSPlusVersion;// current version is =
kHFSPlusVersion=20
myVolHeader.attributes=3D0x0100; // volume attributes=20
myVolHeader.lastMountedVersion=3DkHFSPlusMountVersion; // =
implementation version which last mounted volume=20
myVolHeader.reserved=3D0; // reserved - set to zero=20
myVolHeader.createDate=3DVolCrDate; // date and time of =
volume creation=20
myVolHeader.modifyDate=3DVolCrDate; // date and time of =
last modification=20
myVolHeader.backupDate=3DVolCrDate; // date and time of =
last backup=20
myVolHeader.checkedDate=3DVolCrDate; // date and time of =
last disk check=20
myVolHeader.fileCount=3D0; // number of files in volume=20
myVolHeader.folderCount=3D0; // number of directories in volume=20
myVolHeader.blockSize=3D512; // size (in bytes) of allocation =
blocks=20
myVolHeader.totalBlocks=3D28;/*assuming =20
allocation block=3D 512 bytes; number of allocation blocks in volume =
(includes this header and VBM)*/
myVolHeader.freeBlocks=3D0; // number of unused allocation =
blocks=20
myVolHeader.nextAllocation=3D0; // start of next allocation =
search=20
myVolHeader.rsrcClumpSize=3D512; // default resource fork clump =
size=20
myVolHeader.dataClumpSize=3D512; // default data fork clump =
size=20
myVolHeader.nextCatalogID=3D0x00000000; // next unused catalog =
node ID=20
myVolHeader.writeCount=3D0x00000000; // volume write count=20
myVolHeader.encodingsBitmap[0]=3D0x00000000; // which encodings =
have been used on this volume=20
myVolHeader.encodingsBitmap[1]=3D0x00000000;
=20
for(int i=3D0;i<32;i++)
myVolHeader.finderInfo[i]=3D0x00; // information used by the =
Finder=20
myVolHeader.allocationFile.clumpSize=3D512; // allocation =
bitmap file=20
myVolHeader.allocationFile.extents[0].blockCount=3D1;
myVolHeader.allocationFile.extents[0].startBlock=3D3;
for(i=3D1;i<8;i++)
{=20
myVolHeader.allocationFile.extents[i].blockCount=3D0;
myVolHeader.allocationFile.extents[i].startBlock=3D0;
}
myVolHeader.allocationFile.logicalSize[0]=3D0;
myVolHeader.allocationFile.logicalSize[1]=3D512;
myVolHeader.allocationFile.totalBlocks=3D1;
=20
myVolHeader.extentsFile.clumpSize=3D512; // extents B-tree =
file=20
myVolHeader.extentsFile.extents[0].blockCount=3D4;
myVolHeader.extentsFile.extents[0].startBlock=3D4;=20
for(i=3D1;i<8;i++)
{=20
myVolHeader.extentsFile.extents[i].blockCount=3D0;
myVolHeader.extentsFile.extents[i].startBlock=3D0;
}
myVolHeader.extentsFile.logicalSize[0]=3D0;
myVolHeader.extentsFile.logicalSize[1]=3D512*4;
myVolHeader.extentsFile.totalBlocks=3D4;
=20
myVolHeader.catalogFile.clumpSize=3D512; // catalog B-tree =
file=20
myVolHeader.catalogFile.extents[0].blockCount=3D4*4;
=
myVolHeader.catalogFile.extents[0].startBlock=3DmyVolHeader.extentsFile.e=
xtents[0].startBlock+4;
for(i=3D1;i<8;i++)
{=20
myVolHeader.catalogFile.extents[i].blockCount =3D0;
myVolHeader.catalogFile.extents[i].startBlock=3D0;
}
myVolHeader.catalogFile.logicalSize[0]=3D0;
myVolHeader.catalogFile.logicalSize[1]=3D512*4*4;
myVolHeader.catalogFile.totalBlocks=3D4*4;
=20
myVolHeader.attributesFile.clumpSize=3D512; // extended =
attributes B-tree file=20
for(i=3D0;i<8;i++)
{ =20
myVolHeader.attributesFile.extents[i].blockCount=3D0;
myVolHeader.attributesFile.extents[i].startBlock=3D0;
}
myVolHeader.attributesFile.logicalSize[0]=3D0;
myVolHeader.attributesFile.logicalSize[1]=3D0;
myVolHeader.attributesFile.totalBlocks=3D0;
=20
myVolHeader.startupFile.clumpSize=3D512; // boot file=20
for(i=3D0;i<8;i++)
{=20
myVolHeader.startupFile.extents[i].blockCount=3D0;
myVolHeader.startupFile.extents[i].startBlock=3D0;
}
myVolHeader.startupFile.logicalSize[0]=3D0;
myVolHeader.startupFile.logicalSize[1]=3D0;
myVolHeader.startupFile.totalBlocks=3D0;
=20
----- Original Message -----=20
From: Entwicklung=20
To: hfs-user@lists.mars.org=20
Sent: Thursday, April 04, 2002 3:44 PM
Subject: [hfs-user] Problems with HFS+ empty volume...
Hello Listers,
I just wanted to check if anyone knows if it is =
essential to have an empty B-Tree for the attribute and startup file in =
an HFS+ image. In case of HFS these weren't present in my image. In case =
of HFS+ I've increased the node size of the catalog to 4kB and included =
the other changes as discussed. Only thing I haven't done is to create a =
B-Tree for the attributes file and the start up file - in short I'm not =
writing anything into the image for these and have set the respective =
extents, sizes setc. to 0 in the Volume Header. Is this right or should =
these be present in the image as 'empty' B-Trees ???
=20
I'm right now creating an empty volume with 0 contents but just the =
basic structures needed (the way I started off for HFS). The only =
problem is that I don't have any utilities to create sample HFS+ images =
which I can cross-check my image with.... Disk Copy on my iMac with =
MacOS 9 creates only HFS-Volumes by default and Norton Disk Doctor on my =
Mac recognizes the volume as MacOS Extended but doesn't really bring me =
any further (since my Mac is unable to mount the volume). There seems to =
be a hfsplus reader on Sourceforge since the end of last year but I need =
something like a sample hfsplus writer. Any idea if sth like this exists =
on the Mac or on other platforms. My Mac has just a CD-drive (no writer) =
and no floppy drive which make file transfer as cumbersome as it can =
get.
Any idea why this fails ? Would be glad for any suggestions/tips...
Regards,
Nandini=20
------=_NextPart_000_001D_01C1DC99.C750C1B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
I would be grateful to anyone who could just take a look at the =
following code (=20
for the HFS+ Volume Header) and let me know if there are any major =
defects. I'm=20
having a problem detecting the point of failure - the volume contains 0 =
files or=20
directories and is not even getting mounted.
Could it be that not setting the =
attributes file=20
and startupfile to anthing is creating some problem ?
I'm probably missing out on something =
basic here=20
and am not able to proceed...please help if you can.
Regards,
Nandini
HFSPlusVolumeHeader myVolumeHeader; =
=20
myVolHeader.signature=3DkHFSPlusSigWord;
=20
myVolHeader.version=3DkHFSPlusVersion;// current version is =
kHFSPlusVersion=20
=20
myVolHeader.attributes=3D0x0100;  =
; =20
// volume attributes
=20
myVolHeader.lastMountedVersion=3DkHFSPlusMountVersion; =
//=20
implementation version which last mounted volume
=20
myVolHeader.reserved=3D0; =
=20
// reserved - set to zero
=20
myVolHeader.createDate=3DVolCrDate; &n=
bsp; =20
// date and time of volume creation
=20
myVolHeader.modifyDate=3DVolCrDate; &n=
bsp; =20
// date and time of last modification
=20
myVolHeader.backupDate=3DVolCrDate; &n=
bsp; =20
// date and time of last backup
=20
myVolHeader.checkedDate=3DVolCrDate; &=
nbsp; =20
// date and time of last disk check
=20
myVolHeader.fileCount=3D0; // =
number of=20
files in volume
=20
myVolHeader.folderCount=3D0; // =
number of=20
directories in volume
=20
myVolHeader.blockSize=3D512; &nb=
sp; =20
// size (in bytes) of allocation blocks
=20
myVolHeader.totalBlocks=3D28;/*assuming
allocation block=3D 512 =
bytes; number of=20
allocation blocks in volume (includes this header and VBM)*/
=20
myVolHeader.freeBlocks=3D0; &nbs=
p; =20
// number of unused allocation blocks
=20
myVolHeader.nextAllocation=3D0; // =
start of=20
next allocation search
=20
myVolHeader.rsrcClumpSize=3D512;  =
; //=20
default resource fork clump size
=20
myVolHeader.dataClumpSize=3D512;  =
; //=20
default data fork clump size
=20
myVolHeader.nextCatalogID=3D0x00000000; &nbs=
p; =20
// next unused catalog node ID
=20
myVolHeader.writeCount=3D0x00000000; &=
nbsp; =20
// volume write count
=20
myVolHeader.encodingsBitmap[0]=3D0x00000000;  =
; =20
// which encodings have been used on this volume
=20
myVolHeader.encodingsBitmap[1]=3D0x00000000;
=
for(int=20
i=3D0;i<32;i++)
myVolHeader.finderInfo[i]=3D0x00; =
=20
// information used by the Finder
=20
myVolHeader.allocationFile.clumpSize=3D512; =
=20
// allocation bitmap file
=20
myVolHeader.allocationFile.extents[0].blockCount=3D1;
=20
myVolHeader.allocationFile.extents[0].startBlock=3D3;
=20
for(i=3D1;i<8;i++)
{
=20
myVolHeader.allocationFile.extents[i].blockCount=3D0;
&nbs=
p;=20
myVolHeader.allocationFile.extents[i].startBlock=3D0;
=
}
=20
myVolHeader.allocationFile.logicalSize[0]=3D0;
=20
myVolHeader.allocationFile.logicalSize[1]=3D512;
=20
myVolHeader.allocationFile.totalBlocks=3D1;
=20
myVolHeader.extentsFile.clumpSize=3D512; &nb=
sp; =20
// extents B-tree file
=20
myVolHeader.extentsFile.extents[0].blockCount=3D4;
=20
myVolHeader.extentsFile.extents[0].startBlock=3D4;
=20
for(i=3D1;i<8;i++)
{
=20
myVolHeader.extentsFile.extents[i].blockCount=3D0;
=20
myVolHeader.extentsFile.extents[i].startBlock=3D0;
}
=
myVolHeader.extentsFile.logicalSize[0]=3D0;
=20
myVolHeader.extentsFile.logicalSize[1]=3D512*4;
=20
myVolHeader.extentsFile.totalBlocks=3D4;
=20
myVolHeader.catalogFile.clumpSize=3D512; &nb=
sp; =20
// catalog B-tree file
=20
myVolHeader.catalogFile.extents[0].blockCount=3D4*4;
=20
myVolHeader.catalogFile.extents[0].startBlock=3DmyVolHeader.extentsFile.e=
xtents[0].startBlock+4;
=20
for(i=3D1;i<8;i++)
{=20
myVolHeader.catalogFile.extents[i].blockCount=20
=3D0;
myVolHeader.catalogFile.extents[i].startBlock=3D0;
&nbs=
p;=20
}
myVolHeader.catalogFile.logicalSize[0]=3D0;
=20
myVolHeader.catalogFile.logicalSize[1]=3D512*4*4;
=20
myVolHeader.catalogFile.totalBlocks=3D4*4;
=20
myVolHeader.attributesFile.clumpSize=3D512; =
=20
// extended attributes B-tree file
=
for(i=3D0;i<8;i++)
=20
{ =20
myVolHeader.attributesFile.extents[i].blockCount=3D0;
=
myVolHeader.attributesFile.extents[i].startBlock=3D0;
=20
}
myVolHeader.attributesFile.logicalSize[0]=3D0;
=20
myVolHeader.attributesFile.logicalSize[1]=3D0;
=20
myVolHeader.attributesFile.totalBlocks=3D0;
=20
myVolHeader.startupFile.clumpSize=3D512; &nb=
sp; =20
// boot file
for(i=3D0;i<8;i++)
{=20
myVolHeader.startupFile.extents[i].blockCount=3D0;
myV=
olHeader.startupFile.extents[i].startBlock=3D0;
=20
}
myVolHeader.startupFile.logicalSize[0]=3D0;
=20
myVolHeader.startupFile.logicalSize[1]=3D0;
=20
myVolHeader.startupFile.totalBlocks=3D0;
=
----- Original Message -----
Sent: Thursday, April 04, 2002 =
3:44=20
PM
Subject: [hfs-user] Problems =
with HFS+=20
empty volume...
Hello Listers,
&nbs=
p; =20
I just wanted to check if anyone knows if it is essential to have =
an=20
empty B-Tree for the attribute and startup file in an HFS+ image. In =
case of=20
HFS these weren't present in my image. In case of HFS+ I've increased =
the node=20
size of the catalog to 4kB and included the other changes as =
discussed. Only=20
thing I haven't done is to create a B-Tree for the attributes file and =
the=20
start up file - in short I'm not writing anything into the image for =
these and=20
have set the respective extents, sizes setc. to 0 in the Volume =
Header. Is=20
this right or should these be present in the image as 'empty' B-Trees=20
???
I'm right now creating an empty =
volume with 0=20
contents but just the basic structures needed (the way I started off =
for=20
HFS). The only problem is that I don't have any utilities to =
create=20
sample HFS+ images which I can cross-check my image with.... Disk =
Copy on=20
my iMac with MacOS 9 creates only HFS-Volumes by default and Norton =
Disk=20
Doctor on my Mac recognizes the volume as MacOS Extended =
but doesn't=20
really bring me any further (since my Mac is unable to mount the =
volume).=20
There seems to be a hfsplus reader on Sourceforge since the end of =
last year=20
but I need something like a sample hfsplus writer. Any idea if sth =
like this=20
exists on the Mac or on other platforms. My Mac has just a CD-drive =
(no=20
writer) and no floppy drive which make file transfer as cumbersome as =
it can=20
get.
Any idea why this fails ? =
Would be glad for any =
suggestions/tips...
Regards,
Nandini
------=_NextPart_000_001D_01C1DC99.C750C1B0--
From mday@apple.com Fri Apr 5 16:59:35 2002
From: mday@apple.com (Mark Day)
Date: Fri, 5 Apr 2002 08:59:35 -0800
Subject: [hfs-user] Problems with HFS+ empty volume...
In-Reply-To: <000a01c1dbde$c750aba0$0400a7c0@modemserver>
Message-ID: <81D6E2A7-48B6-11D6-BCBC-00039354009A@apple.com>
On Thursday, April 4, 2002, at 05:44 AM, Entwicklung wrote:
> I just wanted to check if anyone knows if it is
> essential to have an empty B-Tree for the attribute and startup file in
> an HFS+ image. In case of HFS these weren't present in my image. In
> case of HFS+ I've increased the node size of the catalog to 4kB and
> included the other changes as discussed. Only thing I haven't done is
> to create a B-Tree for the attributes file and the start up file - in
> short I'm not writing anything into the image for these and have set
> the respective extents, sizes setc. to 0 in the Volume Header. Is this
> right or should these be present in the image as 'empty' B-Trees ???
Just leave them with zero length and zeroes for the extents.
The Attributes B-tree has never been used, nor even fully designed; it
was left as a placeholder so we could extend the volume format in the
future.
The Startup file would typically be used for extra code or data needed
early in booting (perhaps before you've loaded enough code to search the
catalog or extents B-trees). It typically wouldn't be a B-tree at all.
> The only problem is that I don't have any utilities to create
> sample HFS+ images which I can cross-check my image with.... Disk Copy
> on my iMac with MacOS 9 creates only HFS-Volumes by default
In Mac OS 9, use Disk Copy to create a read/write disk image that is at
least 32MB. That is the minimum size volume that Mac OS 9 will format
as HFS Plus (though it should recognize smaller volumes).
-Mark
From entwicklung@whengenibk.de Sat Apr 6 12:50:05 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sat, 6 Apr 2002 14:50:05 +0200
Subject: Fw: [hfs-user] Problems with HFS+ empty volume...
References:
Message-ID: <001201c1dd69$940ed870$0400a7c0@modemserver>
Hello Mark,
> myVolHeader.lastMountedVersion=kHFSPlusMountVersion; //
> implementation version which last mounted volume
You should pick some other constant unique to your implementation. That
way, if a bug is found in your implementation, other implementations can
check this version to correct for the bug.
In my case I've reset kHFSPlusMountVersion to my own unique creator-code
registered with Apple (it doesn't hold '8.10' in my case)
> myVolHeader.folderCount=0; // number of directories in volume
That may be wrong. I can't remember whether the folder count includes
the root directory.
The HFS+ TN says that it doesn't include the root folder.
> myVolHeader.nextCatalogID=0x00000000; // next unused catalog
> node ID
That number should be at least 16 (the minimum ID for ordinary files and
folders).
In case of HFS I just played around with these values and set this field to
0. This didn't affect readability in any way and my volume is a read-only
medium so no further CNID's will be assigned. This was why I've set it to 0
for HFS+ too... maybe some extra check is being made in case of HFS+ so I'll
change this to 16.
> myVolHeader.encodingsBitmap[0]=0x00000000; // which encodings
> have been used on this volume
> myVolHeader.encodingsBitmap[1]=0x00000000;
You should probably set at least bit 0 of the first field. That
corresponds to the MacRoman encoding, which is the fallback when other
encodings don't work.
OK.. I'll do that
In general, if you're mastering CDs, the physical sector size will be
2048 bytes per sector. You might as well make the allocation block size
and clump sizes 2048 as well. That way, one sector is one block, and
the math is a little easier. On Mac OS X, performance may be slightly
better if the allocation block size is 4096 (the same as its VM page
size); of course you'd only do this if you can fit all of your data in
4KB allocation blocks.
It's true that the math is a little easier but making the allocation block
bigger would not
particulary help in space-saving, would it ? In case of a CD of 650MB there
isn't much of space-saving in case of HFS+ anyway but after reading the
Specs and browsing a number of websites I came to the conclusion that my
allocation block size should be 'as small as possible and as large as
necessary'. Do correct me if I'm wrong..... In case of HFS I don't have have
a choice but for HFS+ it shouldn't be a problem setting the block-size to
512 even for images greater in size than 32MB, should it ?
I thought that was the major improvement of HFS+ over HFS.
> The only problem is that I don't have any utilities to create
> sample HFS+ images which I can cross-check my image with.... Disk Copy
> on my iMac with MacOS 9 creates only HFS-Volumes by default
In Mac OS 9, use Disk Copy to create a read/write disk image that is at
least 32MB. That is the minimum size volume that Mac OS 9 will format
as HFS Plus (though it should recognize smaller volumes).
I just tried this out ... It works fine for volumes >32MB. Thanks !
Btw. yesterday I also came across a software MacOpener 2000 which creates
HFS+ images. After a large no. of searches this was practically the only
cross-platform tool I came across which can supposedly read and write HFS+
volumes (not freeware however). I would have probably considered buying it
if I hadn't got this bit of info from you.... but maybe someone else on the
list can make use of it after all...
Regards,
Nandini
From mday@apple.com Mon Apr 8 17:33:46 2002
From: mday@apple.com (Mark Day)
Date: Mon, 8 Apr 2002 09:33:46 -0700
Subject: Fw: [hfs-user] Problems with HFS+ empty volume...
In-Reply-To: <001201c1dd69$940ed870$0400a7c0@modemserver>
Message-ID: <65E99238-4B0E-11D6-A93A-00039354009A@apple.com>
I Wrote:
> In general, if you're mastering CDs, the physical sector size will be
> 2048 bytes per sector. You might as well make the allocation block size
> and clump sizes 2048 as well. That way, one sector is one block, and
> the math is a little easier. On Mac OS X, performance may be slightly
> better if the allocation block size is 4096 (the same as its VM page
> size); of course you'd only do this if you can fit all of your data in
> 4KB allocation blocks.
On Saturday, April 6, 2002, at 04:50 AM, Entwicklung wrote:
> It's true that the math is a little easier but making the allocation
> block
> bigger would not
> particulary help in space-saving, would it ? In case of a CD of 650MB
> there
> isn't much of space-saving in case of HFS+ anyway but after reading the
> Specs and browsing a number of websites I came to the conclusion that my
> allocation block size should be 'as small as possible and as large as
> necessary'.
If there is any overall savings, it would only be a few hundred
kilobytes (due to a smaller volume bitmap). It might actually take more
space if you had lots of small files (due to rounding up to whole
allocation blocks).
The point was more that if you're already aligning the data to 2KB
boundaries (for performance, or because you're making a hybrid CD, for
example), there isn't any point in using a smaller allocation block
size. Remember that the CD driver will have to read entire 2KB blocks;
if allocation blocks aren't aligned on sector boundaries, it will end up
having to read one or two sectors, extract just the relevant data, and
copy it for the filesystem (which may have to copy it again to user
space). The performance degradation is more noticeable on writable
media, where a simple write turns into read-modify-write. But it does
add up for read-only media.
If you're going to have an HFS wrapper, it would be a good idea to align
the start of the embedded volume on a sector boundary. You can do that
by increasing the allocation block start in the wrapper's MDB. FYI,
older versions of Norton Disk Doctor will incorrectly complain about
such a volume.
> In case of HFS I don't have have
> a choice but for HFS+ it shouldn't be a problem setting the block-size
> to
> 512 even for images greater in size than 32MB, should it ?
> I thought that was the major improvement of HFS+ over HFS.
The allocation block size can be 512 for volume sizes up to 2 terabytes.
When we were developing HFS Plus, we sampled the hard disks of a variety
of users. We recorded the size of every file on their (HFS) hard disk.
We then computed the space savings for various allocation block sizes.
There was a definite "knee" where further decreases in allocation block
size yielded relatively little additional space savings. That knee was
centered at about 4KB, extending to 2KB or 8KB depending on the primary
use of the computer. I was personally surprised at that result; I
assumed we'd continue to see noticeable savings all the way down to 512
byte allocation blocks. As Mac OS X becomes more widely adopted, the
distribution of file sizes will probably change and move the "knee" a
bit.
When we first shipped HFS Plus in Mac OS 8.1, we varied the default
allocation block size from 512 to 4KB, depending on total volume size.
The cutover to 4KB allocation blocks was for volumes 1GB or larger.
Just before Mac OS X came out, we decreased the cutover point so that
volumes 256KB and larger would use 4KB allocation blocks (because early
versions of Mac OS X had a definite performance gain with allocation
blocks that were a multiple of 4KB; the difference is less in current
versions).
Later, in Mac OS 9.1 or 9.2, we added a default allocation block size of
8KB for volumes 220GB or larger. It turned out that the size of the
volume bitmap was becoming a significant factor in writing performance
(specifically, allocating space to files). When the size of the bitmap
got close to or exceeded the size of the disk cache, allocation
performance slowed dramatically. It also tended to push user data out
of the disk cache, leading to a subsequent reduction in hit rates. Of
course this won't affect read-only media, but it may be of interest for
people putting HFS Plus on writable media.
-Mark
From entwicklung@whengenibk.de Thu Apr 11 10:49:50 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 11 Apr 2002 11:49:50 +0200
Subject: Fw: [hfs-user] Problems with HFS+ empty volume...
References: <65E99238-4B0E-11D6-A93A-00039354009A@apple.com>
Message-ID: <000e01c1e13e$3a5c6440$0401a7c0@modemserver>
Hello,
> The point was more that if you're already aligning the data to 2KB
> boundaries (for performance, or because you're making a hybrid CD, for
> example), there isn't any point in using a smaller allocation block
> size. Remember that the CD driver will have to read entire 2KB blocks;
> if allocation blocks aren't aligned on sector boundaries, it will end up
> having to read one or two sectors, extract just the relevant data, and
> copy it for the filesystem (which may have to copy it again to user
> space). The performance degradation is more noticeable on writable
> media, where a simple write turns into read-modify-write. But it does
> add up for read-only media.
I get it... it's ultimately a question of whether one wants to save a bit of
space
at the cost of performance. Thanks for the info - I wasn't even aware that
allocation
block size would affect the performance... and for a CD where space saving
in HFS+
is anyway only a little, I guess performance does play an important role.
> If you're going to have an HFS wrapper, it would be a good idea to align
> the start of the embedded volume on a sector boundary. You can do that
> by increasing the allocation block start in the wrapper's MDB. FYI,
> older versions of Norton Disk Doctor will incorrectly complain about
> such a volume.
How much of effort is involved in having a HFS-Wrapper ? Right now I've just
initialized a pure HFS+ volume without a HFS-Wrapper.... It's working now
btw. ! :)...
>From the previous mailing-list responses I had come to the conclusion that a
wrapper would be necessary since older Macs would then say - The files
cannot be read because it's in HFS+ format -
or something similar. And in case of having no wrapper it would ask if the
CD has to be formatted.
I guess I could also decide not to have a wrapper since if a user decides to
format a CD and clicks 'yes' it's pretty obvious that no data can be
recovered from the disk after formatting a CD-RW for eg.
If I were to have a Wrapper does it mean that I'd have an external HFS
volume in which a HFS+
volume is embedded ? If that is the case - would allocation block no. etc
inside the embedded volume vary relative to the start of the embedded volume
? Do I need a partition map for this? (stupid question probably but was just
wondering if these wouldn't be considered as 'two' volumes)
> When we were developing HFS Plus, we sampled the hard disks of a variety
> of users. We recorded the size of every file on their (HFS) hard disk.
> We then computed the space savings for various allocation block sizes.
> There was a definite "knee" where further decreases in allocation block
> size yielded relatively little additional space savings. That knee was
> centered at about 4KB, extending to 2KB or 8KB depending on the primary
> use of the computer. I was personally surprised at that result; I
> assumed we'd continue to see noticeable savings all the way down to 512
> byte allocation blocks. As Mac OS X becomes more widely adopted, the
> distribution of file sizes will probably change and move the "knee" a
> bit.
Thanks for the insider info - it's quite fascinating to note which factors
and design
considerations do play a role in developing a FS format ....
Regards,
Nandini
From Biswaroop\(External\)"
This is a multi-part message in MIME format.
------=_NextPart_000_0029_01C1E175.2C2797A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi everybody,
I was going thru all the mails posted by Nandini and Mark
giving us information about HFS and HFS+ and wrappers.
=20
This is just a inquisitive question. Some days back
it was said HFS + has B- trees where as HFS has
B* trees.=20
Then in older Macs if we read a filesystem of type
HFS+ in a HFS wrapper, do that wrapper also
take care for the internal differences in Data structures.
=20
A more summary of this wrapper concept would
satisfy my interest. Anybody can just give a more
basic understanding of this Wrapper and its functionalities would be =
wonderfull.
Wating for them..
Bye
Biswaroop
The difference between sunrise and=20
sunset lies in the freshness of your
eyes.
--Bisban
------=_NextPart_000_0029_01C1E175.2C2797A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi everybody,
I was going thru all the mails =
posted by=20
Nandini and Mark
giving us information about HFS =
and HFS+ and=20
wrappers.
This is just a inquisitive =
question.=20
Some days back
it was said HFS + has B- =
trees where=20
as HFS has
B* trees.
Then in older Macs if we =
read a=20
filesystem of type
HFS+ in a HFS wrapper, do =
that wrapper=20
also
take care for the internal =
differences=20
in Data structures.
A more summary of =
this wrapper=20
concept would
satisfy my interest. =
Anybody can=20
just give a more
basic understanding =
of this=20
Wrapper and its functionalities would be wonderfull.
Wating for =
them..
Bye
Biswaroop
The difference between sunrise and =
sunset lies=20
in the freshness of=20
your
eyes.
&n=
bsp; &nb=
sp; =20
--Bisban
------=_NextPart_000_0029_01C1E175.2C2797A0--
From entwicklung@whengenibk.de Thu Apr 11 14:30:17 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 11 Apr 2002 15:30:17 +0200
Subject: [hfs-user] Index / Leaf nodes - help needed..
Message-ID: <000a01c1e15d$06678420$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1E16D.C8CF7AD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
Unfortunately I seem to be stuck again - I tried =
creating a volume with 601 files. In my case this requires one level of =
leaf-nodes and 3 levels of index nodes (including the root level ). Of =
these 601 files
I'm not able to read 16 files . My tree looks like this :
Root points to IndexNodeA1 and IndexNodeA2.
IndexNodeA1 contains pointer records to IndexNodesB1..11
IndexNodeA2 contains pointer records to IndexNodesB12..17
Here's where the problem seems to arise:
IndexNodeB16 and IndexNodeB17 contain pointers to leaf-nodes L1..11 and =
L12..17 each
Of these the data present in the leaf-nodes L9,L10 and L11 as well as =
that present in L15, L16 and L17seems to getting lost. In short the =
final three pointer records present in the lowest level index node (only =
in the last 2 of the 17 index nodes however) seems to be getting lost. =
The funny part is L15 contains 3 catalog-file records of which the first =
one is again readable but the other two aren't.=20
My point of view:=20
1. As was mentioned in a previous email, since the leaves are gone thru' =
first, all the file-icons are displayed correctly on the Mac. Then the =
index nodes are traversed.=20
2. The problem cannot lie in the root or A level index nodes since part =
of the data pointed to by each of the B-level index nodes get dispayed =
correctly. If there was some mistake in the Ptr records present in level =
A then one would expect that none of the leaf nodes pointed to by a =
particular B-level node appear correctly.
3. I also checked the record offsets at the end of the nodes and the =
keylengths.All my keys are sorted. I don't have any thread records at =
the moment. Under linux hfsutils seems to be able to read all files =
present in L15,L16 and L17 without any problem though my Mac refuses to =
read any other than the first file in L15. (Error -60)
I'm in a fix right now since I don't know what this is due to or how =
exactly to isolate this error. My mode of generating the index nodes is =
quite generic so I would expect an error to either repeat itself more =
frequently or no error to appear... I need some professional help from =
anyone who could take a look at my problem and offer some suggestions. I =
wanted to attach an image but it is a little large to openly post on the =
list to everyone. If anyone would like to take a look at it please let =
me know... would be glad if someone could help.
Regards,
Nandini
=20
=20
------=_NextPart_000_0007_01C1E16D.C8CF7AD0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
Unfortunately I seem to be stuck again - I tried creating a volume with =
601=20
files. In my case this requires one level of leaf-nodes and 3 levels of =
index=20
nodes (including the root level ). Of these 601 files
I'm not able to read 16 files . My tree =
looks like=20
this :
Root points to IndexNodeA1 and=20
IndexNodeA2.
IndexNodeA1 contains pointer records to =
IndexNodesB1..11
IndexNodeA2 contains pointer records to =
IndexNodesB12..17
Here's where the problem seems to=20
arise:
IndexNodeB16 and IndexNodeB17 contain =
pointers to=20
leaf-nodes L1..11 and L12..17 each
Of these the data present in the =
leaf-nodes L9,L10=20
and L11 as well as that present in L15, L16 and L17seems to getting =
lost. In=20
short the final three pointer records present in the lowest level index =
node=20
(only in the last 2 of the 17 index nodes however) seems to be getting =
lost. The=20
funny part is L15 contains 3 catalog-file records of which the first one =
is=20
again readable but the other two aren't.
My point of view:
1. As was mentioned in a previous =
email, since the=20
leaves are gone thru' first, all the file-icons are =
displayed correctly on=20
the Mac. Then the index nodes are traversed.
2. The problem cannot lie in the root =
or A level=20
index nodes since part of the data pointed to by each of the B-level =
index nodes=20
get dispayed correctly. If there was some mistake in the Ptr =
records=20
present in level A then one would expect that none of the leaf nodes pointed to by a particular B-level =
node appear=20
correctly.
3. I also checked the record offsets at =
the end of=20
the nodes and the keylengths.All my keys are sorted. I don't have any =
thread=20
records at the moment. Under linux hfsutils seems to be able to =
read all=20
files present in L15,L16 and L17 without any problem though my Mac refuses to read any other than the =
first file in=20
L15. (Error -60)
I'm in a fix right now since I don't =
know what this=20
is due to or how exactly to isolate this error. My mode of generating =
the index=20
nodes is quite generic so I would expect an error to either repeat=20
itself more frequently or no error to appear... I need some =
professional=20
help from anyone who could take a look at my problem and offer some =
suggestions. I wanted to attach an image but it is a little large =
to openly=20
post on the list to everyone. If anyone would like to take a look at it =
please=20
let me know... would be glad if someone could help.
Regards,
Nandini
------=_NextPart_000_0007_01C1E16D.C8CF7AD0--
From mday@apple.com Thu Apr 11 18:21:21 2002
From: mday@apple.com (Mark Day)
Date: Thu, 11 Apr 2002 10:21:21 -0700
Subject: [hfs-user] HFS and HFS+ wrapper
In-Reply-To: <002c01c1e147$158bdde0$1c0a0a0a@bisban>
Message-ID: <8AB44373-4D70-11D6-AF9D-00039354009A@apple.com>
On Thursday, April 11, 2002, at 03:53 AM, Biswaroop(External) wrote:
> Then in older Macs if we read a filesystem of type
> HFS+ in a HFS wrapper, do that wrapper also
> take care for the internal differences in Data structures.
>
> A more summary of this wrapper concept would
> satisfy my interest. Anybody can just give a more
> basic understanding of this Wrapper and its functionalities would
> be wonderfull.
A wrapper does NOT allow files on the HFS Plus volume to be accessed as
an HFS volume. It's not like a hybrid ISO/HFS disk where the same
content appears in both directory structures. If we had been able to
make the increased storage efficiency of HFS Plus accessible using HFS
directory structures, we wouldn't have needed to invent a new volume
format...
A wrapper is merely a way to store an HFS Plus volume inside an HFS
volume. It is sort of like the way a DOS disk can have primary
partitions that contain secondary partitions. It is an HFS volume where
some contiguous but otherwise unused space has been set aside to contain
an HFS Plus volume. It helps solve a couple of backwards compatibility
problems:
1. Improve the user experience on systems that don't understand HFS Plus
Consider what would happen if you took a pure HFS Plus volume (no
wrapper) and tried to mount it on a system that doesn't understand HFS
Plus at all, but does understand HFS. The signature fields in the
Volume Header won't match anything the OS knows about (not even HFS).
Most consumer operating systems will display a dialog telling you that
the disk has no recognizable contents. It may even offer to format the
disk for you. That's just asking for the user to accidentally format
the disk and lose all of their data.
If the HFS Plus volume has a wrapper, and the OS understands HFS, the
wrapper mounts as an ordinary HFS volume. The user gets feedback that
the computer recognized their disk, so they know it isn't blank.
But they also won't see the files they are expecting. But since the
wrapper is just an HFS volume, it can contain files. When Apple's code
produces wrappers, it puts a "Read Me" file in the wrapper. When the
wrapper mounts on an HFS-only system, the user will hopefully see and
read that "Read Me" file. It contains text that explains that the
volume is really HFS Plus and that they need a newer version of system
software to be able to use the files on the disk. We think that makes
for a much friendlier user experience than the "Do you want to format
this disk?" dialog they would otherwise get.
2. Allow booting on machines without built-in support for HFS Plus
At the time HFS Plus was first released, no Apple computers had HFS Plus
support in ROM. But we wanted to be able to boot from an HFS Plus
volume. The wrapper makes that possible.
Apple created wrappers contain a tiny System file (the basic part of the
operating system that gets loaded by the boot code in ROM). This isn't
an entire operating system. In fact, it is only enough code to find the
embedded HFS Plus volume and read the System file stored there. The
real System file in the embedded HFS Plus volume contains all the code
to read and write HFS Plus volumes, so the rest of the boot process
proceeds normally, and completely ignorant of the HFS wrapper.
-Mark
From Biswaroop\(External\)"
Hi ,
Some days back , in this list someone had posted
that he is working to enhance the hfsutils for HFS +
filesystem.
Can i get it??
Waiting for ur answers
Bye
Biswaroop
The difference between sunrise and
sunset lies in the freshness of your
eyes.
--Bisban
From entwicklung@whengenibk.de Tue Apr 16 08:39:19 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 16 Apr 2002 09:39:19 +0200
Subject: [hfs-user] Catalog Thread record size ?
Message-ID: <000e01c1e519$d23694a0$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C1E52A.954838D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I just have a question regarding the size of the HFS Plus - =
Catalog Thread Record specified in the Apple Universal Interfaces =
headers -
typedef UInt16 UniChar;
/* HFSUniStr255 is the Unicode equivalent of Str255 */
struct HFSUniStr255 {
UInt16 length; /* number of unicode =
characters */
UniChar unicode[255]; /* unicode characters */
};
/* HFS Plus catalog thread record -- 264 bytes */
struct HFSPlusCatalogThread {
UInt16 recordType; /* record type */
UInt16 reserved; /* reserved - set =
to zero */
HFSCatalogNodeID parentID; /* parent ID for this =
catalog node */
HFSUniStr255 nodeName; /* name of this catalog =
node (variable length) */
};
typedef struct HFSPlusCatalogThread HFSPlusCatalogThread;
Based on the above declarations shouldn't the size for the HFSPlus =
catalog thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
=3D 264+256 instead of 264 as mentioned above ? I think someone probably =
forgot to multiply the 256 by 2 but I just wanted to make sure that is =
an error.
I'd be happy to hear some feedback from the list wrt this.
Best Regards,
Nandini Hengen
------=_NextPart_000_000B_01C1E52A.954838D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I just=20
have a question regarding the size of the HFS Plus - Catalog Thread =
Record=20
specified in the Apple Universal Interfaces headers -
typedef UInt16 &nb=
sp; =20
UniChar;
/* HFSUniStr255 is the Unicode =
equivalent of Str255=20
*/
struct HFSUniStr255=20
{
UInt16 &n=
bsp; =20
length; =
=20
/* number of unicode characters */
=20
UniChar =
=20
unicode[255]; =
/*=20
unicode characters */
};
/* HFS Plus catalog thread record -- =
264 bytes=20
*/
struct HFSPlusCatalogThread=20
{
UInt16 =20
=
=20
recordType; &n=
bsp; =20
/* record type */
UInt16 =
=20
&=
nbsp;=20
reserved; &nbs=
p; =20
/* reserved - set to zero */
=
HFSCatalogNodeID =20
parentID; &nbs=
p; =20
/* parent ID for this catalog node */
=20
HFSUniStr255 =
nodeName; &nbs=
p; =20
/* name of this catalog node (variable length) */
};
typedef =
struct=20
HFSPlusCatalogThread =20
HFSPlusCatalogThread;
Based on the above declarations =
shouldn't the size=20
for the HFSPlus catalog thread record be 2+2+4 (since CNID's are 4 bytes =
long )=20
+ 256*2 =3D 264+256 instead of 264 as mentioned above ? I think someone =
probably=20
forgot to multiply the 256 by 2 but I just wanted to make sure that is =
an=20
error.
I'd be happy to hear some feedback from =
the list=20
wrt this.
Best Regards,
Nandini Hengen
------=_NextPart_000_000B_01C1E52A.954838D0--
From sibaz@sibaz.com Tue Apr 16 09:22:08 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Tue, 16 Apr 2002 09:22:08 +0100
Subject: [hfs-user] hfsutils for HFS+
References: <003f01c1e47d$82c0c180$1c0a0a0a@bisban>
Message-ID: <3CBBDF30.82CDFC81@sibaz.com>
I'm not even close to having something working, unless you just want to read sectors off of a diskimage,
But there is a sourceforge project called hfsplus, they were enhancing all the exisitng linux hfs file system stuff. The dates on all the checkins looked quite old so it might even be stable.
Simon
From sibaz@sibaz.com Tue Apr 16 09:57:33 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Tue, 16 Apr 2002 09:57:33 +0100
Subject: [hfs-user] Catalog Thread record size ?
References: <000e01c1e519$d23694a0$0401a7c0@modemserver>
Message-ID: <3CBBE77D.D565C511@sibaz.com>
Why would you want to multiply 256 by 2? a byte is 1, a char is 1,
therefore 256 chars are 256.
Entwicklung wrote:
> Hello, I just have a question regarding the size of the HFS
> Plus - Catalog Thread Record specified in the Apple Universal
> Interfaces headers - typedef UInt16 UniChar; /*
> HFSUniStr255 is the Unicode equivalent of Str255 */
> struct HFSUniStr255 {
> UInt16 length; /* number of unicode
> characters */
> UniChar unicode[255]; /* unicode characters */
>
> }; /* HFS Plus catalog thread record -- 264 bytes */
> struct HFSPlusCatalogThread {
> UInt16 recordType; /* record type
> */
> UInt16 reserved; /* reserved -
> set to zero */
> HFSCatalogNodeID parentID; /* parent ID for this
> catalog node */
> HFSUniStr255 nodeName; /* name of this
> catalog node (variable length) */
> };
> typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; Based on
> the above declarations shouldn't the size for the HFSPlus catalog
> thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
> 264+256 instead of 264 as mentioned above ? I think someone probably
> forgot to multiply the 256 by 2 but I just wanted to make sure that is
> an error. I'd be happy to hear some feedback from the list wrt
> this. Best Regards,Nandini Hengen
From entwicklung@whengenibk.de Tue Apr 16 10:06:00 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 16 Apr 2002 11:06:00 +0200
Subject: [hfs-user] Catalog Thread record size ?
References: <000e01c1e519$d23694a0$0401a7c0@modemserver> <3CBBE77D.D565C511@sibaz.com>
Message-ID: <000801c1e525$ee36e450$0401a7c0@modemserver>
Yes, but if you look at the definitions below : UniChar has been defined as
UInt16 - since Multibyte Unicode is being used for HFS+ - So every
character takes up 2 Bytes in BigEndian format .
So the HFSUniStr255 structure has actually 256 units of 2 Bytes
each -including the length - please correct me if I'm wrong or you think
otherwise.
Regards,
Nandini
----- Original Message -----
From: "Simon Bazley"
To: "Entwicklung"
Cc:
Sent: Tuesday, April 16, 2002 10:57 AM
Subject: Re: [hfs-user] Catalog Thread record size ?
> Why would you want to multiply 256 by 2? a byte is 1, a char is 1,
> therefore 256 chars are 256.
>
> Entwicklung wrote:
>
> > Hello, I just have a question regarding the size of the HFS
> > Plus - Catalog Thread Record specified in the Apple Universal
> > Interfaces headers - typedef UInt16 UniChar; /*
> > HFSUniStr255 is the Unicode equivalent of Str255 */
> > struct HFSUniStr255 {
> > UInt16 length; /* number of unicode
> > characters */
> > UniChar unicode[255]; /* unicode characters */
> >
> > }; /* HFS Plus catalog thread record -- 264 bytes */
> > struct HFSPlusCatalogThread {
> > UInt16 recordType; /* record type
> > */
> > UInt16 reserved; /* reserved -
> > set to zero */
> > HFSCatalogNodeID parentID; /* parent ID for this
> > catalog node */
> > HFSUniStr255 nodeName; /* name of this
> > catalog node (variable length) */
> > };
> > typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; Based on
> > the above declarations shouldn't the size for the HFSPlus catalog
> > thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
> > 264+256 instead of 264 as mentioned above ? I think someone probably
> > forgot to multiply the 256 by 2 but I just wanted to make sure that is
> > an error. I'd be happy to hear some feedback from the list wrt
> > this. Best Regards,Nandini Hengen
>
From sibaz@sibaz.com Tue Apr 16 11:04:20 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Tue, 16 Apr 2002 11:04:20 +0100
Subject: [hfs-user] Catalog Thread record size ?
References: <000e01c1e519$d23694a0$0401a7c0@modemserver> <3CBBE77D.D565C511@sibaz.com> <000801c1e525$ee36e450$0401a7c0@modemserver>
Message-ID: <3CBBF724.BA1AA167@sibaz.com>
I think we're confusing hfs and hfs+, hfs has a fixed name size, thats lots less
that 256 (I should have noticed your 256 wasn't 20 something).
On hfs+ file names are variable, so while it may say something in the book,
thats a maximum size.
The figure they quote as a minimum size for lots of things (due to maximum name
lengths) is 4k.
This is all discussed in detail in the hfs+ tech doc
Entwicklung wrote:
> Yes, but if you look at the definitions below : UniChar has been defined as
> UInt16 - since Multibyte Unicode is being used for HFS+ - So every
> character takes up 2 Bytes in BigEndian format .
>
> So the HFSUniStr255 structure has actually 256 units of 2 Bytes
> each -including the length - please correct me if I'm wrong or you think
> otherwise.
>
> Regards,
> Nandini
>
> ----- Original Message -----
> From: "Simon Bazley"
> To: "Entwicklung"
> Cc:
> Sent: Tuesday, April 16, 2002 10:57 AM
> Subject: Re: [hfs-user] Catalog Thread record size ?
>
> > Why would you want to multiply 256 by 2? a byte is 1, a char is 1,
> > therefore 256 chars are 256.
> >
> > Entwicklung wrote:
> >
> > > Hello, I just have a question regarding the size of the HFS
> > > Plus - Catalog Thread Record specified in the Apple Universal
> > > Interfaces headers - typedef UInt16 UniChar; /*
> > > HFSUniStr255 is the Unicode equivalent of Str255 */
> > > struct HFSUniStr255 {
> > > UInt16 length; /* number of unicode
> > > characters */
> > > UniChar unicode[255]; /* unicode characters */
> > >
> > > }; /* HFS Plus catalog thread record -- 264 bytes */
> > > struct HFSPlusCatalogThread {
> > > UInt16 recordType; /* record type
> > > */
> > > UInt16 reserved; /* reserved -
> > > set to zero */
> > > HFSCatalogNodeID parentID; /* parent ID for this
> > > catalog node */
> > > HFSUniStr255 nodeName; /* name of this
> > > catalog node (variable length) */
> > > };
> > > typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; Based on
> > > the above declarations shouldn't the size for the HFSPlus catalog
> > > thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
> > > 264+256 instead of 264 as mentioned above ? I think someone probably
> > > forgot to multiply the 256 by 2 but I just wanted to make sure that is
> > > an error. I'd be happy to hear some feedback from the list wrt
> > > this. Best Regards,Nandini Hengen
> >
From entwicklung@whengenibk.de Tue Apr 16 11:48:12 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 16 Apr 2002 12:48:12 +0200
Subject: [hfs-user] Catalog Thread record size ?
References: <000e01c1e519$d23694a0$0401a7c0@modemserver> <3CBBE77D.D565C511@sibaz.com> <000801c1e525$ee36e450$0401a7c0@modemserver> <3CBBF724.BA1AA167@sibaz.com>
Message-ID: <000c01c1e534$353f3740$0401a7c0@modemserver>
> I think we're confusing hfs and hfs+, hfs has a fixed name size, thats
lots less
> that 256 (I should have noticed your 256 wasn't 20 something).
Yes, HFS has 31 Bytes for the node-name. I was referring only to HFS+ as
previously mentioned. Besides HFS uses MacRoman encoding so I couldn't have
been refering to HFS anyway.
> On hfs+ file names are variable, so while it may say something in the
book,
> thats a maximum size.
>
The 'maximum size' you're referring to is exactly what I wanted to know. And
which book are you referring to ? (the technical notes I presume)
> The figure they quote as a minimum size for lots of things (due to maximum
name
> lengths) is 4k.
>
> This is all discussed in detail in the hfs+ tech doc
Yes - 4k is the minimum catalog node size but not the thread record size.
My question restated:
----------------------
What is this '264' referring to ? It couldn't possibly be Maximum length of
the thread since Maximum length=520 Bytes (when the space requirements of
the individual fields are added up).
It couldn't be minimum length either for the simple reason that if the name
has just one character there's no reason why it should occupy 255 Bytes
considering that the HFS+ names can be of variable size as you mentioned.
Any idea what this 264 refers to then ? I think it is just an error - should
have been 520 instead (max size)... that's what my question was all about...
the technical notes doesn't make a mention of 264 anywhere though the
headers provided by Apple (Universal Interfaces) mention this.
Maybe someone from Apple could help ?
Regards,
Nandini
>
> Entwicklung wrote:
>
> > Yes, but if you look at the definitions below : UniChar has been
defined as
> > UInt16 - since Multibyte Unicode is being used for HFS+ - So every
> > character takes up 2 Bytes in BigEndian format .
> >
> > So the HFSUniStr255 structure has actually 256 units of 2 Bytes
> > each -including the length - please correct me if I'm wrong or you think
> > otherwise.
> >
> > Regards,
> > Nandini
> >
> > ----- Original Message -----
> > From: "Simon Bazley"
> > To: "Entwicklung"
> > Cc:
> > Sent: Tuesday, April 16, 2002 10:57 AM
> > Subject: Re: [hfs-user] Catalog Thread record size ?
> >
> > > Why would you want to multiply 256 by 2? a byte is 1, a char is 1,
> > > therefore 256 chars are 256.
> > >
> > > Entwicklung wrote:
> > >
> > > > Hello, I just have a question regarding the size of the HFS
> > > > Plus - Catalog Thread Record specified in the Apple Universal
> > > > Interfaces headers - typedef UInt16 UniChar; /*
> > > > HFSUniStr255 is the Unicode equivalent of Str255 */
> > > > struct HFSUniStr255 {
> > > > UInt16 length; /* number of unicode
> > > > characters */
> > > > UniChar unicode[255]; /* unicode characters
*/
> > > >
> > > > }; /* HFS Plus catalog thread record -- 264 bytes */
> > > > struct HFSPlusCatalogThread {
> > > > UInt16 recordType; /* record type
> > > > */
> > > > UInt16 reserved; /* reserved -
> > > > set to zero */
> > > > HFSCatalogNodeID parentID; /* parent ID for this
> > > > catalog node */
> > > > HFSUniStr255 nodeName; /* name of this
> > > > catalog node (variable length) */
> > > > };
> > > > typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; Based
on
> > > > the above declarations shouldn't the size for the HFSPlus catalog
> > > > thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
> > > > 264+256 instead of 264 as mentioned above ? I think someone probably
> > > > forgot to multiply the 256 by 2 but I just wanted to make sure that
is
> > > > an error. I'd be happy to hear some feedback from the list wrt
> > > > this. Best Regards,Nandini Hengen
> > >
>
From sibaz@sibaz.com Tue Apr 16 12:10:18 2002
From: sibaz@sibaz.com (Simon Bazley)
Date: Tue, 16 Apr 2002 12:10:18 +0100
Subject: [hfs-user] Catalog Thread record size ?
References: <000e01c1e519$d23694a0$0401a7c0@modemserver> <3CBBE77D.D565C511@sibaz.com> <000801c1e525$ee36e450$0401a7c0@modemserver> <3CBBF724.BA1AA167@sibaz.com> <000c01c1e534$353f3740$0401a7c0@modemserver>
Message-ID: <3CBC0699.ECE0BF9A@sibaz.com>
I'm pretty sure this is covered in the tech notes, as you say. I haven't got
time to look at it right now, but I'm pretty sure its discussed, I'll mail the
list when I have a chance to look at it.
Simon
Entwicklung wrote:
> > I think we're confusing hfs and hfs+, hfs has a fixed name size, thats
> lots less
> > that 256 (I should have noticed your 256 wasn't 20 something).
>
> Yes, HFS has 31 Bytes for the node-name. I was referring only to HFS+ as
> previously mentioned. Besides HFS uses MacRoman encoding so I couldn't have
> been refering to HFS anyway.
>
> > On hfs+ file names are variable, so while it may say something in the
> book,
> > thats a maximum size.
> >
>
> The 'maximum size' you're referring to is exactly what I wanted to know. And
> which book are you referring to ? (the technical notes I presume)
>
> > The figure they quote as a minimum size for lots of things (due to maximum
> name
> > lengths) is 4k.
> >
> > This is all discussed in detail in the hfs+ tech doc
>
> Yes - 4k is the minimum catalog node size but not the thread record size.
>
> My question restated:
> ----------------------
> What is this '264' referring to ? It couldn't possibly be Maximum length of
> the thread since Maximum length=520 Bytes (when the space requirements of
> the individual fields are added up).
> It couldn't be minimum length either for the simple reason that if the name
> has just one character there's no reason why it should occupy 255 Bytes
> considering that the HFS+ names can be of variable size as you mentioned.
> Any idea what this 264 refers to then ? I think it is just an error - should
> have been 520 instead (max size)... that's what my question was all about...
> the technical notes doesn't make a mention of 264 anywhere though the
> headers provided by Apple (Universal Interfaces) mention this.
>
> Maybe someone from Apple could help ?
>
> Regards,
> Nandini
>
> >
> > Entwicklung wrote:
> >
> > > Yes, but if you look at the definitions below : UniChar has been
> defined as
> > > UInt16 - since Multibyte Unicode is being used for HFS+ - So every
> > > character takes up 2 Bytes in BigEndian format .
> > >
> > > So the HFSUniStr255 structure has actually 256 units of 2 Bytes
> > > each -including the length - please correct me if I'm wrong or you think
> > > otherwise.
> > >
> > > Regards,
> > > Nandini
> > >
> > > ----- Original Message -----
> > > From: "Simon Bazley"
> > > To: "Entwicklung"
> > > Cc:
> > > Sent: Tuesday, April 16, 2002 10:57 AM
> > > Subject: Re: [hfs-user] Catalog Thread record size ?
> > >
> > > > Why would you want to multiply 256 by 2? a byte is 1, a char is 1,
> > > > therefore 256 chars are 256.
> > > >
> > > > Entwicklung wrote:
> > > >
> > > > > Hello, I just have a question regarding the size of the HFS
> > > > > Plus - Catalog Thread Record specified in the Apple Universal
> > > > > Interfaces headers - typedef UInt16 UniChar; /*
> > > > > HFSUniStr255 is the Unicode equivalent of Str255 */
> > > > > struct HFSUniStr255 {
> > > > > UInt16 length; /* number of unicode
> > > > > characters */
> > > > > UniChar unicode[255]; /* unicode characters
> */
> > > > >
> > > > > }; /* HFS Plus catalog thread record -- 264 bytes */
> > > > > struct HFSPlusCatalogThread {
> > > > > UInt16 recordType; /* record type
> > > > > */
> > > > > UInt16 reserved; /* reserved -
> > > > > set to zero */
> > > > > HFSCatalogNodeID parentID; /* parent ID for this
> > > > > catalog node */
> > > > > HFSUniStr255 nodeName; /* name of this
> > > > > catalog node (variable length) */
> > > > > };
> > > > > typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; Based
> on
> > > > > the above declarations shouldn't the size for the HFSPlus catalog
> > > > > thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
> > > > > 264+256 instead of 264 as mentioned above ? I think someone probably
> > > > > forgot to multiply the 256 by 2 but I just wanted to make sure that
> is
> > > > > an error. I'd be happy to hear some feedback from the list wrt
> > > > > this. Best Regards,Nandini Hengen
> > > >
> >
From mday@apple.com Wed Apr 17 00:37:07 2002
From: mday@apple.com (Mark Day)
Date: Tue, 16 Apr 2002 16:37:07 -0700
Subject: [hfs-user] Catalog Thread record size ?
In-Reply-To: <000e01c1e519$d23694a0$0401a7c0@modemserver>
Message-ID:
--Apple-Mail-2--109161683
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
On Tuesday, April 16, 2002, at 12:39 AM, Entwicklung wrote:
> Based on the above declarations shouldn't the size for the HFSPlus
> catalog thread record be 2+2+4 (since CNID's are 4 bytes long ) +
> 256*2 = 264+256 instead of 264 as mentioned above ? I think someone
> probably forgot to multiply the 256 by 2 but I just wanted to make sure
> that is an error.
You're right, it's an error. The correct (maximum) size is 520. The
minimum size would be 10 + 2 * nodeName.length.
-Mark
--Apple-Mail-2--109161683
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
On Tuesday, April 16, 2002, at 12:39 AM, Entwicklung wrote:
ArialBased on the above
declarations shouldn't the size for the HFSPlus catalog thread record
be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 = 264+256 instead of
264 as mentioned above ? I think someone probably forgot to multiply
the 256 by 2 but I just wanted to make sure that is an error.
You're right, it's an error. The correct (maximum) size is 520. The
minimum size would be 10 + 2 * nodeName.length.
-Mark
--Apple-Mail-2--109161683--
From entwicklung@whengenibk.de Thu Apr 18 07:55:16 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 18 Apr 2002 08:55:16 +0200
Subject: [hfs-user] HFS+ volumes : kHFSVolumeUnmountedBit
Message-ID: <000a01c1e6a5$ffa6ac30$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1E6B6.C2A2F3A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
The HFS+ tech. notes say that the 'Volume attributes' =
field in the volume header has to have Bit 8 set to 1 if the volume was =
correctly flushed when it was mounted or ejected the last time. It also =
mentions that if this is not done it could take an annoyingly long time =
for the ROM-based consistency check (on Mac OS 7.6 and higher) for boot =
volumes.
1) My volume is not a boot volume.
2) I have cleared this bit - set it to 0
3) Inspite of 1) and 2) a smaller HFS+ volume with only one index node =
=3D root gets mounted pretty fast.
4) A larger HFS+ volume (2 levels of index nodes) doesn't get mounted at =
all... my iMac with MacOS 9 just hangs altogether..... I have to remove =
my CD by force and restart.
I assumed this couldn't be an error in the catalog but has something to =
do with the Volume Header since I would have expected to see an error =
dialog instead. Besides this seems to be HFS+ specific since I never =
encountered this kind of problem with HFS.
Does anyone know what this could be due to ? Any suggestions/comments =
would be greatly appreciated.
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1E6B6.C2A2F3A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
The HFS+ tech. notes say that the 'Volume attributes' field in the =
volume header=20
has to have Bit 8 set to 1 if the volume was correctly flushed when it =
was=20
mounted or ejected the last time. It also mentions that if this is not =
done it=20
could take an annoyingly long time for the ROM-based consistency check =
(on Mac=20
OS 7.6 and higher) for boot volumes.
1) My volume is not a boot =
volume.
2) I have cleared this bit - set it to=20
0
3) Inspite of 1) and 2) a smaller HFS+ =
volume with=20
only one index node =3D root gets mounted pretty fast.
4) A larger HFS+ volume (2 levels of =
index nodes)=20
doesn't get mounted at all... my iMac with MacOS 9 just hangs =
altogether..... I=20
have to remove my CD by force and restart.
I assumed this couldn't be an error in =
the catalog=20
but has something to do with the Volume Header since I would have =
expected to=20
see an error dialog instead. Besides this seems to be HFS+ specific =
since I=20
never encountered this kind of problem with HFS.
Does anyone know what this could be due =
to ? Any=20
suggestions/comments would be greatly appreciated.
Regards,
Nandini Hengen
------=_NextPart_000_0007_01C1E6B6.C2A2F3A0--
From entwicklung@whengenibk.de Thu Apr 18 10:16:14 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 18 Apr 2002 11:16:14 +0200
Subject: [hfs-user] HFS+ volumes : kHFSVolumeUnmountedBit
References: <000a01c1e6a5$ffa6ac30$0401a7c0@modemserver>
Message-ID: <001101c1e6b9$b0c7d8f0$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C1E6CA.73D7F680
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello everybody,
I found out that it was a problem in the catalog after all - it =
makes absolutely no difference whether I set kHFSVolumeUnmountedBit or =
clear it in my case.
What surprises is that the error wasn't even in the root index node but =
at a lower level index node - I'm surprised that the system hung instead =
of giving me an error dialog as was the case with HFS... but anyway... =
I'm glad this didn't happen before with HFS too otherwise I would have =
had a tough time locating the errors.
Btw this also solves the problem I referred to in my email of 11.04 to =
the list so nobody needs to take a look at my image (not that someone =
wanted to anyway :-)
Regards,
Nandini
----- Original Message -----=20
From: Entwicklung=20
To: hfs-user@lists.mars.org=20
Cc: studentdev@lists.apple.com=20
Sent: Thursday, April 18, 2002 8:55 AM
Subject: [hfs-user] HFS+ volumes : kHFSVolumeUnmountedBit
Hello Listers,
The HFS+ tech. notes say that the 'Volume =
attributes' field in the volume header has to have Bit 8 set to 1 if the =
volume was correctly flushed when it was mounted or ejected the last =
time. It also mentions that if this is not done it could take an =
annoyingly long time for the ROM-based consistency check (on Mac OS 7.6 =
and higher) for boot volumes.
1) My volume is not a boot volume.
2) I have cleared this bit - set it to 0
3) Inspite of 1) and 2) a smaller HFS+ volume with only one index node =
=3D root gets mounted pretty fast.
4) A larger HFS+ volume (2 levels of index nodes) doesn't get mounted =
at all... my iMac with MacOS 9 just hangs altogether..... I have to =
remove my CD by force and restart.
I assumed this couldn't be an error in the catalog but has something =
to do with the Volume Header since I would have expected to see an error =
dialog instead. Besides this seems to be HFS+ specific since I never =
encountered this kind of problem with HFS.
=20
Does anyone know what this could be due to ? Any suggestions/comments =
would be greatly appreciated.
Regards,
Nandini Hengen
------=_NextPart_000_000E_01C1E6CA.73D7F680
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello everybody,
I found=20
out that it was a problem in the catalog after all - it makes absolutely =
no=20
difference whether I set kHFSVolumeUnmountedBit or clear it in my=20
case.
What surprises is that the error wasn't =
even in the=20
root index node but at a lower level index node - I'm surprised that the =
system=20
hung instead of giving me an error dialog as was the case with HFS... =
but=20
anyway... I'm glad this didn't happen before with HFS too otherwise I =
would have=20
had a tough time locating the errors.
Btw this also solves the problem I =
referred=20
to in my email of 11.04 to the list so nobody needs to take a look =
at my=20
image (not that someone wanted to anyway :-)
Regards,
Nandini
----- Original Message -----
Sent: Thursday, April 18, 2002 =
8:55=20
AM
Subject: [hfs-user] HFS+ =
volumes :=20
kHFSVolumeUnmountedBit
Hello Listers,
&nbs=
p; =20
The HFS+ tech. notes say that the 'Volume attributes' field in the =
volume=20
header has to have Bit 8 set to 1 if the volume was correctly flushed =
when it=20
was mounted or ejected the last time. It also mentions that if this is =
not=20
done it could take an annoyingly long time for the ROM-based =
consistency check=20
(on Mac OS 7.6 and higher) for boot volumes.
1) My volume is not a boot =
volume.
2) I have cleared this bit - set it =
to=20
0
3) Inspite of 1) and 2) a smaller =
HFS+ volume=20
with only one index node =3D root gets mounted pretty =
fast.
4) A larger HFS+ volume (2 levels of =
index nodes)=20
doesn't get mounted at all... my iMac with MacOS 9 just hangs =
altogether.....=20
I have to remove my CD by force and restart.
I assumed this couldn't be an error =
in the=20
catalog but has something to do with the Volume Header since I would =
have=20
expected to see an error dialog instead. Besides this seems to be HFS+ =
specific since I never encountered this kind of problem with =
HFS.
Does anyone know what this could be =
due to ? Any=20
suggestions/comments would be greatly appreciated.
Regards,
Nandini Hengen
------=_NextPart_000_000E_01C1E6CA.73D7F680--
From entwicklung@whengenibk.de Thu Apr 18 14:27:23 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 18 Apr 2002 15:27:23 +0200
Subject: [hfs-user] Help needed...
Message-ID: <000e01c1e6dc$c7968a90$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C1E6ED.89BFF1A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
I've encountered a problem in my HFS directory =
structure which I have tried to elaborate below... please do take a look =
at it and see if some plausible reason strikes you.
I have a file File-X say under Root. Under Root I also have a folder =
Folder-X inside which I have another file of the same name i.e. File-X =
and another file File-Y.=20
File-X is a pdf file of size 42MB and File-Y is a simple text file only =
4kB in size.
All icons get correctly displayed from my CD so I presume all the leaf =
nodes of my catalog B-Tree are getting iterated through (since the icons =
get set based on the filetype and creator fields).
The problem I'm facing is that File-Y (within Folder-X) is readable, =
File-X under Root is readable but when I try to open File-X which is =
under Folder-X Acrobat seems to go into sleep mode.=20
What could this possible be due to ? I first thought the references =
maintained to the file extents (or file size)
was wrong... but it seems to be right... the start block as well as the =
block count (in the leaf nodes) seem to be all right... what else could =
cause the icon to get displayed but not allow the file to be opened ?=20
- The file is correctly written (twice at two different locations) and =
readable the first time.
- The start-block and block count seems to be right for both.=20
- Another file written at the same level is readable.
Could it have something to do with the size of the file ? Please help if =
you have any idea what could be causing this..
Regards,
Nandini Hengen
=20
------=_NextPart_000_000B_01C1E6ED.89BFF1A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello listers,
&nbs=
p; I've=20
encountered a problem in my HFS directory structure which I have tried =
to=20
elaborate below... please do take a look at it and see if some plausible =
reason=20
strikes you.
I have a file File-X say under =
Root. Under=20
Root I also have a folder Folder-X inside which I have another =
file of=20
the same name i.e. File-X and another file File-Y.
File-X is a pdf file of size 42MB =
and File-Y=20
is a simple text file only 4kB in size.
All icons get correctly displayed from =
my CD so I=20
presume all the leaf nodes of my catalog B-Tree are getting iterated =
through=20
(since the icons get set based on the filetype and creator =
fields).
The problem I'm facing is that File-Y =
(within=20
Folder-X) is readable, File-X under Root is readable but when I try to =
open=20
File-X which is under Folder-X Acrobat seems to go into sleep =
mode.=20
What could this possible be due to ? I =
first=20
thought the references maintained to the file extents (or file=20
size)
was wrong... but it seems to be =
right... the start=20
block as well as the block count (in the leaf nodes) seem to be all =
right... what else could cause the icon to get displayed but not =
allow the=20
file to be opened ?
- The file is correctly written (twice =
at two=20
different locations) and readable the first time.
- The start-block and block count seems =
to be right=20
for both.
- Another file written at the same =
level is=20
readable.
Could it have something to do with the =
size of the=20
file ? Please help if you have any idea what could be causing=20
this..
Regards,
Nandini Hengen
------=_NextPart_000_000B_01C1E6ED.89BFF1A0--
From entwicklung@whengenibk.de Fri Apr 19 12:23:15 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 19 Apr 2002 13:23:15 +0200
Subject: [hfs-user] pdf files on Mac-OS 9
Message-ID: <002801c1e794$9a43b870$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0025_01C1E7A5.5CDFB770
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
I have a CD-Volume (HFS) with two levels of files in =
a directory i.e. at the topmost level (under root) and inside a =
directory present in root. The same pdf file when present at the higher =
level is readable directly from the CD but the file present within the =
directory is not. This problem arises only for Acrobat reader =
documents.. it works fine for text f=EDles.... besides dragging and =
droppping these lower level files onto my desktop from the CD enables me =
to read them as required.
What could this be due to ? Could this be some problem with the =
filesystem format or does it rather have to do with Acrobat Reader for =
Mac OS?
Any tips would be appreciated.
Regards,
Nandini Hengen
------=_NextPart_000_0025_01C1E7A5.5CDFB770
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
I have a CD-Volume (HFS) with two levels of files in a directory i.e. at =
the=20
topmost level (under root) and inside a directory present in root. The =
same pdf=20
file when present at the higher level is readable directly from the CD =
but the=20
file present within the directory is not. This problem arises only for =
Acrobat=20
reader documents.. it works fine for text f=EDles.... besides dragging =
and=20
droppping these lower level files onto my desktop from the CD enables me =
to read=20
them as required.
What could this be due to ? Could this =
be some=20
problem with the filesystem format or does it rather have to do with =
Acrobat=20
Reader for Mac OS?
Any tips would be =
appreciated.
Regards,
Nandini =
Hengen
------=_NextPart_000_0025_01C1E7A5.5CDFB770--
From entwicklung@whengenibk.de Sat Apr 20 21:45:22 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sat, 20 Apr 2002 22:45:22 +0200
Subject: [hfs-user] Re: pdf files on Mac-OS 9
References: <002801c1e794$9a43b870$0401a7c0@modemserver>
Message-ID: <000501c1e8ac$4add4a80$0401a7c0@modemserver>
Hello,
My problem is solved now ... I realised it had to have something to
do with the folder threads - i.e. that the thread records didn't maintain
correct references to the folders.... was quite a silly error actually
.... the nodename[0] field which holds the length of the nodename (in the
folder and its thread didn't correspond to each other due to a small bug in
my program) ... so though the file and the icon got displayed correctly and
the data could be accessed, acrobat apparently tries relocating its way
down the tree starting from root.
One surprising thing I noticed is that I didn't have this problem for jpg
files - probably the graphics application which is launched on Mac OS
functions slightly differently as compared to Acrobat.....
dunno in what way although...good news is it works now anyway !
Regards,
Nandini Hengen
----- Original Message -----
From: "Steve Sisak"
To: "Entwicklung" ;
Sent: Friday, April 19, 2002 2:14 PM
Subject: Re: pdf files on Mac-OS 9
> At 1:23 PM +0200 4/19/02, Entwicklung wrote:
> >What could this be due to ? Could this be some problem with the
filesystem
> >format or does it rather have to do with Acrobat Reader for Mac OS?
>
> This is not a Darwin issue, but it's probably that the HFS file type
> is not set to and therefor the file can't be opened by Acrobat
> because it isn't recognized as a PDF file.
>
> When you copy the file, PC File Exchange treats it as a Non-Mac file
> (because the type isn't set) and applies a type/creator based on the
> file's extension which allows the copy to be opened by Acrobat -- it
> probably doesn't matter where you copy.
>
> (Note that the creator is not important, but most pre-X Mac
> applications will not open a file with an incorrect type --
> extensions have no significance pre-X)
>
> -Steve
> _______________________________________________
> darwin-development mailing list | darwin-development@lists.apple.com
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-development
> Do not post admin requests to the list. They will be ignored.
From entwicklung@whengenibk.de Sun Apr 21 15:44:03 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 21 Apr 2002 16:44:03 +0200
Subject: [hfs-user] HFS Maximum Image Size
Message-ID: <002801c1e942$fba7dc40$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0025_01C1E953.BEC5B570
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
The maximum size of an HFS-volume seems to be =
65535*65535 =3D 3.99 GB. (since the respective fields in the MDB are =
UInt16's). Does this mean that to store a file of size 4.7GB I would =
have to necessarily go in for HFS+ or is this possible with HFS somehow =
?
Regards,
Nandini Hengen=20
------=_NextPart_000_0025_01C1E953.BEC5B570
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
The maximum size of an HFS-volume seems to be 65535*65535 =3D 3.99 GB. =
(since the=20
respective fields in the MDB are UInt16's). Does this mean that to store =
a file of size 4.7GB I would have to necessarily go in for =
HFS+ or is=20
this possible with HFS somehow=20
?
Regards,
Nandini =
Hengen
------=_NextPart_000_0025_01C1E953.BEC5B570--
From mday@apple.com Mon Apr 22 21:35:56 2002
From: mday@apple.com (Mark Day)
Date: Mon, 22 Apr 2002 13:35:56 -0700
Subject: [hfs-user] HFS Maximum Image Size
In-Reply-To: <002801c1e942$fba7dc40$0401a7c0@modemserver>
Message-ID: <8BF918CE-5630-11D6-A41D-00039354009A@apple.com>
--Apple-Mail-3-398366786
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
The maximum file size on HFS volumes is 2GB-1 (the maximum value in a=20
signed 32-bit integer). See struct HFSCatalogFile.
The maximum volume size is theoretically just under 256TB (actually,=20
65535 allocation blocks * (4G-512) bytes per allocation block). The=20
allocation block size is an unsigned 32-bit integer, but must be a=20
multiple of 512. I don't know of any implementation that supports HFS=20=
volumes 2TB or larger; some versions have much smaller limits (eg., 2GB=20=
or 4GB). Many implementations use 32-bit integers (signed or unsigned)=20=
for offsets into the volume, or as block numbers (assuming 512 bytes per=20=
block).
-Mark
On Sunday, April 21, 2002, at 07:44 AM, Entwicklung wrote:
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 The maximum =
size of an HFS-volume seems to be=20
> 65535*65535 =3D 3.99 GB. (since the respective fields in the MDB are=20=
> UInt16's). Does this mean that to store a=A0file of size=A04.7GB I =
would=20
> have to necessarily go in for HFS+ or is this possible with=20
> HFS=A0somehow ?
--Apple-Mail-3-398366786
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
The maximum file size on HFS volumes is 2GB-1 (the maximum value in a
signed 32-bit integer). See struct HFSCatalogFile.
The maximum volume size is theoretically just under 256TB (actually,
65535 allocation blocks * (4G-512) bytes per allocation block). The
allocation block size is an unsigned 32-bit integer, but must be a
multiple of 512. I don't know of any implementation that supports HFS
volumes 2TB or larger; some versions have much smaller limits (eg.,
2GB or 4GB). Many implementations use 32-bit integers (signed or
unsigned) for offsets into the volume, or as block numbers (assuming
512 bytes per block).
-Mark
On Sunday, April 21, 2002, at 07:44 AM, Entwicklung wrote:
Arial=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
The maximum size of an HFS-volume seems to be 65535*65535 =3D 3.99 GB.
(since the respective fields in the MDB are UInt16's). Does this mean
that to store a=A0file of size=A04.7GB I would have to necessarily go in
for HFS+ or is this possible with HFS=A0somehow ?
=
--Apple-Mail-3-398366786--
From entwicklung@whengenibk.de Tue Apr 23 06:37:22 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 23 Apr 2002 07:37:22 +0200
Subject: [hfs-user] HFS Maximum Image Size
References: <8BF918CE-5630-11D6-A41D-00039354009A@apple.com>
Message-ID: <003101c1ea88$f23eac50$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_002E_01C1EA99.B4DF3F30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I made a mistake . I had thought that drNumAlBlocks and =
drAlBlkSize in the MDB were both of type UInt16 but drAlBlkSize happens =
to be of size 4Bytes - I didn't see that.
Thanks!
-Nandini
----- Original Message -----=20
From: Mark Day=20
To: Entwicklung=20
Cc: hfs-user@lists.mars.org=20
Sent: Monday, April 22, 2002 10:35 PM
Subject: Re: [hfs-user] HFS Maximum Image Size
The maximum file size on HFS volumes is 2GB-1 (the maximum value in a =
signed 32-bit integer). See struct HFSCatalogFile.
The maximum volume size is theoretically just under 256TB (actually, =
65535 allocation blocks * (4G-512) bytes per allocation block). The =
allocation block size is an unsigned 32-bit integer, but must be a =
multiple of 512. I don't know of any implementation that supports HFS =
volumes 2TB or larger; some versions have much smaller limits (eg., 2GB =
or 4GB). Many implementations use 32-bit integers (signed or unsigned) =
for offsets into the volume, or as block numbers (assuming 512 bytes per =
block).
-Mark
On Sunday, April 21, 2002, at 07:44 AM, Entwicklung wrote:
The maximum size of an HFS-volume seems to be =
65535*65535 =3D 3.99 GB. (since the respective fields in the MDB are =
UInt16's). Does this mean that to store a file of size 4.7GB I would =
have to necessarily go in for HFS+ or is this possible with HFS somehow =
?
------=_NextPart_000_002E_01C1EA99.B4DF3F30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I made a=20
mistake . I had thought that drNumAlBlocks and drAlBlkSize in the MDB =
were both=20
of type UInt16 but drAlBlkSize happens to be of size 4Bytes - I didn't =
see=20
that.
Thanks!
-Nandini
----- Original Message -----
Sent: Monday, April 22, 2002 =
10:35=20
PM
Subject: Re: [hfs-user] HFS =
Maximum Image=20
Size
The maximum file size on HFS volumes is 2GB-1 (the =
maximum=20
value in a signed 32-bit integer). See struct =
HFSCatalogFile.
The=20
maximum volume size is theoretically just under 256TB (actually, 65535 =
allocation blocks * (4G-512) bytes per allocation block). The =
allocation block=20
size is an unsigned 32-bit integer, but must be a multiple of 512. I =
don't=20
know of any implementation that supports HFS volumes 2TB or larger; =
some=20
versions have much smaller limits (eg., 2GB or 4GB). Many =
implementations use=20
32-bit integers (signed or unsigned) for offsets into the volume, or =
as block=20
numbers (assuming 512 bytes per block).
-Mark
On Sunday, =
April=20
21, 2002, at 07:44 AM, Entwicklung wrote:
&nb=
sp; =20
The maximum size of an HFS-volume seems to be 65535*65535 =3D 3.99 =
GB. (since=20
the respective fields in the MDB are UInt16's). Does this mean that =
to store=20
a file of size 4.7GB I would have to necessarily go in for =
HFS+ or=20
is this possible with HFS somehow=20
?/smaller>/fontfamily>
------=_NextPart_000_002E_01C1EA99.B4DF3F30--
From entwicklung@whengenibk.de Tue Apr 23 06:53:11 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 23 Apr 2002 07:53:11 +0200
Subject: [hfs-user] HFS Maximum Image Size
References: <8BF918CE-5630-11D6-A41D-00039354009A@apple.com>
Message-ID: <004e01c1ea8b$3001e9b0$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0046_01C1EA9B.EA272930
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
It would interest me as to why the file size is stored in a signed =
32-bit integer and not an unsigned int 32- wouldn't this provide for =
larger files then ? (4GB - 1)
Regards,
Nandini Hengen
----- Original Message -----=20
From: Mark Day=20
To: Entwicklung=20
Cc: hfs-user@lists.mars.org=20
Sent: Monday, April 22, 2002 10:35 PM
Subject: Re: [hfs-user] HFS Maximum Image Size
The maximum file size on HFS volumes is 2GB-1 (the maximum value in a =
signed 32-bit integer). See struct HFSCatalogFile.
The maximum volume size is theoretically just under 256TB (actually, =
65535 allocation blocks * (4G-512) bytes per allocation block). The =
allocation block size is an unsigned 32-bit integer, but must be a =
multiple of 512. I don't know of any implementation that supports HFS =
volumes 2TB or larger; some versions have much smaller limits (eg., 2GB =
or 4GB). Many implementations use 32-bit integers (signed or unsigned) =
for offsets into the volume, or as block numbers (assuming 512 bytes per =
block).
-Mark
On Sunday, April 21, 2002, at 07:44 AM, Entwicklung wrote:
The maximum size of an HFS-volume seems to be =
65535*65535 =3D 3.99 GB. (since the respective fields in the MDB are =
UInt16's). Does this mean that to store a file of size 4.7GB I would =
have to necessarily go in for HFS+ or is this possible with HFS somehow =
?
------=_NextPart_000_0046_01C1EA9B.EA272930
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
It would interest me as to why the file =
size is=20
stored in a signed 32-bit integer and not an unsigned int 32- wouldn't =
this=20
provide for larger files then ? (4GB - 1)
Regards,
Nandini Hengen
----- Original Message -----
Sent: Monday, April 22, 2002 =
10:35=20
PM
Subject: Re: [hfs-user] HFS =
Maximum Image=20
Size
The maximum file size on HFS volumes is 2GB-1 (the =
maximum=20
value in a signed 32-bit integer). See struct =
HFSCatalogFile.
The=20
maximum volume size is theoretically just under 256TB (actually, 65535 =
allocation blocks * (4G-512) bytes per allocation block). The =
allocation block=20
size is an unsigned 32-bit integer, but must be a multiple of 512. I =
don't=20
know of any implementation that supports HFS volumes 2TB or larger; =
some=20
versions have much smaller limits (eg., 2GB or 4GB). Many =
implementations use=20
32-bit integers (signed or unsigned) for offsets into the volume, or =
as block=20
numbers (assuming 512 bytes per block).
-Mark
On Sunday, =
April=20
21, 2002, at 07:44 AM, Entwicklung wrote:
&nb=
sp; =20
The maximum size of an HFS-volume seems to be 65535*65535 =3D 3.99 =
GB. (since=20
the respective fields in the MDB are UInt16's). Does this mean that =
to store=20
a file of size 4.7GB I would have to necessarily go in for =
HFS+ or=20
is this possible with HFS somehow=20
?/smaller>/fontfamily>
------=_NextPart_000_0046_01C1EA9B.EA272930--
From Biswaroop\(External\)"
Hi all,
I am just wondering about the Max Volume size for a
HFS volume.
Theretically
it should be..
2^16 * 2^32(it is a multiple of 512)= 2^48
2^30 = 1GB
Therefore
2^18 GB is the maximum.(Isn't it??)
regards
Biswaroop
The difference between sunrise and
sunset lies in the freshness of your
eyes.
--Bisban
From entwicklung@whengenibk.de Tue Apr 23 08:38:13 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 23 Apr 2002 09:38:13 +0200
Subject: Fw: [hfs-user] (no subject)
Message-ID: <000f01c1ea99$d3355c30$0401a7c0@modemserver>
----- Original Message -----
From: "Entwicklung"
To: "Biswaroop(External)"
Sent: Tuesday, April 23, 2002 9:37 AM
Subject: Re: [hfs-user] (no subject)
> Hi Biswaroop,
> It's (2^16 -1)*(2^32 - 1) - since in a
2s-complement
> representation n-bytes(unsigned) can store a maximum positive value of
> (2^n - 1). This is also why the maximum no. of allocation blocks is 65535
> and not 65536(2^16) since otherwise it would result in an overflow. Signed
> integers - SInt8 for eg. can hold values ranging from -128 (-2^(n-1)) to
+127
> (2^(n-1) - 1).
>
> Hope this helps !
>
> Regards,
> Nandini
>
> ----- Original Message -----
> From: "Biswaroop(External)"
> To:
> Sent: Tuesday, April 23, 2002 8:53 AM
> Subject: [hfs-user] (no subject)
>
>
> > Hi all,
> >
> > I am just wondering about the Max Volume size for a
> > HFS volume.
> > Theretically
> > it should be..
> > 2^16 * 2^32(it is a multiple of 512)= 2^48
> > 2^30 = 1GB
> > Therefore
> > 2^18 GB is the maximum.(Isn't it??)
> >
> > regards
> > Biswaroop
> >
> >
> >
> > The difference between sunrise and
> > sunset lies in the freshness of your
> > eyes.
> > --Bisban
>
From entwicklung@whengenibk.de Thu Apr 25 07:06:43 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 25 Apr 2002 08:06:43 +0200
Subject: [hfs-user] Desktop View
Message-ID: <000a01c1ec1f$62118060$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1EC30.23573E30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I need some help.
I'd like to know what part of the HFS format is responsible for how =
icons on an external CD-volume appear on the desktop of Mac OS 9. The =
desktop database holds the icon info but where is info. like=20
Window-sizing on the Mac, no. of icons per row, spacing of icons etc. =
stored ? Is this stored on the hard-disk of the Mac or is there some way =
in which I can get this to be stored on my CD as well ? Is this part of =
the desktop database too ?
The situation is as follows - when I insert my HFS-CD into my drive and =
click on the CD-symbol a window opens up displaying the icons for all =
the files present on the CD but they are not spaced properly and the =
view doesn't look all that good - Is there some way in which I can =
display these properly ? ..ie. say 'n' icons in one row etc ? Sometimes =
there are around 30 icons displayed for around 100 files on my CD... =
then a lot of empty space is displayed - which could mislead the user to =
think that no more files are present - and then the remaining 70 =
file-icons suddenly show up.
I presume this doesn't have to be stored on the external HFS-volume but =
rather has something to do with my Mac-OS settings... but I'm not too =
sure. I'd appreciate it if someone could tell me which part is =
responsible for such things ? I'm not creating a desktop DB at the =
moment but this looks really bad and I'd like to change it if I can i.e. =
if this can be overcome somehow without having a desktop database on my =
CD.
TIA,
Nandini
********** It's not easy to find happiness in ourselves and it's not =
possible to find it elsewhere ************
------=_NextPart_000_0007_01C1EC30.23573E30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I need some=20
help.
I'd like to know what part of the HFS =
format is=20
responsible for how icons on an external CD-volume appear on the desktop =
of Mac=20
OS 9. The desktop database holds the icon info but where is info. like=20
Window-sizing on the Mac, no. of icons =
per row,=20
spacing of icons etc. stored ? Is this stored on the hard-disk of the =
Mac or=20
is there some way in which I can get this to be stored on my CD as =
well ?=20
Is this part of the desktop database too ?
The situation is as follows - when I =
insert my=20
HFS-CD into my drive and click on the CD-symbol a window opens up=20
displaying the icons for all the files present on the CD but they are =
not spaced=20
properly and the view doesn't look all that good - Is there some way in =
which I=20
can display these properly ? =
..ie.=20
say 'n' icons in one row etc ? Sometimes there are around 30 icons=20
displayed for around 100 files on my CD... then a lot of empty space is=20
displayed - which could mislead the user to think that no more files are =
present=20
- and then the remaining 70 file-icons suddenly show up.
I presume this doesn't have to be =
stored on the=20
external HFS-volume but rather has something to do with my Mac-OS =
settings...=20
but I'm not too sure. I'd appreciate it if someone could tell me which =
part is=20
responsible for such things ? I'm not creating a desktop DB at the =
moment but=20
this looks really bad and I'd like to change it if I can i.e. if =
this can=20
be overcome somehow without having a desktop database on my=20
CD.
TIA,
Nandini
********** It's not easy to find =
happiness in=20
ourselves and it's not possible to find it elsewhere=20
************
------=_NextPart_000_0007_01C1EC30.23573E30--
From pwd@apple.com Thu Apr 25 07:41:42 2002
From: pwd@apple.com (Patrick Dirks)
Date: Wed, 24 Apr 2002 23:41:42 -0700
Subject: [hfs-user] Desktop View
In-Reply-To: <000a01c1ec1f$62118060$0401a7c0@modemserver>
Message-ID: <80EF9C03-5817-11D6-8FE2-003065A0E6DE@apple.com>
Hi Nandini,
The information the Finder uses to organize a window's layout is stored
in the Finder Info for the folder in question (where things like the
scroll position, view organization etc. are stored) and the Finder Info
for the individual items (each of which stores the position for the
item, for instance).
The Finder will set the layout information for a file if it sees the
"Inited" flag in the FinderInfo's flags field cleared. Once a position
in the window has been assigned and the Finder has done its housekeeping
like reading application icons out of an application's resource fork the
Finder sets the "Inited" bit to prevent doing the same work again in the
future.
The layout of this Finder Info field is contained in the various "Inside
Macintosh" volumes, as well as header files like "Files.h". It's
probably on-line in some technote on Apple's web site, too.
Hope that helps,
-Patrick.
On Wednesday, April 24, 2002, at 11:06 PM, Entwicklung wrote:
> Hello,
> I need some help.
> I'd like to know what part of the HFS format is responsible for how
> icons on an external CD-volume appear on the desktop of Mac OS 9. The
> desktop database holds the icon info but where is info. like
> Window-sizing on the Mac, no. of icons per row, spacing of icons etc.
> stored ? Is this stored on the hard-disk of the Mac or is there some
> way in which I can get this to be stored on my CD as well ? Is this
> part of the desktop database too ?
>
> The situation is as follows - when I insert my HFS-CD into my drive and
> click on the CD-symbol a window opens up displaying the icons for all
> the files present on the CD but they are not spaced properly and the
> view doesn't look all that good - Is there some way in which I can
> display these properly ? ..ie. say 'n' icons in one row etc ? Sometimes
> there are around 30 icons displayed for around 100 files on my CD...
> then a lot of empty space is displayed - which could mislead the user
> to think that no more files are present - and then the remaining 70
> file-icons suddenly show up.
>
> I presume this doesn't have to be stored on the external HFS-volume but
> rather has something to do with my Mac-OS settings... but I'm not too
> sure. I'd appreciate it if someone could tell me which part is
> responsible for such things ? I'm not creating a desktop DB at the
> moment but this looks really bad and I'd like to change it if I can
> i.e. if this can be overcome somehow without having a desktop database
> on my CD.
>
> TIA,
> Nandini
>
>
>
> ********** It's not easy to find happiness in ourselves and it's not
> possible to find it elsewhere ************
From Biswaroop\(External\)"
Hi ,
I want to make a HFS volume readonly.
I am setting the flag in mdb.drAtrb to
mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
Bit Meaning
15 Set if th volume is Locked by Software.
After creating a Image of such a Volume.
I am mounting it with a FreeWare application in Windows which can mount HFS
volumes.
But , I can still add files to that volume through this
software and delete them too.
That shows the volume is not Locked.
So, anything else I should do to Volume parameters
to make that Volume represent a ReadOnly one??
Waiting for ur Inputs.
Regards
Biswaroop
The difference between sunrise and
sunset lies in the freshness of your
eyes.
--Bisban
From entwicklung@whengenibk.de Fri Apr 26 12:38:58 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 26 Apr 2002 13:38:58 +0200
Subject: [hfs-user] To make a Readonly HFS Volume
References: <008401c1ed14$06206640$1c0a0a0a@bisban>
Message-ID: <000801c1ed16$f54a1160$0401a7c0@modemserver>
Wouldn't setting bit 15 give 0x8000 ??? numbering the 16 bits from 0..15
i.e.
- Nandini
----- Original Message -----
From: "Biswaroop(External)"
To:
Sent: Friday, April 26, 2002 1:17 PM
Subject: [hfs-user] To make a Readonly HFS Volume
> Hi ,
>
> I want to make a HFS volume readonly.
> I am setting the flag in mdb.drAtrb to
>
> mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
>
> Bit Meaning
> 15 Set if th volume is Locked by Software.
>
> After creating a Image of such a Volume.
> I am mounting it with a FreeWare application in Windows which can mount
HFS
> volumes.
> But , I can still add files to that volume through this
> software and delete them too.
> That shows the volume is not Locked.
> So, anything else I should do to Volume parameters
> to make that Volume represent a ReadOnly one??
>
> Waiting for ur Inputs.
>
> Regards
> Biswaroop
>
>
>
>
>
>
>
>
> The difference between sunrise and
> sunset lies in the freshness of your
> eyes.
> --Bisban
From jcpearso@ps.ucl.ac.uk Fri Apr 26 13:25:51 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Fri, 26 Apr 2002 13:25:51 +0100
Subject: [hfs-user] To make a Readonly HFS Volume
In-Reply-To: Your message of Fri, 26 Apr 2002 16:47:54 +0530.
<008401c1ed14$06206640$1c0a0a0a@bisban>
Message-ID: <22410.1019823951@ourhome.freeserve.co.uk>
>I want to make a HFS volume readonly.
>I am setting the flag in mdb.drAtrb to
>
>mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
>
>Bit Meaning
>15 Set if th volume is Locked by Software.
>
>After creating a Image of such a Volume.
> I am mounting it with a FreeWare application in Windows which can mount HFS
>volumes.
> But , I can still add files to that volume through this
> software and delete them too.
> That shows the volume is not Locked.
> So, anything else I should do to Volume parameters
> to make that Volume represent a ReadOnly one??
mkisofs (mkhybrid) makes a volume readonly using:
mdb.drAtrb |= HFS_ATRB_SLOCKED
where HFS_ATRB_SLOCKED is defined as (1 << 15) == 0x8000
Of course, this still assumes that whatever is mounting the volume honours the
readonly flag ...
James Pearson
From entwicklung@whengenibk.de Fri Apr 26 13:46:14 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 26 Apr 2002 14:46:14 +0200
Subject: [hfs-user] To make a Readonly HFS Volume
References: <008401c1ed14$06206640$1c0a0a0a@bisban> <000801c1ed16$f54a1160$0401a7c0@modemserver> <009401c1ed1a$a3587320$1c0a0a0a@bisban>
Message-ID: <001e01c1ed20$60be1190$0401a7c0@modemserver>
Are you sure you've set drAtrb to 0 first before OR-ing 0x8000 with it ?
Or are you just setting mdb.drAtrb = 0x8000 instead of :
1) mdb.drAtrb = 0x0000;
2) mdb.drAtrb | = 0x8000 ;
Stt 2) without stt 1) might result in some unknown value getting written.
-Nandini
----- Original Message -----
From: "Biswaroop(External)"
To: "Entwicklung"
Sent: Friday, April 26, 2002 2:05 PM
Subject: Re: [hfs-user] To make a Readonly HFS Volume
> Hi Nandini,
> Thanks for a Quick Reply.
> But I did that too..but no success.
> regrds
> Biswaroop
> ----- Original Message -----
> From: "Entwicklung"
> To: "Biswaroop(External)"
> Cc:
> Sent: Friday, April 26, 2002 5:08 PM
> Subject: Re: [hfs-user] To make a Readonly HFS Volume
>
>
> > Wouldn't setting bit 15 give 0x8000 ??? numbering the 16 bits from 0..15
> > i.e.
> >
> > - Nandini
> >
> > ----- Original Message -----
> > From: "Biswaroop(External)"
> > To:
> > Sent: Friday, April 26, 2002 1:17 PM
> > Subject: [hfs-user] To make a Readonly HFS Volume
> >
> >
> > > Hi ,
> > >
> > > I want to make a HFS volume readonly.
> > > I am setting the flag in mdb.drAtrb to
> > >
> > > mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
> > >
> > > Bit Meaning
> > > 15 Set if th volume is Locked by Software.
> > >
> > > After creating a Image of such a Volume.
> > > I am mounting it with a FreeWare application in Windows which can
mount
> > HFS
> > > volumes.
> > > But , I can still add files to that volume through this
> > > software and delete them too.
> > > That shows the volume is not Locked.
> > > So, anything else I should do to Volume parameters
> > > to make that Volume represent a ReadOnly one??
> > >
> > > Waiting for ur Inputs.
> > >
> > > Regards
> > > Biswaroop
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > The difference between sunrise and
> > > sunset lies in the freshness of your
> > > eyes.
> > > --Bisban
From entwicklung@whengenibk.de Fri Apr 26 14:08:20 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 26 Apr 2002 15:08:20 +0200
Subject: [hfs-user] Re: Desktop View
Message-ID: <004301c1ed23$71a79190$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0040_01C1ED34.33985C70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
As Patrick had suggested - from the Apple technical notes I gathered =
that the structures I need to set the window settings of folders have =
the required form :
struct DInfo {
Rect frRect; /*folder's window rectangle*/
unsigned short frFlags; /*flags*/
Point frLocation; /*folder's location in window*/
short frView; /*folder's view*/
};
struct DXInfo {
Point frScroll; /*scroll position*/
long frOpenChain; /*directory ID chain of open =
folders*/
char frScript; /*script flag and code*/
char frXFlags; /*reserved*/
short frComment; /*comment ID*/
long frPutAway; /*directory ID*/
};
I want to set say my root folder's window size to a pretty large value =
so that as soon as I click on my CD-symbol a large window opens up =
displaying the contents of the CD.
Now Rect defines the size and location of a QuickDraw rectangle.
struct Rect {
short top;
short left;
short bottom;
short right;
};=20
top=20
The vertical coordinate of the upper-left point of the rectangle.=20
left=20
The horizontal coordinate of the upper-left point of the rectangle.=20
bottom=20
The vertical coordinate of the lower-right point of the rectangle.=20
right=20
The horizontal coordinate of the lower-right point of the rectangle.=20
I set top to 5, left to 5 bottom to 200 and right to 200...... but the =
default rectangle (a smaller sized one)
still continues to appear. What am I doing wrong out here ?.. sth wrong =
with the values ?=20
The rest of my finder flags are all set to 0 so the finder uses its =
default values. I'm only setting the creator and filetype of the files =
in addition to this.
Any tips would help a lot !
Regards,
Nandini
----- Original Message -----=20
From: Entwicklung=20
To: studentdev@lists.apple.com ; hfs-user@lists.mars.org ; =
darwin-development@lists.apple.com=20
Cc: Thomas Tempelmann=20
Sent: Thursday, April 25, 2002 8:06 AM
Subject: Desktop View
Hello,
I need some help.
I'd like to know what part of the HFS format is responsible for how =
icons on an external CD-volume appear on the desktop of Mac OS 9. The =
desktop database holds the icon info but where is info. like=20
Window-sizing on the Mac, no. of icons per row, spacing of icons etc. =
stored ? Is this stored on the hard-disk of the Mac or is there some way =
in which I can get this to be stored on my CD as well ? Is this part of =
the desktop database too ?
=20
The situation is as follows - when I insert my HFS-CD into my drive =
and click on the CD-symbol a window opens up displaying the icons for =
all the files present on the CD but they are not spaced properly and the =
view doesn't look all that good - Is there some way in which I can =
display these properly ? ..ie. say 'n' icons in one row etc ? Sometimes =
there are around 30 icons displayed for around 100 files on my CD... =
then a lot of empty space is displayed - which could mislead the user to =
think that no more files are present - and then the remaining 70 =
file-icons suddenly show up.
I presume this doesn't have to be stored on the external HFS-volume =
but rather has something to do with my Mac-OS settings... but I'm not =
too sure. I'd appreciate it if someone could tell me which part is =
responsible for such things ? I'm not creating a desktop DB at the =
moment but this looks really bad and I'd like to change it if I can i.e. =
if this can be overcome somehow without having a desktop database on my =
CD.
TIA,
Nandini
********** It's not easy to find happiness in ourselves and it's not =
possible to find it elsewhere ************
------=_NextPart_000_0040_01C1ED34.33985C70
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
As Patrick had suggested - from the =
Apple technical=20
notes I gathered that the structures I need to set the window settings =
of=20
folders have the required form :
struct DInfo =
{
=20
Rect &nb=
sp; =20
frRect; /*folder's window=20
rectangle*/
unsigned =
short =20
frFlags; =20
/*flags*/
=20
Point &n=
bsp;=20
frLocation; /*folder's location in=20
window*/
=20
short &n=
bsp;=20
frView; /*folder's=20
view*/
};
struct DXInfo {
=20
Point =20
frScroll; /*scroll=20
position*/
=20
long =20
frOpenChain; /*directory ID chain of open=20
folders*/
=20
char =20
frScript; /*script flag =
and=20
code*/
=20
char =20
frXFlags; =20
/*reserved*/
=20
short =20
frComment; /*comment=20
ID*/
=20
long =20
frPutAway; /*directory=20
ID*/
};
I want to set say my root folder's =
window size to a=20
pretty large value so that as soon as I click on my CD-symbol a large =
window=20
opens up displaying the contents of the CD.
Now Rect defines the size and location =
of a=20
QuickDraw rectangle.
struct Rect {
short&n=
bsp; top;
short &n=
bsp; left;
short b=
ottom;
short right;
=
};
=20
- top=20
- The vertical coordinate of the upper-left point of the rectangle.=20
- left=20
- The horizontal coordinate of the upper-left point of the =
rectangle.=20
- bottom=20
- The vertical coordinate of the lower-right point of the rectangle. =
- right=20
- The horizontal coordinate of the lower-right point of the =
rectangle.=20
I set top to 5, left to 5 bottom to 200 =
and right=20
to 200...... but the default rectangle (a smaller sized =
one)
still continues to appear. What am I =
doing wrong=20
out here ?.. sth wrong with the values ?
The rest of my finder flags are all set =
to 0 so the=20
finder uses its default values. I'm only setting the creator and =
filetype of the=20
files in addition to this.
Any tips would help a lot =
!
Regards,
Nandini
----- Original Message -----
Sent: Thursday, April 25, 2002 =
8:06=20
AM
Subject: Desktop View
Hello,
I need some=20
help.
I'd like to know what part of the HFS =
format is=20
responsible for how icons on an external CD-volume appear on the =
desktop of=20
Mac OS 9. The desktop database holds the icon info but where is info. =
like=20
Window-sizing on the Mac, no. of =
icons per row,=20
spacing of icons etc. stored ? Is this stored on the hard-disk of the =
Mac or=20
is there some way in which I can get this to be stored on my CD =
as well ?=20
Is this part of the desktop database too ?
The situation is as follows - when I =
insert my=20
HFS-CD into my drive and click on the CD-symbol a window opens up =
displaying the icons for all the files present on the CD but they are =
not=20
spaced properly and the view doesn't look all that good - Is there =
some way in=20
which I can display these properly ? ..ie.=20
say 'n' icons in one row etc ? Sometimes there are around 30 =
icons=20
displayed for around 100 files on my CD... then a lot of empty space =
is=20
displayed - which could mislead the user to think that no more files =
are=20
present - and then the remaining 70 file-icons suddenly show =
up.
I presume this doesn't have to be =
stored on the=20
external HFS-volume but rather has something to do with my Mac-OS =
settings...=20
but I'm not too sure. I'd appreciate it if someone could tell me which =
part is=20
responsible for such things ? I'm not creating a desktop DB at the =
moment but=20
this looks really bad and I'd like to change it if I can i.e. if =
this can=20
be overcome somehow without having a desktop database on my=20
CD.
TIA,
Nandini
********** It's not easy to find =
happiness in=20
ourselves and it's not possible to find it elsewhere=20
************
------=_NextPart_000_0040_01C1ED34.33985C70--
From Biswaroop\(External\)" <000801c1ed16$f54a1160$0401a7c0@modemserver> <009401c1ed1a$a3587320$1c0a0a0a@bisban> <001e01c1ed20$60be1190$0401a7c0@modemserver>
Message-ID: <00ef01c1ed2a$240fa920$1c0a0a0a@bisban>
Hi Nandini,
Well if I make mdb.drAttrib = 0;
Then I will be nullifying the other volume conditions.
Therefore I am Oring it and I believe the code
which will check for the Readonly flag will have
this logic ..
if(mdb.drAttrib & HFS_READONLY)
{
//Means Volume is Readonly
}
where
# define HFS_READONLY (1<<15)
What do u say??
regs
Biswaroop
----- Original Message -----
From: "Entwicklung"
To: "Biswaroop(External)"
Cc:
Sent: Friday, April 26, 2002 6:16 PM
Subject: Re: [hfs-user] To make a Readonly HFS Volume
> Are you sure you've set drAtrb to 0 first before OR-ing 0x8000 with it ?
>
> Or are you just setting mdb.drAtrb = 0x8000 instead of :
>
> 1) mdb.drAtrb = 0x0000;
> 2) mdb.drAtrb | = 0x8000 ;
>
> Stt 2) without stt 1) might result in some unknown value getting written.
>
> -Nandini
>
>
> ----- Original Message -----
> From: "Biswaroop(External)"
> To: "Entwicklung"
> Sent: Friday, April 26, 2002 2:05 PM
> Subject: Re: [hfs-user] To make a Readonly HFS Volume
>
>
> > Hi Nandini,
> > Thanks for a Quick Reply.
> > But I did that too..but no success.
> > regrds
> > Biswaroop
> > ----- Original Message -----
> > From: "Entwicklung"
> > To: "Biswaroop(External)"
> > Cc:
> > Sent: Friday, April 26, 2002 5:08 PM
> > Subject: Re: [hfs-user] To make a Readonly HFS Volume
> >
> >
> > > Wouldn't setting bit 15 give 0x8000 ??? numbering the 16 bits from
0..15
> > > i.e.
> > >
> > > - Nandini
> > >
> > > ----- Original Message -----
> > > From: "Biswaroop(External)"
> > > To:
> > > Sent: Friday, April 26, 2002 1:17 PM
> > > Subject: [hfs-user] To make a Readonly HFS Volume
> > >
> > >
> > > > Hi ,
> > > >
> > > > I want to make a HFS volume readonly.
> > > > I am setting the flag in mdb.drAtrb to
> > > >
> > > > mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
> > > >
> > > > Bit Meaning
> > > > 15 Set if th volume is Locked by Software.
> > > >
> > > > After creating a Image of such a Volume.
> > > > I am mounting it with a FreeWare application in Windows which can
> mount
> > > HFS
> > > > volumes.
> > > > But , I can still add files to that volume through this
> > > > software and delete them too.
> > > > That shows the volume is not Locked.
> > > > So, anything else I should do to Volume parameters
> > > > to make that Volume represent a ReadOnly one??
> > > >
> > > > Waiting for ur Inputs.
> > > >
> > > > Regards
> > > > Biswaroop
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The difference between sunrise and
> > > > sunset lies in the freshness of your
> > > > eyes.
> > > > --Bisban
From entwicklung@whengenibk.de Fri Apr 26 15:44:10 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 26 Apr 2002 16:44:10 +0200
Subject: [hfs-user] To make a Readonly HFS Volume
References: <008401c1ed14$06206640$1c0a0a0a@bisban> <000801c1ed16$f54a1160$0401a7c0@modemserver> <009401c1ed1a$a3587320$1c0a0a0a@bisban> <001e01c1ed20$60be1190$0401a7c0@modemserver> <00ef01c1ed2a$240fa920$1c0a0a0a@bisban>
Message-ID: <000601c1ed30$d790aac0$0401a7c0@modemserver>
> Well if I make mdb.drAttrib = 0;
> Then I will be nullifying the other volume conditions.
Not necessarily.... just check if mdb.drAttrib has been set to 0 right
before you OR it with your other conditions - not initializing your
variables correctly is obviously not a good choice... what kind of logic you
use is left to you..
- Nandini
> Therefore I am Oring it and I believe the code
> which will check for the Readonly flag will have
> this logic ..
> if(mdb.drAttrib & HFS_READONLY)
> {
> file://Means Volume is Readonly
> }
> where
> # define HFS_READONLY (1<<15)
>
> What do u say??
>
>
> ----- Original Message -----
> From: "Entwicklung"
> To: "Biswaroop(External)"
> Cc:
> Sent: Friday, April 26, 2002 6:16 PM
> Subject: Re: [hfs-user] To make a Readonly HFS Volume
>
>
> > Are you sure you've set drAtrb to 0 first before OR-ing 0x8000 with it ?
> >
> > Or are you just setting mdb.drAtrb = 0x8000 instead of :
> >
> > 1) mdb.drAtrb = 0x0000;
> > 2) mdb.drAtrb | = 0x8000 ;
> >
> > Stt 2) without stt 1) might result in some unknown value getting
written.
> >
> > -Nandini
> >
> >
> > ----- Original Message -----
> > From: "Biswaroop(External)"
> > To: "Entwicklung"
> > Sent: Friday, April 26, 2002 2:05 PM
> > Subject: Re: [hfs-user] To make a Readonly HFS Volume
> >
> >
> > > Hi Nandini,
> > > Thanks for a Quick Reply.
> > > But I did that too..but no success.
> > > regrds
> > > Biswaroop
> > > ----- Original Message -----
> > > From: "Entwicklung"
> > > To: "Biswaroop(External)"
> > > Cc:
> > > Sent: Friday, April 26, 2002 5:08 PM
> > > Subject: Re: [hfs-user] To make a Readonly HFS Volume
> > >
> > >
> > > > Wouldn't setting bit 15 give 0x8000 ??? numbering the 16 bits from
> 0..15
> > > > i.e.
> > > >
> > > > - Nandini
> > > >
> > > > ----- Original Message -----
> > > > From: "Biswaroop(External)"
> > > > To:
> > > > Sent: Friday, April 26, 2002 1:17 PM
> > > > Subject: [hfs-user] To make a Readonly HFS Volume
> > > >
> > > >
> > > > > Hi ,
> > > > >
> > > > > I want to make a HFS volume readonly.
> > > > > I am setting the flag in mdb.drAtrb to
> > > > >
> > > > > mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
> > > > >
> > > > > Bit Meaning
> > > > > 15 Set if th volume is Locked by Software.
> > > > >
> > > > > After creating a Image of such a Volume.
> > > > > I am mounting it with a FreeWare application in Windows which can
> > mount
> > > > HFS
> > > > > volumes.
> > > > > But , I can still add files to that volume through this
> > > > > software and delete them too.
> > > > > That shows the volume is not Locked.
> > > > > So, anything else I should do to Volume parameters
> > > > > to make that Volume represent a ReadOnly one??
> > > > >
> > > > > Waiting for ur Inputs.
> > > > >
> > > > > Regards
> > > > > Biswaroop
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > The difference between sunrise and
> > > > > sunset lies in the freshness of your
> > > > > eyes.
> > > > > --Bisban
From Biswaroop\(External\)"
Hi Everybody,
I have enquired a very queer problem.
What I did...
1. Created a Volume File and inserted some
Text documents in that volume.
2. I then wrote that Volume Image file on to a CD
using a mastering application which just dumps the
image on to the disc.
3. Took the CD and mounted it in Mac OS 9.2
The files were displayed but when I clicked it
for opening it I got a Error Mssg saying
"Simple Text" cannot open this Kind of File.
4. Next I mounted it in Mac OS X the new OS from
Mac.
Amazing enough It showed all the files and the
data correctly.
Inference:
The data is written correctly on to the Cd and it
is being recognized by Mac (MAC OS X).
Both the OS show the files properly and recognize
it as HFS formatted volume.
Point to note..
Since the text files were copied from a Windows volume in Binary mode no
CRLF conversions were
done.
But in Mac OS X it didnot show any wrong display
and everything was fine.
Thirdly when I wrote other types of files in the volume
eg. *.htm, *.pdf
They were shown in both the Mac OS's(9.2 and X)
but again the Text files couldnot be opened only in
Mac OS 9.2
Fourthly,
when I mount the Volume File created by my application
using a freeware"HFVExplorer" I can view all the
files and data (i.e. Text files are getting opened and
displayed).
From all the above experiments
I think my code is not the Culprit!!
And only "Text Files" are not getting opened.
Then where is the BUG??
Any ideas!
have a nice weekend.
Bye
Biswaroop
The difference between sunrise and
sunset lies in the freshness of your
eyes.
--Bisban
From pwd@apple.com Fri Apr 26 16:46:39 2002
From: pwd@apple.com (Patrick Dirks)
Date: Fri, 26 Apr 2002 08:46:39 -0700
Subject: [hfs-user] Re: Desktop View
In-Reply-To: <004301c1ed23$71a79190$0401a7c0@modemserver>
Message-ID:
--Apple-Mail-1-726610609
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
If you're zeroing out the other FinderInfo fields I suspect your=20
settings are being ignored by the Finder because the "initited" flag=20
isn't set in the Finder flags. That's the Finder's que that this=20
information has never been set and should be initialized to some default=20=
values.
-Patrick.
On Friday, April 26, 2002, at 06:08 AM, Entwicklung wrote:
> Hi,
> =A0
> As Patrick had suggested - from the Apple technical notes I gathered=20=
> that the structures I need to set the window settings of folders have=20=
> the required form :
> =A0
> struct DInfo {
> =A0=A0=A0=A0=A0 Rect=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
frRect;=A0=A0=A0=A0=A0=A0=A0 /*folder's window rectangle*/
> =A0=A0=A0=A0=A0 unsigned short=A0=A0=A0 frFlags;=A0=A0=A0=A0=A0=A0 =
/*flags*/
> =A0=A0=A0=A0=A0 Point=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
frLocation;=A0=A0=A0 /*folder's location in window*/
> =A0=A0=A0=A0=A0 short=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
frView;=A0=A0=A0=A0=A0=A0=A0 /*folder's view*/
> };
>
> struct DXInfo {
> =A0=A0=A0=A0=A0 Point=A0=A0=A0=A0=A0=A0=A0=A0=A0 frScroll;=A0=A0=A0=A0=A0=
=A0=A0=A0 /*scroll position*/
> =A0=A0=A0=A0=A0 long=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frOpenChain;=A0=A0=A0=
=A0=A0 /*directory ID chain of open=20
> folders*/
> =A0=A0=A0=A0=A0 char=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frScript;=A0=A0=A0=A0=
=A0=A0=A0=A0 /*script flag and code*/
> =A0=A0=A0=A0=A0 char=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frXFlags;=A0=A0=A0=A0=
=A0=A0=A0=A0 /*reserved*/
> =A0=A0=A0=A0=A0 short=A0=A0=A0=A0=A0=A0=A0=A0=A0 frComment;=A0=A0=A0=A0=A0=
=A0=A0 /*comment ID*/
> =A0=A0=A0=A0=A0 long=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frPutAway;=A0=A0=A0=A0=
=A0=A0=A0 /*directory ID*/
> };
> =A0
> I want to set say my root folder's window size to a pretty large value=20=
> so that as soon as I click on my CD-symbol a large window opens=20
> up=A0displaying the contents of the CD.
> Now Rect defines the size and location of a QuickDraw rectangle.
>
> struct=A0Rect=A0{
> =A0=A0=A0=A0short=A0=A0=A0=A0top;
> =A0=A0=A0=A0short=A0=A0=A0=A0left;
> =A0=A0=A0=A0short=A0=A0=A0=A0bottom;
> =A0=A0=A0=A0short=A0=A0=A0=A0right;
> };
>
> top
> The vertical coordinate of the upper-left point of the rectangle.
> left
> The horizontal coordinate of the upper-left point of the rectangle.
> bottom
> The vertical coordinate of the lower-right point of the rectangle.
> right
> The horizontal coordinate of the lower-right point of the rectangle.
>
> I set top to 5, left to 5 bottom to 200 and right to 200...... but the=20=
> default rectangle (a smaller sized one)
> still continues to appear. What am I doing wrong out here ?.. sth =
wrong=20
> with the values ?
> =A0
> The rest of my finder flags are all set to 0 so the finder uses its=20
> default values. I'm only setting the creator and filetype of the files=20=
> in addition to this.
> =A0
> Any tips would help a lot !
> =A0
> Regards,
> Nandini
> =A0
>
> ----- Original Message -----
> From: Entwicklung
> To: studentdev@lists.apple.com ; hfs-user@lists.mars.org ;=20
> darwin-development@lists.apple.com
> Cc: Thomas Tempelmann
> Sent: Thursday, April 25, 2002 8:06 AM
> Subject: Desktop View
>
> Hello,
> =A0=A0=A0=A0 I need some help.
> I'd like to know what part of the HFS format is responsible for how=20
> icons on an external CD-volume appear on the desktop of Mac OS 9. The=20=
> desktop database holds the icon info but where is info. like
> Window-sizing on the Mac, no. of icons per row, spacing of icons etc.=20=
> stored ? Is this stored on the hard-disk of the Mac or is=A0there some=20=
> way in which I can get this to be stored on my CD as well ? Is this=20
> part of the desktop database too ?
> =A0
> The situation is as follows - when I insert my HFS-CD into my drive =
and=20
> click on the=A0CD-symbol a window opens up displaying the icons for =
all=20
> the files present on the CD but they are not spaced properly and the=20=
> view doesn't look all that good - Is there some way in which I can=20
> display these=A0properly ? ..ie. say=A0'n' icons in one row etc ? =
Sometimes=20
> there are around 30 icons displayed for around 100 files on my CD...=20=
> then a lot of empty space is displayed - which could mislead the user=20=
> to think that no more files are present - and then the remaining 70=20
> file-icons suddenly show up.
> =A0
> I presume this doesn't have to be stored on the external HFS-volume =
but=20
> rather has something to do with my Mac-OS settings... but I'm not too=20=
> sure. I'd appreciate it if someone could tell me which part is=20
> responsible for such things ? I'm not creating a desktop DB at the=20
> moment but this looks really bad and I'd like to change it if I can=20
> i.e. if this=A0can be overcome somehow without=A0having a desktop =
database=20
> on my CD.
> =A0
> TIA,
> Nandini
> =A0
> =A0
> =A0
> ********** It's not easy to find happiness in ourselves and it's not=20=
> possible to find it elsewhere ************
>
--Apple-Mail-1-726610609
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
If you're zeroing out the other FinderInfo fields I suspect your
settings are being ignored by the Finder because the "initited" flag
isn't set in the Finder flags. That's the Finder's que that this
information has never been set and should be initialized to some
default values.
-Patrick.
On Friday, April 26, 2002, at 06:08 AM, Entwicklung wrote:
=
ArialHi,
=A0
ArialAs Patrick had suggested -
from the Apple technical notes I gathered that the structures I need
to set the window settings of folders have the required form =
:
=A0
Arialstruct DInfo {
=A0=A0=A0=A0=A0 Rect=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
frRect;=A0=A0=A0=A0=A0=A0=A0 /*folder's window rectangle*/
=A0=A0=A0=A0=A0 unsigned short=A0=A0=A0 frFlags;=A0=A0=A0=A0=A0=A0 =
/*flags*/
=A0=A0=A0=A0=A0 Point=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frLocation;=A0=A0=
=A0 /*folder's location in window*/
=A0=A0=A0=A0=A0 short=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frView;=A0=A0=A0=
=A0=A0=A0=A0 /*folder's view*/
};
struct DXInfo {
=A0=A0=A0=A0=A0 Point=A0=A0=A0=A0=A0=A0=A0=A0=A0 frScroll;=A0=A0=A0=A0=A0=A0=
=A0=A0 /*scroll position*/
=A0=A0=A0=A0=A0 long=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frOpenChain;=A0=A0=A0=A0=
=A0 /*directory ID chain of open
folders*/
=A0=A0=A0=A0=A0 char=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frScript;=A0=A0=A0=A0=A0=
=A0=A0=A0 /*script flag and code*/
=A0=A0=A0=A0=A0 char=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frXFlags;=A0=A0=A0=A0=A0=
=A0=A0=A0 /*reserved*/
=A0=A0=A0=A0=A0 short=A0=A0=A0=A0=A0=A0=A0=A0=A0 frComment;=A0=A0=A0=A0=A0=
=A0=A0 /*comment ID*/
=A0=A0=A0=A0=A0 long=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 frPutAway;=A0=A0=A0=A0=A0=
=A0=A0 /*directory ID*/
};
=A0
ArialI want to set say my root
folder's window size to a pretty large value so that as soon as I
click on my CD-symbol a large window opens up=A0displaying the contents
of the CD.
ArialNow Rect defines the size and
location of a QuickDraw rectangle.
struct=A0Rect=A0{
=A0=A0=A0=A0short=A0=A0=A0=A0top;
=A0=A0=A0=A0short=A0=A0=A0=A0left;
=A0=A0=A0=A0short=A0=A0=A0=A0bottom;
=A0=A0=A0=A0short=A0=A0=A0=A0right;
};Arial
=
topArial<=
smaller>
The vertical coordinate of the upper-left point of the rectangle.
=
leftArial=
The horizontal coordinate of the upper-left point of the rectangle.
=
bottomArial
The vertical coordinate of the lower-right point of the rectangle.
=
rightArial
The horizontal coordinate of the lower-right point of the rectangle.
I set top to 5, left to 5 bottom to 200 and right to 200...... but the
default rectangle (a smaller sized one)
Arialstill continues to appear.
What am I doing wrong out here ?.. sth wrong with the values =
?
=A0
ArialThe rest of my finder flags
are all set to 0 so the finder uses its default values. I'm only
setting the creator and filetype of the files in addition to =
this.
=A0
ArialAny tips would help a lot =
!
=A0
ArialRegards,
ArialNandini
Arial=A0
----- Original Message -----
From:
=
1999,1999,FFFFEntwicklung
To:
=
1999,1999,FFFFstudentdev@lists.apple.com<=
/color>
; =
1999,1999,FFFFhfs-user@lists.mars.org
; =
1999,1999,FFFFdarwin-development@lists.ap=
ple.com
Cc: 1999,1999,FFFFThomas
Tempelmann
Sent: Thursday, April 25, 2002 8:06 AM
Subject: Desktop View
ArialHello,
Arial=A0=A0=A0=A0 I need some =
help.
ArialI'd like to know what part of
the HFS format is responsible for how icons on an external CD-volume
appear on the desktop of Mac OS 9. The desktop database holds the icon
info but where is info. like
ArialWindow-sizing on the Mac, no.
of icons per row, spacing of icons etc. stored ? Is this stored on the
hard-disk of the Mac or is=A0there some way in which I can get this to
be stored on my CD as well ? Is this part of the desktop database too =
?
=A0
ArialThe situation is as follows -
when I insert my HFS-CD into my drive and click on the=A0CD-symbol a
window opens up displaying the icons for all the files present on the
CD but they are not spaced properly and the view doesn't look all that
good - Is there some way in which I can display
=
these=A0Arialpr=
operly
? ..ie. say=A0'n' icons in one row etc ? Sometimes there are around 30
icons displayed for around 100 files on my CD... then a lot of empty
space is displayed - which could mislead the user to think that no
more files are present - and then the remaining 70 file-icons suddenly
show up.
=A0
ArialI presume this doesn't have
to be stored on the external HFS-volume but rather has something to do
with my Mac-OS settings... but I'm not too sure. I'd appreciate it if
someone could tell me which part is responsible for such things ? I'm
not creating a desktop DB at the moment but this looks really bad and
I'd like to change it if I can i.e. if this=A0can be overcome somehow
without=A0having a desktop database on my CD.
=A0
ArialTIA,
ArialNandini
=A0
=A0
=A0
Arial********** It's not easy to
find happiness in ourselves and it's not possible to find it elsewhere
************
=
--Apple-Mail-1-726610609--
From pwd@apple.com Fri Apr 26 16:52:41 2002
From: pwd@apple.com (Patrick Dirks)
Date: Fri, 26 Apr 2002 08:52:41 -0700
Subject: [hfs-user] MacOS9.2 and MAC OS X
In-Reply-To: <011201c1ed30$e97a3d00$1c0a0a0a@bisban>
Message-ID:
Hi,
Sounds like you're not setting the Finder information for the files; Mac
OS 9 uses the Finder Type and creator to find an application to open the
file. Looks like SimpleText also looks at the file and checks to see
whether the type is "TEXT".
Mac OS X recognizes file extensions in addition to the Finder
information (and its TextEdit app obviously doesn't check the Finder
Type in the Finder Info) so it has no problem just gong straight at the
data.
If you want to verify your data structures, I bet "BBEdit" will read it
without regard for the Finder info.
Hope that helps,
-Patrick.
On Friday, April 26, 2002, at 07:44 AM, Biswaroop(External) wrote:
> Hi Everybody,
>
> I have enquired a very queer problem.
> What I did...
> 1. Created a Volume File and inserted some
> Text documents in that volume.
> 2. I then wrote that Volume Image file on to a CD
> using a mastering application which just dumps the
> image on to the disc.
> 3. Took the CD and mounted it in Mac OS 9.2
> The files were displayed but when I clicked it
> for opening it I got a Error Mssg saying
> "Simple Text" cannot open this Kind of File.
> 4. Next I mounted it in Mac OS X the new OS from
> Mac.
> Amazing enough It showed all the files and the
> data correctly.
> Inference:
> The data is written correctly on to the Cd and it
> is being recognized by Mac (MAC OS X).
> Both the OS show the files properly and recognize
> it as HFS formatted volume.
>
> Point to note..
> Since the text files were copied from a Windows volume in Binary
> mode no
> CRLF conversions were
> done.
> But in Mac OS X it didnot show any wrong display
> and everything was fine.
>
> Thirdly when I wrote other types of files in the volume
> eg. *.htm, *.pdf
> They were shown in both the Mac OS's(9.2 and X)
> but again the Text files couldnot be opened only in
> Mac OS 9.2
>
> Fourthly,
> when I mount the Volume File created by my application
> using a freeware"HFVExplorer" I can view all the
> files and data (i.e. Text files are getting opened and
> displayed).
> From all the above experiments
> I think my code is not the Culprit!!
> And only "Text Files" are not getting opened.
> Then where is the BUG??
> Any ideas!
> have a nice weekend.
> Bye
> Biswaroop
>
>
>
>
>
>
>
>
>
> The difference between sunrise and
> sunset lies in the freshness of your
> eyes.
> --Bisban
From entwicklung@whengenibk.de Sun Apr 28 06:59:38 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 28 Apr 2002 07:59:38 +0200
Subject: [hfs-user] MacOS9.2 and MAC OS X
References:
Message-ID: <008f01c1ee79$e234f720$0401a7c0@modemserver>
That's surprising - coz even in Mac OS 9 I haven't had any problems with
Simpletext documents. As long as a '.txt' extension is there it wasn't
necessary to set filetype and creator - but this seemed to work
only for text-files.. for .pdf for example I had to explicitly set filetype
and creator.
How is it it works fine for me on Mac OS 9 (for text files i.e.) and doesn't
work for Biswaroop on Mac OS 9.2 ?
Regards,
Nandini
----- Original Message -----
From: "Patrick Dirks"
To: "Biswaroop(External)"
Cc:
Sent: Friday, April 26, 2002 5:52 PM
Subject: Re: [hfs-user] MacOS9.2 and MAC OS X
> Hi,
>
> Sounds like you're not setting the Finder information for the files; Mac
> OS 9 uses the Finder Type and creator to find an application to open the
> file. Looks like SimpleText also looks at the file and checks to see
> whether the type is "TEXT".
>
> Mac OS X recognizes file extensions in addition to the Finder
> information (and its TextEdit app obviously doesn't check the Finder
> Type in the Finder Info) so it has no problem just gong straight at the
> data.
>
> If you want to verify your data structures, I bet "BBEdit" will read it
> without regard for the Finder info.
>
> Hope that helps,
> -Patrick.
>
> On Friday, April 26, 2002, at 07:44 AM, Biswaroop(External) wrote:
>
> > Hi Everybody,
> >
> > I have enquired a very queer problem.
> > What I did...
> > 1. Created a Volume File and inserted some
> > Text documents in that volume.
> > 2. I then wrote that Volume Image file on to a CD
> > using a mastering application which just dumps the
> > image on to the disc.
> > 3. Took the CD and mounted it in Mac OS 9.2
> > The files were displayed but when I clicked it
> > for opening it I got a Error Mssg saying
> > "Simple Text" cannot open this Kind of File.
> > 4. Next I mounted it in Mac OS X the new OS from
> > Mac.
> > Amazing enough It showed all the files and the
> > data correctly.
> > Inference:
> > The data is written correctly on to the Cd and it
> > is being recognized by Mac (MAC OS X).
> > Both the OS show the files properly and recognize
> > it as HFS formatted volume.
> >
> > Point to note..
> > Since the text files were copied from a Windows volume in Binary
> > mode no
> > CRLF conversions were
> > done.
> > But in Mac OS X it didnot show any wrong display
> > and everything was fine.
> >
> > Thirdly when I wrote other types of files in the volume
> > eg. *.htm, *.pdf
> > They were shown in both the Mac OS's(9.2 and X)
> > but again the Text files couldnot be opened only in
> > Mac OS 9.2
> >
> > Fourthly,
> > when I mount the Volume File created by my application
> > using a freeware"HFVExplorer" I can view all the
> > files and data (i.e. Text files are getting opened and
> > displayed).
> > From all the above experiments
> > I think my code is not the Culprit!!
> > And only "Text Files" are not getting opened.
> > Then where is the BUG??
> > Any ideas!
> > have a nice weekend.
> > Bye
> > Biswaroop
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > The difference between sunrise and
> > sunset lies in the freshness of your
> > eyes.
> > --Bisban
>
From entwicklung@whengenibk.de Sun Apr 28 07:16:13 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 28 Apr 2002 08:16:13 +0200
Subject: [hfs-user] Re: Desktop View
References:
Message-ID: <00ae01c1ee7c$333fd020$0401a7c0@modemserver>
Hi Patrick,
Thanks for replying !
I'm setting the field Finder flags to 0x0100 (kHasBeenInited) as you had
mentioned in your first email .i.e. I'm setting the userInfo.frFlags field
for my root folder to this value (I haven't set the Bundle bit). I'm setting
finderInfo.frXFlags to 0 - I think these are some extended flags so this
shouldn't matter anyway (?)
I wanted the first window (corresponding to the root folder) which opens up
to be larger in size say -
top - 5
left - 5
bottom - 200
right - 200
Am I setting sth incorrectly?
Regards,
Nandini
----- Original Message -----
From: "Patrick Dirks"
To: "Entwicklung"
Cc: ; ;
Sent: Friday, April 26, 2002 5:46 PM
Subject: Re: [hfs-user] Re: Desktop View
> If you're zeroing out the other FinderInfo fields I suspect your
> settings are being ignored by the Finder because the "initited" flag
> isn't set in the Finder flags. That's the Finder's que that this
> information has never been set and should be initialized to some default
> values.
>
> -Patrick.
>
> On Friday, April 26, 2002, at 06:08 AM, Entwicklung wrote:
>
> > Hi,
> >
> > As Patrick had suggested - from the Apple technical notes I gathered
> > that the structures I need to set the window settings of folders have
> > the required form :
> >
> > struct DInfo {
> > Rect frRect; /*folder's window rectangle*/
> > unsigned short frFlags; /*flags*/
> > Point frLocation; /*folder's location in window*/
> > short frView; /*folder's view*/
> > };
> >
> > struct DXInfo {
> > Point frScroll; /*scroll position*/
> > long frOpenChain; /*directory ID chain of open
> > folders*/
> > char frScript; /*script flag and code*/
> > char frXFlags; /*reserved*/
> > short frComment; /*comment ID*/
> > long frPutAway; /*directory ID*/
> > };
> >
> > I want to set say my root folder's window size to a pretty large value
> > so that as soon as I click on my CD-symbol a large window opens
> > up displaying the contents of the CD.
> > Now Rect defines the size and location of a QuickDraw rectangle.
> >
> > struct Rect {
> > short top;
> > short left;
> > short bottom;
> > short right;
> > };
> >
> > top
> > The vertical coordinate of the upper-left point of the rectangle.
> > left
> > The horizontal coordinate of the upper-left point of the rectangle.
> > bottom
> > The vertical coordinate of the lower-right point of the rectangle.
> > right
> > The horizontal coordinate of the lower-right point of the rectangle.
> >
> > I set top to 5, left to 5 bottom to 200 and right to 200...... but the
> > default rectangle (a smaller sized one)
> > still continues to appear. What am I doing wrong out here ?.. sth wrong
> > with the values ?
> >
> > The rest of my finder flags are all set to 0 so the finder uses its
> > default values. I'm only setting the creator and filetype of the files
> > in addition to this.
> >
> > Any tips would help a lot !
> >
> > Regards,
> > Nandini
> >
> >
> > ----- Original Message -----
> > From: Entwicklung
> > To: studentdev@lists.apple.com ; hfs-user@lists.mars.org ;
> > darwin-development@lists.apple.com
> > Cc: Thomas Tempelmann
> > Sent: Thursday, April 25, 2002 8:06 AM
> > Subject: Desktop View
> >
> > Hello,
> > I need some help.
> > I'd like to know what part of the HFS format is responsible for how
> > icons on an external CD-volume appear on the desktop of Mac OS 9. The
> > desktop database holds the icon info but where is info. like
> > Window-sizing on the Mac, no. of icons per row, spacing of icons etc.
> > stored ? Is this stored on the hard-disk of the Mac or is there some
> > way in which I can get this to be stored on my CD as well ? Is this
> > part of the desktop database too ?
> >
> > The situation is as follows - when I insert my HFS-CD into my drive and
> > click on the CD-symbol a window opens up displaying the icons for all
> > the files present on the CD but they are not spaced properly and the
> > view doesn't look all that good - Is there some way in which I can
> > display these properly ? ..ie. say 'n' icons in one row etc ? Sometimes
> > there are around 30 icons displayed for around 100 files on my CD...
> > then a lot of empty space is displayed - which could mislead the user
> > to think that no more files are present - and then the remaining 70
> > file-icons suddenly show up.
> >
> > I presume this doesn't have to be stored on the external HFS-volume but
> > rather has something to do with my Mac-OS settings... but I'm not too
> > sure. I'd appreciate it if someone could tell me which part is
> > responsible for such things ? I'm not creating a desktop DB at the
> > moment but this looks really bad and I'd like to change it if I can
> > i.e. if this can be overcome somehow without having a desktop database
> > on my CD.
> >
> > TIA,
> > Nandini
> >
> >
> >
> > ********** It's not easy to find happiness in ourselves and it's not
> > possible to find it elsewhere ************
> _______________________________________________
> studentdev mailing list | studentdev@lists.apple.com
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/studentdev
> Do not post admin requests to the list. They will be ignored.
From entwicklung@whengenibk.de Sun Apr 28 11:18:52 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Sun, 28 Apr 2002 12:18:52 +0200
Subject: [hfs-user] Hidden files
Message-ID: <001201c1ee9e$2119ffc0$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C1EEAE.DBE2AB30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How does one get to see hidden files/ change the attributes on Mac OS 9 =
? Someone had written that this is possible using Apple's ResEdit but I =
thought that was just for editing icons and the like. Can one get to see =
hidden system-files at all ?
What else is ResEdit used for normally - is this relevant to external =
HFS-readonly volumes ?
Would be grateful for any tips/suggestions.
Regards,
Nandini=20
********** It's not easy to find happiness in ourselves and it's not =
possible to find it elsewhere ************
------=_NextPart_000_000F_01C1EEAE.DBE2AB30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How does one get to see hidden files/ =
change the=20
attributes on Mac OS 9 ? Someone had written that this is possible using =
Apple's=20
ResEdit but I thought that was just for editing icons and the like. Can =
one get=20
to see hidden system-files at all ?
What else is ResEdit used for normally =
- is this=20
relevant to external HFS-readonly volumes ?
Would be grateful for any=20
tips/suggestions.
Regards,
Nandini
********** It's not easy to find =
happiness in=20
ourselves and it's not possible to find it elsewhere=20
************
------=_NextPart_000_000F_01C1EEAE.DBE2AB30--
From Vallens@Colorado.EDU Sun Apr 28 16:31:07 2002
From: Vallens@Colorado.EDU (Alex Vallens)
Date: Sun, 28 Apr 2002 09:31:07 -0600
Subject: [hfs-user] Re: Hidden files
References: <001201c1ee9e$2119ffc0$0401a7c0@modemserver>
Message-ID: <3CCC06C1.F334CAA3@Colorado.EDU>
Entwicklung wrote:
> How does one get to see hidden files/ change the attributes on Mac OS 9 ?
> Someone had written that this is possible using Apple's ResEdit but I thought
> that was just for editing icons and the like. Can one get to see hidden
> system-files at all ?
Yes, absolutely.
> What else is ResEdit used for normally - is this relevant to external
> HFS-readonly volumes ?
ResEdit was created by Apple to allow Mac developers to customize the resource forks
of the apps they created. Since the creation of the Mac in 1984, the Mac OS (up to
X) has used the resource fork to specify things such as file and creator types,
visibility, read/write permissions (lock mechanism), icons, creation and
modification dates, etc. Every file has one, at least to a certain extent.
There is no use editing resource forks of files on a read-only disk, because,
obviously, the changes made cannot be saved.
Alex
From coolvibe@hackerheaven.org Sun Apr 28 17:21:37 2002
From: coolvibe@hackerheaven.org (Emiel Kollof)
Date: Sun, 28 Apr 2002 18:21:37 +0200
Subject: [hfs-user] Re: Hidden files
In-Reply-To: <001201c1ee9e$2119ffc0$0401a7c0@modemserver>
References: <001201c1ee9e$2119ffc0$0401a7c0@modemserver>
Message-ID: <200204281821.37594.coolvibe@hackerheaven.org>
Op zondag 28 april 2002 12:18, schreef Entwicklung:
> How does one get to see hidden files/ change the attributes on Mac OS 9 ?
[snip]
> Would be grateful for any tips/suggestions.
Open Terminal.app, cd /, ls -l
there ya go.. Oh you want to see them in the finder? Open finder, type
+~ and type the path you'd like to go. You can make hidden files by
naming a file with the UNIX convention that files that start with a dot (.)
are hidden. But that's just the UNIX way of marking files hidden. I think
what people mean with ResEdit is that you can set certain HFS flags that mark
it as 'hidden' as well.
Just my 2 Eurocents,
Emiel Kollof
--
What publishers are looking for these days isn't radical feminism.
It's corporate feminism -- a brand of feminism designed to sell books
and magazines, three-piece suits, airline tickets, Scotch, cigarettes
and, most important, corporate America's message, which runs: "Yes,
women were discriminated against in the past, but that unfortunate
mistake has been remedied; now every woman can attain wealth, prestige
and power by dint of individual rather than collective effort."
-- Susan Gordon
From pwd@apple.com Sun Apr 28 23:25:36 2002
From: pwd@apple.com (Patrick Dirks)
Date: Sun, 28 Apr 2002 15:25:36 -0700
Subject: [hfs-user] MacOS9.2 and MAC OS X
In-Reply-To: <008f01c1ee79$e234f720$0401a7c0@modemserver>
Message-ID:
I have no idea. As far as I know there's nothing in Mac OS 9 that looks
at the content of a file to see if perhaps it's a text file. Of course
it's possible different versions of SimpleText don't contain any check,
or that the check is just a change in what was selected for display in
StandardFile. Clearly something's different between your system and
Biswaroop's.
-Patrick.
On Saturday, April 27, 2002, at 10:59 PM, Entwicklung wrote:
> That's surprising - coz even in Mac OS 9 I haven't had any problems with
> Simpletext documents. As long as a '.txt' extension is there it wasn't
> necessary to set filetype and creator - but this seemed to work
> only for text-files.. for .pdf for example I had to explicitly set
> filetype
> and creator.
>
> How is it it works fine for me on Mac OS 9 (for text files i.e.) and
> doesn't
> work for Biswaroop on Mac OS 9.2 ?
>
> Regards,
> Nandini
>
>
> ----- Original Message -----
> From: "Patrick Dirks"
> To: "Biswaroop(External)"
> Cc:
> Sent: Friday, April 26, 2002 5:52 PM
> Subject: Re: [hfs-user] MacOS9.2 and MAC OS X
>
>
>> Hi,
>>
>> Sounds like you're not setting the Finder information for the files;
>> Mac
>> OS 9 uses the Finder Type and creator to find an application to open
>> the
>> file. Looks like SimpleText also looks at the file and checks to see
>> whether the type is "TEXT".
>>
>> Mac OS X recognizes file extensions in addition to the Finder
>> information (and its TextEdit app obviously doesn't check the Finder
>> Type in the Finder Info) so it has no problem just gong straight at the
>> data.
>>
>> If you want to verify your data structures, I bet "BBEdit" will read it
>> without regard for the Finder info.
>>
>> Hope that helps,
>> -Patrick.
>>
>> On Friday, April 26, 2002, at 07:44 AM, Biswaroop(External) wrote:
>>
>>> Hi Everybody,
>>>
>>> I have enquired a very queer problem.
>>> What I did...
>>> 1. Created a Volume File and inserted some
>>> Text documents in that volume.
>>> 2. I then wrote that Volume Image file on to a CD
>>> using a mastering application which just dumps the
>>> image on to the disc.
>>> 3. Took the CD and mounted it in Mac OS 9.2
>>> The files were displayed but when I clicked it
>>> for opening it I got a Error Mssg saying
>>> "Simple Text" cannot open this Kind of File.
>>> 4. Next I mounted it in Mac OS X the new OS from
>>> Mac.
>>> Amazing enough It showed all the files and the
>>> data correctly.
>>> Inference:
>>> The data is written correctly on to the Cd and it
>>> is being recognized by Mac (MAC OS X).
>>> Both the OS show the files properly and recognize
>>> it as HFS formatted volume.
>>>
>>> Point to note..
>>> Since the text files were copied from a Windows volume in Binary
>>> mode no
>>> CRLF conversions were
>>> done.
>>> But in Mac OS X it didnot show any wrong display
>>> and everything was fine.
>>>
>>> Thirdly when I wrote other types of files in the volume
>>> eg. *.htm, *.pdf
>>> They were shown in both the Mac OS's(9.2 and X)
>>> but again the Text files couldnot be opened only in
>>> Mac OS 9.2
>>>
>>> Fourthly,
>>> when I mount the Volume File created by my application
>>> using a freeware"HFVExplorer" I can view all the
>>> files and data (i.e. Text files are getting opened and
>>> displayed).
>>> From all the above experiments
>>> I think my code is not the Culprit!!
>>> And only "Text Files" are not getting opened.
>>> Then where is the BUG??
>>> Any ideas!
>>> have a nice weekend.
>>> Bye
>>> Biswaroop
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The difference between sunrise and
>>> sunset lies in the freshness of your
>>> eyes.
>>> --Bisban
>>
>
From pwd@apple.com Sun Apr 28 23:25:36 2002
From: pwd@apple.com (Patrick Dirks)
Date: Sun, 28 Apr 2002 15:25:36 -0700
Subject: [hfs-user] MacOS9.2 and MAC OS X
In-Reply-To: <008f01c1ee79$e234f720$0401a7c0@modemserver>
Message-ID:
I have no idea. As far as I know there's nothing in Mac OS 9 that looks
at the content of a file to see if perhaps it's a text file. Of course
it's possible different versions of SimpleText don't contain any check,
or that the check is just a change in what was selected for display in
StandardFile. Clearly something's different between your system and
Biswaroop's.
-Patrick.
On Saturday, April 27, 2002, at 10:59 PM, Entwicklung wrote:
> That's surprising - coz even in Mac OS 9 I haven't had any problems with
> Simpletext documents. As long as a '.txt' extension is there it wasn't
> necessary to set filetype and creator - but this seemed to work
> only for text-files.. for .pdf for example I had to explicitly set
> filetype
> and creator.
>
> How is it it works fine for me on Mac OS 9 (for text files i.e.) and
> doesn't
> work for Biswaroop on Mac OS 9.2 ?
>
> Regards,
> Nandini
>
>
> ----- Original Message -----
> From: "Patrick Dirks"
> To: "Biswaroop(External)"
> Cc:
> Sent: Friday, April 26, 2002 5:52 PM
> Subject: Re: [hfs-user] MacOS9.2 and MAC OS X
>
>
>> Hi,
>>
>> Sounds like you're not setting the Finder information for the files;
>> Mac
>> OS 9 uses the Finder Type and creator to find an application to open
>> the
>> file. Looks like SimpleText also looks at the file and checks to see
>> whether the type is "TEXT".
>>
>> Mac OS X recognizes file extensions in addition to the Finder
>> information (and its TextEdit app obviously doesn't check the Finder
>> Type in the Finder Info) so it has no problem just gong straight at the
>> data.
>>
>> If you want to verify your data structures, I bet "BBEdit" will read it
>> without regard for the Finder info.
>>
>> Hope that helps,
>> -Patrick.
>>
>> On Friday, April 26, 2002, at 07:44 AM, Biswaroop(External) wrote:
>>
>>> Hi Everybody,
>>>
>>> I have enquired a very queer problem.
>>> What I did...
>>> 1. Created a Volume File and inserted some
>>> Text documents in that volume.
>>> 2. I then wrote that Volume Image file on to a CD
>>> using a mastering application which just dumps the
>>> image on to the disc.
>>> 3. Took the CD and mounted it in Mac OS 9.2
>>> The files were displayed but when I clicked it
>>> for opening it I got a Error Mssg saying
>>> "Simple Text" cannot open this Kind of File.
>>> 4. Next I mounted it in Mac OS X the new OS from
>>> Mac.
>>> Amazing enough It showed all the files and the
>>> data correctly.
>>> Inference:
>>> The data is written correctly on to the Cd and it
>>> is being recognized by Mac (MAC OS X).
>>> Both the OS show the files properly and recognize
>>> it as HFS formatted volume.
>>>
>>> Point to note..
>>> Since the text files were copied from a Windows volume in Binary
>>> mode no
>>> CRLF conversions were
>>> done.
>>> But in Mac OS X it didnot show any wrong display
>>> and everything was fine.
>>>
>>> Thirdly when I wrote other types of files in the volume
>>> eg. *.htm, *.pdf
>>> They were shown in both the Mac OS's(9.2 and X)
>>> but again the Text files couldnot be opened only in
>>> Mac OS 9.2
>>>
>>> Fourthly,
>>> when I mount the Volume File created by my application
>>> using a freeware"HFVExplorer" I can view all the
>>> files and data (i.e. Text files are getting opened and
>>> displayed).
>>> From all the above experiments
>>> I think my code is not the Culprit!!
>>> And only "Text Files" are not getting opened.
>>> Then where is the BUG??
>>> Any ideas!
>>> have a nice weekend.
>>> Bye
>>> Biswaroop
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The difference between sunrise and
>>> sunset lies in the freshness of your
>>> eyes.
>>> --Bisban
>>
>
From pwd@apple.com Mon Apr 29 05:44:10 2002
From: pwd@apple.com (Patrick Dirks)
Date: Sun, 28 Apr 2002 21:44:10 -0700
Subject: [hfs-user] Re: Hidden files
In-Reply-To: <3CCC06C1.F334CAA3@Colorado.EDU>
Message-ID:
On Sunday, April 28, 2002, at 08:31 AM, Alex Vallens wrote:
> Entwicklung wrote:
>
>> How does one get to see hidden files/ change the attributes on Mac OS
>> 9 ?
>> Someone had written that this is possible using Apple's ResEdit but I
>> thought
>> that was just for editing icons and the like. Can one get to see hidden
>> system-files at all ?
>
> Yes, absolutely.
>
>> What else is ResEdit used for normally - is this relevant to external
>> HFS-readonly volumes ?
>
> ResEdit was created by Apple to allow Mac developers to customize the
> resource forks
> of the apps they created. Since the creation of the Mac in 1984, the
> Mac OS (up to
> X) has used the resource fork to specify things such as file and
> creator types,
> visibility, read/write permissions (lock mechanism), icons, creation and
> modification dates, etc. Every file has one, at least to a certain
> extent.
Actually that's not exactly correct. The MacOS filesystem, HFS and
HFS+, store some meta-data in the catalog record itself, apart from any
file data in the data fork or resource fork. In addition to some of the
more traditional metadata such as create/modify/backup dates there's 32
bytes of so-called Finder Info, split into two 16-byte records for
historical reasons, that hold fields like the file and creator type, and
flags such as the invisible flag.
"Hidden" (or "invisible") files are just the result of a convention in
the Finder: if the Finder flags have a bit set that indicates the file
should be invisible, the Finder just won't show it. It's still very
much present in the catalog and can be manipulated using all the usual
tools.
ResEdit was, as the name suggests, written to edit the contents of the
resource fork of a file, where items like icons, dialogs, and text
strings were stored. In addition some of the Finder flags relate to the
use of the contents of the resource fork: there's a "Bundle bit", for
instance, which hints to the Finder that this file's resource fork
contains a "BNDL" resource that defines new associations between finder
type/creator pairs and icons in this resource fork. For the convenience
of the developer, ResEdit grew to provide access to all of the defined
Finder flags and some other fields as well, so ResEdit can be used to
set or clear the "invisible" bit in the Finder flags.
Although there's a copy of some of the Finder information stored in the
header portion of the resource fork for disk recovery purposes, that is
not the primary storage for that information and that's not where the
filesystem looks for it. Furthermore, files can have a data fork, a
resource fork, both, or neither; not all files have a resource fork
(i.e. it can be of zero length).
Hope that helps,
-Pat Dirks.
From Biswaroop\(External\)"
Hi,
When I create a volume of bigger size for eg. 640 MB
Now since allocation units is fixed at 65536.
Therefore
Bytes per allocation unit becomes
640 * 2 ^20 / 65536 = 10 * 2^10 (10K) (approx)
That means if i give even one allocation block
for each file i am physically giving him 10k space
even though file may be some 100 bytes which
results in space wastage.
I also believe there is no solution because each
file should have atleast one allocation block
and each file should start from a new allocation
block .
I am just wondering if I am right???
Or there is some alternative!!
Waitng for ur comments.
regards
Biswaroop
The difference between sunrise and
sunset lies in the freshness of your
eyes.
--Bisban
From entwicklung@whengenibk.de Tue Apr 30 15:14:48 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 30 Apr 2002 16:14:48 +0200
Subject: [hfs-user] Problem of Allocation Block Size
References: <000901c1f036$454a9320$1c0a0a0a@bisban>
Message-ID: <000801c1f051$63971ef0$0401a7c0@modemserver>
Hi Biswaroop,
You're right - for larger images a larger allocation
block size is necessary (limitation of HFS). The only 'alternative' would be
to use HFS+ and a smaller allocation block size.
-Nandini
----- Original Message -----
From: "Biswaroop(External)"
To:
Sent: Tuesday, April 30, 2002 1:00 PM
Subject: [hfs-user] Problem of Allocation Block Size
> Hi,
>
> When I create a volume of bigger size for eg. 640 MB
>
> Now since allocation units is fixed at 65536.
> Therefore
> Bytes per allocation unit becomes
> 640 * 2 ^20 / 65536 = 10 * 2^10 (10K) (approx)
> That means if i give even one allocation block
> for each file i am physically giving him 10k space
> even though file may be some 100 bytes which
> results in space wastage.
> I also believe there is no solution because each
> file should have atleast one allocation block
> and each file should start from a new allocation
> block .
> I am just wondering if I am right???
> Or there is some alternative!!
> Waitng for ur comments.
> regards
> Biswaroop
>
>
> The difference between sunrise and
> sunset lies in the freshness of your
> eyes.
> --Bisban
>
From pwd@apple.com Tue Apr 30 18:27:45 2002
From: pwd@apple.com (Patrick Dirks)
Date: Tue, 30 Apr 2002 10:27:45 -0700
Subject: [hfs-user] Problem of Allocation Block Size
In-Reply-To: <000901c1f036$454a9320$1c0a0a0a@bisban>
Message-ID: <959BBB0A-5C5F-11D6-BDA6-0003930DF574@apple.com>
Hi Biswaroop,
You're right; HFS limits the number of allocation blocks to be somewhere
between 2^31 and 2^32 at best, which forces allocation block sizes to
get larger and larger as the disk size goes up. This problem, and the
resulting waste of space, was one of the factors that drove the
development of HFS+ which can work with much smaller allocation blocks
than HFS for a given volume size.
-Patrick.
On Tuesday, April 30, 2002, at 04:00 AM, Biswaroop(External) wrote:
> Hi,
>
> When I create a volume of bigger size for eg. 640 MB
>
> Now since allocation units is fixed at 65536.
> Therefore
> Bytes per allocation unit becomes
> 640 * 2 ^20 / 65536 = 10 * 2^10 (10K) (approx)
> That means if i give even one allocation block
> for each file i am physically giving him 10k space
> even though file may be some 100 bytes which
> results in space wastage.
> I also believe there is no solution because each
> file should have atleast one allocation block
> and each file should start from a new allocation
> block .
> I am just wondering if I am right???
> Or there is some alternative!!
> Waitng for ur comments.
> regards
> Biswaroop
>
>
> The difference between sunrise and
> sunset lies in the freshness of your
> eyes.
> --Bisban
>
From entwicklung@whengenibk.de Thu May 2 07:46:13 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 2 May 2002 08:46:13 +0200
Subject: [hfs-user] HFS-Plus and Wrappers
Message-ID: <000e01c1f1a5$0e16fd10$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C1F1B5.D0B45BA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
Recently there was a bit of discussion on =
HFS-Wrappers on the hfs-user mailing list and how it allows a computer =
with HFS (but no HFS Plus support) to start up or display a ReadMe to =
the user to improve the user-experience.
The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper volume contains five files in the root folder - a ReadMe, System =
and Finder, Desktop DB and Desktop DF.
I'm a third-party developer creating an HFS-Plus volume (non-bootable) =
interested in extending the functionality of my HFS-Plus volume to =
include a Wrapper as well. I want to know whether:
1) these 5 files are actually necessary or it would suffice if only the =
ReadMe is present ?
2) would this mean that the Desktop DB and DF files would be present =
twice (on an Apple-initialized volume) ? - once in the HFS-Wrapper and =
once in the HFS-Plus catalog ?
3) is there any documentation from Apple which describes how this ReadMe =
file is stored up in the Wrapper's catalog (I gathered it's not hidden) =
in order to function as expected ?... reverse-engineering
can be painful sometimes..
4) are the contents of the ReadMe file fixed or could I write anything I =
want into it ?
Would be glad of any tips/suggestions !
-Nandini
***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***
------=_NextPart_000_000B_01C1F1B5.D0B45BA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
Recently there was a bit of discussion on HFS-Wrappers on the hfs-user =
mailing=20
list and how it allows a computer with HFS (but no HFS Plus support) to =
start up=20
or display a ReadMe to the user to improve the =
user-experience.
The tech. notes (TN 1150: HFS Plus =
Volume Format)=20
says that the HFS wrapper volume contains five files in the root folder =
- a=20
ReadMe, System and Finder, Desktop DB and Desktop DF.
I'm a third-party developer creating an =
HFS-Plus=20
volume (non-bootable) interested in extending the functionality of my =
HFS-Plus=20
volume to include a Wrapper as well. I want to know =
whether:
1) these 5 files are actually necessary or it would suffice if only the =
ReadMe is=20
present ?
2) would this mean that the Desktop DB =
and DF files=20
would be present twice (on an Apple-initialized volume) ? - once in the=20
HFS-Wrapper and once in the HFS-Plus catalog ?
3) is there any documentation from =
Apple which=20
describes how this ReadMe file is stored up in the Wrapper's catalog=20
(I gathered it's not hidden) in order =
to function=20
as expected ?... reverse-engineering
can be painful sometimes..
4) are the contents of the ReadMe file =
fixed or=20
could I write anything I want into it ?
Would be glad of any tips/suggestions=20
!
-Nandini
***Every day is a new beginning..a =
brand new start,=20
to bring joy and fulfilment to the sad and weary=20
heart***
------=_NextPart_000_000B_01C1F1B5.D0B45BA0--
From pwd@apple.com Thu May 2 08:13:21 2002
From: pwd@apple.com (Patrick Dirks)
Date: Thu, 2 May 2002 00:13:21 -0700
Subject: [hfs-user] HFS-Plus and Wrappers
In-Reply-To: <000e01c1f1a5$0e16fd10$0401a7c0@modemserver>
Message-ID: <15FFA71E-5D9C-11D6-A77E-0003930DF574@apple.com>
--Apple-Mail-1--933271002
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
1. You'll probably need at least 3: the ReadMe (or whatever file you =
like to have shown) and the Desktop DB and Desktop DF. The latter two =
are there to make the Finder happy; if they're not present the Finder =
will try to create them and will end up creating them somewhere in the =
bowels of whatever system happens to be running because they can't be =
created on the read-only disk. The wrapper also has no space available, =
typically. Altogether much better to have a skeleton Desktop DB and =
Desktop DF there. You can copy them from any freshly initialized HFS =
floppy: the Desktop DB will have a few blocks of valid data in a small =
file, the Desktop DF file should be zero length in all likelihood.
I'm not entirely sure why the System and Finder files are there; they =
might be there to placate simple-minded software that checks for them =
when deciding whether the volume is potentially bootable. If your =
wrapped HFS+ volume is unbootable anyway, I bet you can get away without =
them.
2. Yes, there are two completely unrelated sets of Desktop DB and =
Desktop DF files. The ones in the wrapper are ordinarily ignored =
because it's the "wrapped" HFS+ volume that's actually mounted. The =
ones in the wrapper can be empty - their content is largely irrelevant.
3. The ReadMe file is stored as an ordinary file on a plain HFS volume. =
Nothing special (that's the whole point - it's there for the consumption =
of systems that only know about HFS).
4. You can not only write anything you like in the ReadMe file, you can =
call the file anything you want, have anything else you want besides =
(wanna throw in a QuickTime movie of yourself? No problem!). It's =
strictly cosmetic, solely for the benefit of the poor human who suddenly =
can't find the hard drive's contents on this system.
The most interesting part of the wrapper volume is the pointer to the =
HFS+ volume embedded. I believe the blocks used by the HFS+ volume are =
usually specified as used up by the "Bad block" file on the wrapper =
volume, so the wrapper volume looks like a large volume with a few =
files, no free space, and a ton of bad blocks.
Hope that helps,
-Pat Dirks.
On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:
> Hello Listers,
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Recently there =
was a bit of discussion on HFS-Wrappers on the hfs-user mailing list and =
how it allows a computer with HFS (but no HFS Plus support) to start up =
or display a ReadMe to the user to improve the user-experience.
> The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper volume contains five files in the root folder - a ReadMe, System =
and Finder, Desktop DB and Desktop DF.
> =A0
> I'm a third-party developer creating an HFS-Plus volume (non-bootable) =
interested in extending the functionality of my HFS-Plus volume to =
include a Wrapper as well. I want to know whether:
> =A0
> 1)=A0these 5 files=A0are actually necessary or it would suffice if =
only the ReadMe is present ?
> 2) would this mean that the Desktop DB and DF files would be present =
twice (on an Apple-initialized volume) ? - once in the HFS-Wrapper and =
once in the HFS-Plus catalog ?
> 3) is there any documentation from Apple which describes how this =
ReadMe file is stored up in the Wrapper's catalog (I gathered it's not =
hidden) in order to function as expected ?... reverse-engineering
> can be painful sometimes..
> 4) are the contents of the ReadMe file fixed or could I write anything =
I want into it ?
> =A0
> Would be glad of any tips/suggestions !
> -Nandini
> =A0
> =A0
> ***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***
--Apple-Mail-1--933271002
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
1. You'll probably need at least 3: the ReadMe (or whatever file you
like to have shown) and the Desktop DB and Desktop DF. The latter two
are there to make the Finder happy; if they're not present the Finder
will try to create them and will end up creating them somewhere in the
bowels of whatever system happens to be running because they can't be
created on the read-only disk. The wrapper also has no space
available, typically. Altogether much better to have a skeleton
Desktop DB and Desktop DF there. You can copy them from any freshly
initialized HFS floppy: the Desktop DB will have a few blocks of valid
data in a small file, the Desktop DF file should be zero length in all
likelihood.
I'm not entirely sure why the System and Finder files are there; they
might be there to placate simple-minded software that checks for them
when deciding whether the volume is potentially bootable. If your
wrapped HFS+ volume is unbootable anyway, I bet you can get away
without them.
2. Yes, there are two completely unrelated sets of Desktop DB and
Desktop DF files. The ones in the wrapper are ordinarily ignored
because it's the "wrapped" HFS+ volume that's actually mounted. The
ones in the wrapper can be empty - their content is largely irrelevant.
3. The ReadMe file is stored as an ordinary file on a plain HFS
volume. Nothing special (that's the whole point - it's there for the
consumption of systems that only know about HFS).
4. You can not only write anything you like in the ReadMe file, you
can call the file anything you want, have anything else you want
besides (wanna throw in a QuickTime movie of yourself? No problem!).=20
It's strictly cosmetic, solely for the benefit of the poor human who
suddenly can't find the hard drive's contents on this system.
The most interesting part of the wrapper volume is the pointer to the
HFS+ volume embedded. I believe the blocks used by the HFS+ volume
are usually specified as used up by the "Bad block" file on the
wrapper volume, so the wrapper volume looks like a large volume with a
few files, no free space, and a ton of bad blocks.
Hope that helps,
-Pat Dirks.
On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:
ArialHello =
Listers,
Arial=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 Recently
there was a bit of discussion on HFS-Wrappers on the hfs-user mailing
list and how it allows a computer with HFS (but no HFS Plus support)
to start up or display a ReadMe to the user to improve the
user-experience.
ArialThe tech. notes (TN 1150: HFS
Plus Volume Format) says that the HFS wrapper volume contains five
files in the root folder - a ReadMe, System and Finder, Desktop DB and
Desktop DF.
=A0
ArialI'm a third-party developer
creating an HFS-Plus volume (non-bootable) interested in extending the
functionality of my HFS-Plus volume to include a Wrapper as well. I
want to know whether:
=A0
Arial1)=A0these 5 files=A0are =
actually
necessary or it would suffice if only the ReadMe is present =
?
Arial2) would this mean that the
Desktop DB and DF files would be present twice (on an
Apple-initialized volume) ? - once in the HFS-Wrapper and once in the
HFS-Plus catalog ?
Arial3) is there any documentation
from Apple which describes how this ReadMe file is stored up in the
Wrapper's catalog (I gathered it's not hidden) in order to function as
expected ?... reverse-engineering
Arialcan be painful =
sometimes..
Arial4) are the contents of the
ReadMe file fixed or could I write anything I want into it =
?
=A0
ArialWould be glad of any
tips/suggestions !
Arial-Nandini
=A0
=A0
Arial***Every day is a new
beginning..a brand new start, to bring joy and fulfilment to the sad
and weary heart***
=
--Apple-Mail-1--933271002--
From entwicklung@whengenibk.de Thu May 2 08:13:07 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 2 May 2002 09:13:07 +0200
Subject: [hfs-user] HFS-Plus and Wrappers
References: <15FFA71E-5D9C-11D6-A77E-0003930DF574@apple.com>
Message-ID: <000f01c1f1a8$d0547440$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C1F1B9.92F50720
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thanks for the reply !
Regarding 'bad blocks' - I haven't really marked any 'bad blocks' until =
now and am not too sure I know how it is done... will have to read up on =
that. Any idea what happens if I don't mark the blocks of the embedded =
volume as 'bad blocks' but just mark them as allocated in the allocation =
bitmap of the HFS-Wrapper ?=20
Could this be a potential cause of any problems ?
TIA,
Nandini =20
***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***
----- Original Message -----=20
From: Patrick Dirks=20
To: Entwicklung=20
Cc: darwin-development@lists.apple.com ; studentdev@lists.apple.com ; =
hfs-user@lists.mars.org=20
Sent: Thursday, May 02, 2002 9:13 AM
Subject: Re: [hfs-user] HFS-Plus and Wrappers
1. You'll probably need at least 3: the ReadMe (or whatever file you =
like to have shown) and the Desktop DB and Desktop DF. The latter two =
are there to make the Finder happy; if they're not present the Finder =
will try to create them and will end up creating them somewhere in the =
bowels of whatever system happens to be running because they can't be =
created on the read-only disk. The wrapper also has no space available, =
typically. Altogether much better to have a skeleton Desktop DB and =
Desktop DF there. You can copy them from any freshly initialized HFS =
floppy: the Desktop DB will have a few blocks of valid data in a small =
file, the Desktop DF file should be zero length in all likelihood.
I'm not entirely sure why the System and Finder files are there; they =
might be there to placate simple-minded software that checks for them =
when deciding whether the volume is potentially bootable. If your =
wrapped HFS+ volume is unbootable anyway, I bet you can get away without =
them.
2. Yes, there are two completely unrelated sets of Desktop DB and =
Desktop DF files. The ones in the wrapper are ordinarily ignored because =
it's the "wrapped" HFS+ volume that's actually mounted. The ones in the =
wrapper can be empty - their content is largely irrelevant.
3. The ReadMe file is stored as an ordinary file on a plain HFS =
volume. Nothing special (that's the whole point - it's there for the =
consumption of systems that only know about HFS).
4. You can not only write anything you like in the ReadMe file, you =
can call the file anything you want, have anything else you want besides =
(wanna throw in a QuickTime movie of yourself? No problem!). It's =
strictly cosmetic, solely for the benefit of the poor human who suddenly =
can't find the hard drive's contents on this system.
The most interesting part of the wrapper volume is the pointer to the =
HFS+ volume embedded. I believe the blocks used by the HFS+ volume are =
usually specified as used up by the "Bad block" file on the wrapper =
volume, so the wrapper volume looks like a large volume with a few =
files, no free space, and a ton of bad blocks.
Hope that helps,
-Pat Dirks.
On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:
Hello Listers,
Recently there was a bit of discussion on =
HFS-Wrappers on the hfs-user mailing list and how it allows a computer =
with HFS (but no HFS Plus support) to start up or display a ReadMe to =
the user to improve the user-experience.
The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper volume contains five files in the root folder - a ReadMe, System =
and Finder, Desktop DB and Desktop DF.
=20
I'm a third-party developer creating an HFS-Plus volume =
(non-bootable) interested in extending the functionality of my HFS-Plus =
volume to include a Wrapper as well. I want to know whether:
=20
1) these 5 files are actually necessary or it would suffice if only =
the ReadMe is present ?
2) would this mean that the Desktop DB and DF files would be present =
twice (on an Apple-initialized volume) ? - once in the HFS-Wrapper and =
once in the HFS-Plus catalog ?
3) is there any documentation from Apple which describes how this =
ReadMe file is stored up in the Wrapper's catalog (I gathered it's not =
hidden) in order to function as expected ?... reverse-engineering
can be painful sometimes..
4) are the contents of the ReadMe file fixed or could I write =
anything I want into it ?
=20
Would be glad of any tips/suggestions !
-Nandini
=20
=20
***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***
------=_NextPart_000_000C_01C1F1B9.92F50720
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thanks for the reply !
Regarding 'bad blocks' - I haven't =
really marked=20
any 'bad blocks' until now and am not too sure I know how it is done... =
will=20
have to read up on that. Any idea what happens if I don't mark the =
blocks of the=20
embedded volume as 'bad blocks' but just mark them as allocated in =
the=20
allocation bitmap of the HFS-Wrapper ?
Could this be a potential cause of any =
problems=20
?
TIA,
Nandini
***Every day is a new beginning..a =
brand new start,=20
to bring joy and fulfilment to the sad and weary =
heart***/smaller>/fontfamily>
----- Original Message -----
Sent: Thursday, May 02, 2002 =
9:13=20
AM
Subject: Re: [hfs-user] =
HFS-Plus and=20
Wrappers
1. You'll probably need at least 3: the ReadMe (or =
whatever=20
file you like to have shown) and the Desktop DB and Desktop DF. The =
latter two=20
are there to make the Finder happy; if they're not present the Finder =
will try=20
to create them and will end up creating them somewhere in the bowels =
of=20
whatever system happens to be running because they can't be created on =
the=20
read-only disk. The wrapper also has no space available, typically. =
Altogether=20
much better to have a skeleton Desktop DB and Desktop DF there. You =
can copy=20
them from any freshly initialized HFS floppy: the Desktop DB will have =
a few=20
blocks of valid data in a small file, the Desktop DF file should be =
zero=20
length in all likelihood.
I'm not entirely sure why the System =
and=20
Finder files are there; they might be there to placate simple-minded =
software=20
that checks for them when deciding whether the volume is potentially =
bootable.=20
If your wrapped HFS+ volume is unbootable anyway, I bet you can get =
away=20
without them.
2. Yes, there are two completely unrelated sets =
of=20
Desktop DB and Desktop DF files. The ones in the wrapper are =
ordinarily=20
ignored because it's the "wrapped" HFS+ volume that's actually =
mounted. The=20
ones in the wrapper can be empty - their content is largely=20
irrelevant.
3. The ReadMe file is stored as an ordinary file on =
a plain=20
HFS volume. Nothing special (that's the whole point - it's there for =
the=20
consumption of systems that only know about HFS).
4. You can =
not only=20
write anything you like in the ReadMe file, you can call the file =
anything you=20
want, have anything else you want besides (wanna throw in a QuickTime =
movie of=20
yourself? No problem!). It's strictly cosmetic, solely for the benefit =
of the=20
poor human who suddenly can't find the hard drive's contents on this=20
system.
The most interesting part of the wrapper volume is the =
pointer=20
to the HFS+ volume embedded. I believe the blocks used by the HFS+ =
volume are=20
usually specified as used up by the "Bad block" file on the wrapper =
volume, so=20
the wrapper volume looks like a large volume with a few files, no free =
space,=20
and a ton of bad blocks.
Hope that helps,
-Pat =
Dirks.
On=20
Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:
Hello =
Listers,/smaller>/fontfamily>
&nb=
sp; =20
Recently there was a bit of discussion on HFS-Wrappers on the =
hfs-user=20
mailing list and how it allows a computer with HFS (but no HFS Plus =
support)=20
to start up or display a ReadMe to the user to improve the =
user-experience./smaller>/fontfamily>
The=20
tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper=20
volume contains five files in the root folder - a ReadMe, System and =
Finder,=20
Desktop DB and Desktop =
DF./smaller>/fontfamily>
I'm=20
a third-party developer creating an HFS-Plus volume (non-bootable)=20
interested in extending the functionality of my HFS-Plus volume to =
include a=20
Wrapper as well. I want to know=20
whether:/smaller>/fontfamily>
1) these=20
5 files are actually necessary or it would suffice if only the =
ReadMe=20
is present ?/smaller>/fontfamily>
2) would=20
this mean that the Desktop DB and DF files would be present twice =
(on an=20
Apple-initialized volume) ? - once in the HFS-Wrapper and once in =
the=20
HFS-Plus catalog ?/smaller>/fontfamily>
3) is=20
there any documentation from Apple which describes how this ReadMe =
file is=20
stored up in the Wrapper's catalog (I gathered it's not hidden) in =
order to=20
function as expected ?... =
reverse-engineering/smaller>/fontfamily>
can=20
be painful =
sometimes../smaller>/fontfamily>
4)=20
are the contents of the ReadMe file fixed or could I write anything =
I want=20
into it ?/smaller>/fontfamily>
Would=20
be glad of any tips/suggestions =
!/smaller>/fontfamily>
-Nandini/smaller>/fontfamily>
=
***Every=20
day is a new beginning..a brand new start, to bring joy and =
fulfilment to=20
the sad and weary=20
heart***/smaller>/fontfamily>
------=_NextPart_000_000C_01C1F1B9.92F50720--
From pwd@apple.com Thu May 2 08:29:57 2002
From: pwd@apple.com (Patrick Dirks)
Date: Thu, 2 May 2002 00:29:57 -0700
Subject: [hfs-user] HFS-Plus and Wrappers
In-Reply-To: <000f01c1f1a8$d0547440$0401a7c0@modemserver>
Message-ID: <678A85C8-5D9E-11D6-9CE0-0003930DF574@apple.com>
--Apple-Mail-1--932275202
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Only if you let some Disk Utility loose on it and it figures out those =
blocks aren't supposed to be marked in use because they're not claimed =
by any file...
Why don't you look at a freshly initialized HFS+ volume to see what all =
this is supposed to look like. See if you can account for every bit set =
on the volume - should be an interesting exercise!
-Pat.
On Thursday, May 2, 2002, at 12:13 AM, Entwicklung wrote:
> Thanks for the reply !
> Regarding 'bad blocks' - I haven't really marked any 'bad blocks' =
until now and am not too sure I know how it is done... will have to read =
up on that. Any idea what happens if I don't mark the blocks of the =
embedded volume as 'bad blocks' but just mark=A0them as allocated in the =
allocation bitmap of the HFS-Wrapper ?
> Could this be a potential cause of any problems ?
> =A0
> TIA,
> Nandini=A0
> =A0
> =A0
> ***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***
>
> ----- Original Message -----
> From: Patrick Dirks
> To: Entwicklung
> Cc: darwin-development@lists.apple.com ; studentdev@lists.apple.com ; =
hfs-user@lists.mars.org
> Sent: Thursday, May 02, 2002 9:13 AM
> Subject: Re: [hfs-user] HFS-Plus and Wrappers
>
> 1. You'll probably need at least 3: the ReadMe (or whatever file you =
like to have shown) and the Desktop DB and Desktop DF. The latter two =
are there to make the Finder happy; if they're not present the Finder =
will try to create them and will end up creating them somewhere in the =
bowels of whatever system happens to be running because they can't be =
created on the read-only disk. The wrapper also has no space available, =
typically. Altogether much better to have a skeleton Desktop DB and =
Desktop DF there. You can copy them from any freshly initialized HFS =
floppy: the Desktop DB will have a few blocks of valid data in a small =
file, the Desktop DF file should be zero length in all likelihood.
>
> I'm not entirely sure why the System and Finder files are there; they =
might be there to placate simple-minded software that checks for them =
when deciding whether the volume is potentially bootable. If your =
wrapped HFS+ volume is unbootable anyway, I bet you can get away without =
them.
>
> 2. Yes, there are two completely unrelated sets of Desktop DB and =
Desktop DF files. The ones in the wrapper are ordinarily ignored because =
it's the "wrapped" HFS+ volume that's actually mounted. The ones in the =
wrapper can be empty - their content is largely irrelevant.
>
> 3. The ReadMe file is stored as an ordinary file on a plain HFS =
volume. Nothing special (that's the whole point - it's there for the =
consumption of systems that only know about HFS).
>
> 4. You can not only write anything you like in the ReadMe file, you =
can call the file anything you want, have anything else you want besides =
(wanna throw in a QuickTime movie of yourself? No problem!). It's =
strictly cosmetic, solely for the benefit of the poor human who suddenly =
can't find the hard drive's contents on this system.
>
> The most interesting part of the wrapper volume is the pointer to the =
HFS+ volume embedded. I believe the blocks used by the HFS+ volume are =
usually specified as used up by the "Bad block" file on the wrapper =
volume, so the wrapper volume looks like a large volume with a few =
files, no free space, and a ton of bad blocks.
>
> Hope that helps,
> -Pat Dirks.
>
> On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:
>
> Hello Listers,
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Recently there =
was a bit of discussion on HFS-Wrappers on the hfs-user mailing list and =
how it allows a computer with HFS (but no HFS Plus support) to start up =
or display a ReadMe to the user to improve the user-experience.
> The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper volume contains five files in the root folder - a ReadMe, System =
and Finder, Desktop DB and Desktop DF.
> =A0
> I'm a third-party developer creating an HFS-Plus volume (non-bootable) =
interested in extending the functionality of my HFS-Plus volume to =
include a Wrapper as well. I want to know whether:
> =A0
> 1)=A0these 5 files=A0are actually necessary or it would suffice if =
only the ReadMe is present ?
> 2) would this mean that the Desktop DB and DF files would be present =
twice (on an Apple-initialized volume) ? - once in the HFS-Wrapper and =
once in the HFS-Plus catalog ?
> 3) is there any documentation from Apple which describes how this =
ReadMe file is stored up in the Wrapper's catalog (I gathered it's not =
hidden) in order to function as expected ?... reverse-engineering
> can be painful sometimes..
> 4) are the contents of the ReadMe file fixed or could I write anything =
I want into it ?
> =A0
> Would be glad of any tips/suggestions !
> -Nandini
> =A0
> =A0
> ***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***
>
--Apple-Mail-1--932275202
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Only if you let some Disk Utility loose on it and it figures out those
blocks aren't supposed to be marked in use because they're not claimed
by any file...
Why don't you look at a freshly initialized HFS+ volume to see what
all this is supposed to look like. See if you can account for every
bit set on the volume - should be an interesting exercise!
-Pat.
On Thursday, May 2, 2002, at 12:13 AM, Entwicklung wrote:
ArialThanks for the reply =
!
ArialRegarding 'bad blocks' - I
haven't really marked any 'bad blocks' until now and am not too sure I
know how it is done... will have to read up on that. Any idea what
happens if I don't mark the blocks of the embedded volume as 'bad
blocks' but just mark=A0them as allocated in the allocation bitmap of
the HFS-Wrapper ?
ArialCould this be a potential
cause of any problems ?
=A0
ArialTIA,
ArialNandini=A0=
=A0
=A0
Arial***Every day is a new
beginning..a brand new start, to bring joy and fulfilment to the sad
and weary heart***
----- Original Message -----
From:
1999,1999,FFFFPatrick =
Dirks
To:
=
1999,1999,FFFFEntwicklung
Cc:
=
1999,1999,FFFFdarwin-development@lists.ap=
ple.com
; =
1999,1999,FFFFstudentdev@lists.apple.com<=
/color>
; =
1999,1999,FFFFhfs-user@lists.mars.org
Sent: Thursday, May 02, 2002 9:13 AM
Subject: Re: [hfs-user] HFS-Plus and Wrappers
1. You'll probably need at least 3: the ReadMe (or whatever file you
like to have shown) and the Desktop DB and Desktop DF. The latter two
are there to make the Finder happy; if they're not present the Finder
will try to create them and will end up creating them somewhere in the
bowels of whatever system happens to be running because they can't be
created on the read-only disk. The wrapper also has no space
available, typically. Altogether much better to have a skeleton
Desktop DB and Desktop DF there. You can copy them from any freshly
initialized HFS floppy: the Desktop DB will have a few blocks of valid
data in a small file, the Desktop DF file should be zero length in all
likelihood.
I'm not entirely sure why the System and Finder files are there; they
might be there to placate simple-minded software that checks for them
when deciding whether the volume is potentially bootable. If your
wrapped HFS+ volume is unbootable anyway, I bet you can get away
without them.
2. Yes, there are two completely unrelated sets of Desktop DB and
Desktop DF files. The ones in the wrapper are ordinarily ignored
because it's the "wrapped" HFS+ volume that's actually mounted. The
ones in the wrapper can be empty - their content is largely irrelevant.
3. The ReadMe file is stored as an ordinary file on a plain HFS
volume. Nothing special (that's the whole point - it's there for the
consumption of systems that only know about HFS).
4. You can not only write anything you like in the ReadMe file, you
can call the file anything you want, have anything else you want
besides (wanna throw in a QuickTime movie of yourself? No problem!).
It's strictly cosmetic, solely for the benefit of the poor human who
suddenly can't find the hard drive's contents on this system.
The most interesting part of the wrapper volume is the pointer to the
HFS+ volume embedded. I believe the blocks used by the HFS+ volume are
usually specified as used up by the "Bad block" file on the wrapper
volume, so the wrapper volume looks like a large volume with a few
files, no free space, and a ton of bad blocks.
Hope that helps,
-Pat Dirks.
On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:
Hello Listers,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Recently there =
was a bit of discussion on
HFS-Wrappers on the hfs-user mailing list and how it allows a computer
with HFS (but no HFS Plus support) to start up or display a ReadMe to
the user to improve the user-experience.
The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS
wrapper volume contains five files in the root folder - a ReadMe,
System and Finder, Desktop DB and Desktop DF.
=A0
I'm a third-party developer creating an HFS-Plus volume (non-bootable)
interested in extending the functionality of my HFS-Plus volume to
include a Wrapper as well. I want to know whether:
=A0
1)=A0these 5 files=A0are actually necessary or it would suffice if only
the ReadMe is present ?
2) would this mean that the Desktop DB and DF files would be present
twice (on an Apple-initialized volume) ? - once in the HFS-Wrapper and
once in the HFS-Plus catalog ?
3) is there any documentation from Apple which describes how this
ReadMe file is stored up in the Wrapper's catalog (I gathered it's not
hidden) in order to function as expected ?... reverse-engineering
can be painful sometimes..
4) are the contents of the ReadMe file fixed or could I write anything
I want into it ?
=A0
Would be glad of any tips/suggestions !
-Nandini
=A0
=A0
***Every day is a new beginning..a brand new start, to bring joy and
fulfilment to the sad and weary heart***
=
--Apple-Mail-1--932275202--
From ssen@apple.com Thu May 2 08:55:19 2002
From: ssen@apple.com (Shantonu Sen)
Date: Thu, 2 May 2002 03:55:19 -0400
Subject: [hfs-user] Re: HFS-Plus and Wrappers
In-Reply-To: <000e01c1f1a5$0e16fd10$0401a7c0@modemserver>
Message-ID:
(I will probably get rejected from the lists I'm not on. If you are on multiple lists, please forward as appropriate)
On Thursday, May 2, 2002, at 02:46 AM, Entwicklung wrote:
> Recently there was a bit of discussion on HFS-Wrappers on
> the hfs-user mailing list and how it allows a computer with HFS (but no HFS
> Plus support) to start up or display a ReadMe to the user to improve the
> user-experience.
The HFS Wrapper is used to boot various Mac OS's on Old World machines. It serves no purpose on New World machines (except people with Dual G4's running Mac OS 7, probably ;-) ) More info below
> The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS wrapper
> volume contains five files in the root folder - a ReadMe, System and Finder,
> Desktop DB and Desktop DF.
Contains is probably a strong word. It happens to contain the above files. The System file is needed for Old World booting. The Finder is probably there to present a cohesive "System Folder" to old Mac OS's, in case they start freaking out because of a straw System file. For Mac OS X-created wrappers, the Finder file is 0 bytes (in data and resource forks) with the correct type/creator (FNDR/MACS).
> I'm a third-party developer creating an HFS-Plus volume (non-bootable)
> interested in extending the functionality of my HFS-Plus volume to include a
> Wrapper as well. I want to know whether:
Unfortunately, a wrapper alone will not get you close to bootability for Old World machines. For OS 9 (both old and new world), you will need to also set the boot blocks (the first 1KB of the filesystem). For Mac OS X, you would be set.
> 3) is there any documentation from Apple which describes how this ReadMe file
> is stored up in the Wrapper's catalog (I gathered it's not hidden) in order to
> function as expected ?... reverse-engineering
> can be painful sometimes..
It's just a file. You might learn a lot be reading the code for newfs_hfs in the diskdev_cmds project of Darwin. It shows how it creates the readme (the text is statically compiled into the newfs_hfs binary).
You might also be interested in checking out the bless-2 tag of the bless project from Dariwn CVS. In particular, look at bless/libbless/HFSWrapper/BLMountHFSWrapper.c and friends, which are basically abstractions that read the MDB, toggle the mdb->drEmbedSigWord to be kHFSSigWord, and writes it back out. Subsequent mounts of the volume will end up actually mounting the wrapper. Coming soon to an OS near you will be the capability of mounting the wrapper as part of mount_hfs, which will require new diskdev_cmds and xnu builds.
So, what is the System file doing there, and what does it do?
No Old World machine shipped with the ability to parse HFS+ volumes. However, Mac OS 8.6 (?) and later could boot from HFS+. How was that possible? Basically, the Mac OS ROM (which lived in actual ROM) would see the boot volume and find this HFS Wrapper thingy, which looked like an ordinary HFS volume. It would load the System file at that point, however, the System file in the wrapper is not a full OS System. It's just enough of a stub to add code to provide a bare-bones, read-only HFS+ implementation. This would go into the embedded HFS+ volume, read the HFS+ Volume Header and catalog, find the blessed folder, navigate to it, and load up the real System file. The real system file has the full-fledged read-write HFS+ volume code, at which point the OS can start it's thing. For Old World machines, if you want it to run OS 9, you need a wrapper, and unless you know better, use the apple-provided stub system file (licensing withstanding. I don't know those issues).
Does this apply to OS X/Darwin? To some extent yes. Apple Install CDs (Both commercial Mac OS X and the Darwin 1.4.1 distribution) have custom system files in the wrapper that patch Open Firmware to teach it how to boot Mac OS X and trigger a reboot. This is essentially how you can hold 'C' on an Old World machine and get it to boot a Mac OS X CD. The patches are similar (identical?) to the ones used to boot A/UX, and essentially tell Open Firmware to look in the partition map for disk block offsets containing executable code that should be used in the bootstrapping of the OS. After this code is loaded the booting process is pretty similar between old world and new world.
Do you need this System file to boot Mac OS X on Old World computers? strictly no, if they have already been patched. But if PRAM is zapped for some reason, you might want your volume to repatch OF.
Shantonu
From entwicklung@whengenibk.de Thu May 2 10:17:45 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 2 May 2002 11:17:45 +0200
Subject: [hfs-user] Fw: HFS-Plus and Wrappers
Message-ID: <000201c1f1ba$7fb0f880$0401a7c0@modemserver>
----- Original Message -----
From: "Shantonu Sen"
To: "Entwicklung"
Cc: ; ;
Sent: Thursday, May 02, 2002 9:55 AM
Subject: Re: HFS-Plus and Wrappers
> (I will probably get rejected from the lists I'm not on. If you are on
multiple lists, please forward as appropriate)
>
> On Thursday, May 2, 2002, at 02:46 AM, Entwicklung wrote:
>
> > Recently there was a bit of discussion on
HFS-Wrappers on
> > the hfs-user mailing list and how it allows a computer with HFS (but no
HFS
> > Plus support) to start up or display a ReadMe to the user to improve the
> > user-experience.
>
> The HFS Wrapper is used to boot various Mac OS's on Old World machines. It
serves no purpose on New World machines (except people with Dual G4's
running Mac OS 7, probably ;-) ) More info below
>
> > The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS
wrapper
> > volume contains five files in the root folder - a ReadMe, System and
Finder,
> > Desktop DB and Desktop DF.
>
> Contains is probably a strong word. It happens to contain the above files.
The System file is needed for Old World booting. The Finder is probably
there to present a cohesive "System Folder" to old Mac OS's, in case they
start freaking out because of a straw System file. For Mac OS X-created
wrappers, the Finder file is 0 bytes (in data and resource forks) with the
correct type/creator (FNDR/MACS).
>
> > I'm a third-party developer creating an HFS-Plus volume (non-bootable)
> > interested in extending the functionality of my HFS-Plus volume to
include a
> > Wrapper as well. I want to know whether:
>
> Unfortunately, a wrapper alone will not get you close to bootability for
Old World machines. For OS 9 (both old and new world), you will need to also
set the boot blocks (the first 1KB of the filesystem). For Mac OS X, you
would be set.
>
> > 3) is there any documentation from Apple which describes how this ReadMe
file
> > is stored up in the Wrapper's catalog (I gathered it's not hidden) in
order to
> > function as expected ?... reverse-engineering
> > can be painful sometimes..
>
> It's just a file. You might learn a lot be reading the code for newfs_hfs
in the diskdev_cmds project of Darwin. It shows how it creates the readme
(the text is statically compiled into the newfs_hfs binary).
>
> You might also be interested in checking out the bless-2 tag of the bless
project from Dariwn CVS. In particular, look at
bless/libbless/HFSWrapper/BLMountHFSWrapper.c and friends, which are
basically abstractions that read the MDB, toggle the mdb->drEmbedSigWord to
be kHFSSigWord, and writes it back out. Subsequent mounts of the volume
will end up actually mounting the wrapper. Coming soon to an OS near you
will be the capability of mounting the wrapper as part of mount_hfs, which
will require new diskdev_cmds and xnu builds.
>
> So, what is the System file doing there, and what does it do?
>
> No Old World machine shipped with the ability to parse HFS+ volumes.
However, Mac OS 8.6 (?) and later could boot from HFS+. How was that
possible? Basically, the Mac OS ROM (which lived in actual ROM) would see
the boot volume and find this HFS Wrapper thingy, which looked like an
ordinary HFS volume. It would load the System file at that point, however,
the System file in the wrapper is not a full OS System. It's just enough of
a stub to add code to provide a bare-bones, read-only HFS+ implementation.
This would go into the embedded HFS+ volume, read the HFS+ Volume Header and
catalog, find the blessed folder, navigate to it, and load up the real
System file. The real system file has the full-fledged read-write HFS+
volume code, at which point the OS can start it's thing. For Old World
machines, if you want it to run OS 9, you need a wrapper, and unless you
know better, use the apple-provided stub system file (licensing
withstanding. I don't know those issues).
>
> Does this apply to OS X/Darwin? To some extent yes. Apple Install CDs
(Both commercial Mac OS X and the Darwin 1.4.1 distribution) have custom
system files in the wrapper that patch Open Firmware to teach it how to boot
Mac OS X and trigger a reboot. This is essentially how you can hold 'C' on
an Old World machine and get it to boot a Mac OS X CD. The patches are
similar (identical?) to the ones used to boot A/UX, and essentially tell
Open Firmware to look in the partition map for disk block offsets containing
executable code that should be used in the bootstrapping of the OS. After
this code is loaded the booting process is pretty similar between old world
and new world.
>
> Do you need this System file to boot Mac OS X on Old World computers?
strictly no, if they have already been patched. But if PRAM is zapped for
some reason, you might want your volume to repatch OF.
>
> Shantonu
> _______________________________________________
> darwin-development mailing list | darwin-development@lists.apple.com
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-development
> Do not post admin requests to the list. They will be ignored.
From entwicklung@whengenibk.de Thu May 2 10:49:52 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 2 May 2002 11:49:52 +0200
Subject: [hfs-user] Re: HFS-Plus and Wrappers
References:
Message-ID: <001f01c1f1be$b5997d60$0401a7c0@modemserver>
> Are you programatically creating the filesystem yourself?
Yes.
>If so, Patrick and Shantonu gave you a good start worth of info.
Yes..Patrick and Shantonu : Thanks for the tips !
> But if so, why? Wouldn't it be easier just to run newfs_hfs?
Probably - but my project has to do with studying various FS-formats,
implementing them 'optimally' (however fuzzy the term may be :)) and
comparing them - that's why.
-Nandini
From Biswaroop\(External\)"
hi Everybody,
Well when I dump text files into a HFS volume and
mount it in a Mac OS9.2 and view them they show
some junk character for newline . I mean in Windows
newline is CRLF i.e. 2 characters. In Mac CR corresponds to newline and it
works also but the first
character in the next line starts with a junk.
Secondly if i mount the same volume in Mac OSx
there is no problem and it shows the data properly.
Why?? Since the same application is used to view
the files namely SimpleText.
Secondly what is the solution for this problem if
i mount a Hybrid Volume??
Since the data is only dumped once for the two filesystems and different
views are only shown namely
HFS and ISO9660.
Moreover if we view a ISO data CD and open
text files then there is no problem for the newline
character.
Any Explanations??
Waiting for them.
Regards
Biswaroop
God Only Created Earth.
We made two worlds out of it!
HEAVEN and HELL!!
From bierman@apple.com Thu May 2 10:44:43 2002
From: bierman@apple.com (Peter Bierman)
Date: Thu, 2 May 2002 02:44:43 -0700
Subject: [hfs-user] Re: HFS-Plus and Wrappers
In-Reply-To: <000e01c1f1a5$0e16fd10$0401a7c0@modemserver>
Message-ID:
At 8:46 AM +0200 5/2/02, Entwicklung wrote:
>I'm a third-party developer creating an HFS-Plus volume (non-bootable)
>interested in extending the functionality of my HFS-Plus volume to include a
>Wrapper as well. I want to know whether:
Are you programatically creating the filesystem yourself? If so, Patrick and Shantonu gave you a good start worth of info.
But if so, why? Wouldn't it be easier just to run newfs_hfs?
-pmb
From mday@apple.com Thu May 2 16:49:27 2002
From: mday@apple.com (Mark Day)
Date: Thu, 2 May 2002 08:49:27 -0700
Subject: [hfs-user] HFS-Plus and Wrappers
In-Reply-To: <000f01c1f1a8$d0547440$0401a7c0@modemserver>
Message-ID: <2F065170-5DE4-11D6-8BEE-00039354009A@apple.com>
On Thursday, May 2, 2002, at 12:13 AM, Entwicklung wrote:
> Regarding 'bad blocks' - I haven't really marked any 'bad blocks' until
> now and am not too sure I know how it is done... will have to read up
> on that.
You create one or more records in the Extents Overflow B-tree for file
ID 5 (kHFSBadBlockFileID), fork 0 (i.e. the data fork). Since there is
no entry for the bad blocks "file" in either the MDB or catalog, the
first record would have its startBlock set to 0 (i.e. offset of 0 blocks
into the "file"). If you need other discontiguous bad block extents,
you would create additional records.
> Any idea what happens if I don't mark the blocks of the embedded volume
> as 'bad blocks' but just mark them as allocated in the allocation
> bitmap of the HFS-Wrapper ?
> Could this be a potential cause of any problems ?
It might confuse older disk repair utilities that only see the wrapper,
or are trying to repair the wrapper as a plain HFS volume. For
read-only media, it probably isn't a serious problem. For writable
media, you would run the risk of having such a utility "repair" the
bitmap by unsetting the bits for the embedded volume, and potentially
overwriting part of the embedded volume when writing to the wrapper.
-Mark
From entwicklung@whengenibk.de Fri May 3 09:44:08 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 3 May 2002 10:44:08 +0200
Subject: [hfs-user] Wrapper and Readme
Message-ID: <001401c1f27e$b2ec3470$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C1F28F.749547F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
Thanks to the friendly feedback I got I managed to =
get started off with including an HFS-Wrapper in my code. It seems to =
work ok now but I'm not too sure... I only have access to an iMac with =
MacOS 9 - my HFS+ Volume gets displayed but how do I get to verify if =
the ReadMe I'm creating in the Wrapper is ok ? The volume is recognized =
as an HFS+ Volume (since the embedded volume seems to be getting mounted =
directly) and I can do a GetInfo on it. Do I necessarily need an older =
Mac which doesn't support HFS+ to get to see the ReadMe ?
I have one more question - Is it possible to have a Wrapper for =
HFS-volumes as well - embedding an HFS-volume within another HFS-Volume =
? I guess this wouldn't have any benefits as such but theoretically it =
should be possible, right ?
-Nandini
**************************************************
The really bad thing about software=20
is debugging it is a real nightmare=20
when you weed one bug out=20
then ten new ones will sprout=20
'til you get as mad as a march hare
*****************************************************=20
------=_NextPart_000_0011_01C1F28F.749547F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
Thanks to the friendly feedback I got I managed to get started off with=20
including an HFS-Wrapper in my code. It seems to work ok now but I'm not =
too=20
sure... I only have access to an iMac with MacOS 9 - my HFS+ Volume gets =
displayed but how do I get to verify if the ReadMe I'm creating in the =
Wrapper=20
is ok ? The volume is recognized as an HFS+ Volume (since the embedded =
volume=20
seems to be getting mounted directly) and I can do a GetInfo on it. Do I =
necessarily need an older Mac which doesn't support HFS+ to get to see =
the=20
ReadMe ?
I have one more question - Is it =
possible to have a=20
Wrapper for HFS-volumes as well - embedding an HFS-volume within =
another=20
HFS-Volume ? I guess this wouldn't have any benefits as such but=20
theoretically it should be possible, right ?
-Nandini
**************************************************
The really bad thing about software
is debugging it is a real =
nightmare=20
when you weed one bug out
then ten new ones will sprout
'til =
you get=20
as mad as a march hare
*****************************************************
=
------=_NextPart_000_0011_01C1F28F.749547F0--
From pwd@apple.com Fri May 3 10:52:31 2002
From: pwd@apple.com (Patrick Dirks)
Date: Fri, 3 May 2002 02:52:31 -0700
Subject: [hfs-user] Wrapper and Readme
In-Reply-To: <001401c1f27e$b2ec3470$0401a7c0@modemserver>
Message-ID: <7C9AFAF3-5E7B-11D6-82C8-003065A0E6DE@apple.com>
--Apple-Mail-1--837321086
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Hi,
It's probably pretty simple for testing purposes to remove the pointers =
to the "wrapped" HFS+ volume; the resulting disk image should then be =
just another HFS disk and you can use all the usual disk verification =
tools directly on it to see if there are any inconsistencies found. If =
all is well and you can double-click your "ReadMe" and see what you =
expect you can be reasonably confident that a user on a non-HFS+-savvy =
system would see exactly that, too.
Good luck,
-Pat Dirks.
On Friday, May 3, 2002, at 01:44 AM, Entwicklung wrote:
> Hello Listers,
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Thanks =
to the friendly feedback I got I managed to get started off with =
including an HFS-Wrapper in my code. It seems to work ok now but I'm not =
too sure... I only have access to an iMac with MacOS 9 - my HFS+ Volume =
gets displayed but how do I get to verify if the ReadMe I'm creating in =
the Wrapper is ok ? The volume is recognized as an HFS+ Volume (since =
the embedded volume seems to be getting mounted directly) and I can do a =
GetInfo on it. Do I necessarily need an older Mac which doesn't support =
HFS+ to get to see the ReadMe ?
> =A0
> I have one more question - Is it possible to have a Wrapper for =
HFS-volumes as well=A0 - embedding an HFS-volume within another =
HFS-Volume ? I=A0guess this wouldn't have any benefits as such but =
theoretically it should be possible, right ?
> =A0
> -Nandini
> =A0
> =A0
> **************************************************
> =A0
>
> The really bad thing about software
> is debugging it is a real nightmare
> when you weed one bug out
> then ten new ones will sprout
> 'til you get as mad as a march hare
>
> =A0
>
> *****************************************************=A0
>
--Apple-Mail-1--837321086
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Hi,
It's probably pretty simple for testing purposes to remove the
pointers to the "wrapped" HFS+ volume; the resulting disk image should
then be just another HFS disk and you can use all the usual disk
verification tools directly on it to see if there are any
inconsistencies found. If all is well and you can double-click your
"ReadMe" and see what you expect you can be reasonably confident that
a user on a non-HFS+-savvy system would see exactly that, too.
Good luck,
-Pat Dirks.
On Friday, May 3, 2002, at 01:44 AM, Entwicklung wrote:
ArialHello =
Listers,
Arial=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Thanks
to the friendly feedback I got I managed to get started off with
including an HFS-Wrapper in my code. It seems to work ok now but I'm
not too sure... I only have access to an iMac with MacOS 9 - my HFS+
Volume gets displayed but how do I get to verify if the ReadMe I'm
creating in the Wrapper is ok ? The volume is recognized as an HFS+
Volume (since the embedded volume seems to be getting mounted
directly) and I can do a GetInfo on it. Do I necessarily need an older
Mac which doesn't support HFS+ to get to see the ReadMe =
?
=A0
ArialI have one more question - Is
it possible to have a Wrapper for HFS-volumes as well=A0 - embedding an
HFS-volume within another HFS-Volume ? I=A0guess this wouldn't have any
benefits as such but theoretically it should be possible, right =
?
=A0
Arial-Nandini
=A0
=A0
=
Arial*********************************=
*****************
Arial=A0
The really bad thing about software
is debugging it is a real nightmare
when you weed one bug out
then ten new ones will sprout
'til you get as mad as a march hare
=A0
*****************************************************=A0
=
--Apple-Mail-1--837321086--
From mday@apple.com Fri May 3 15:56:11 2002
From: mday@apple.com (Mark Day)
Date: Fri, 3 May 2002 07:56:11 -0700
Subject: [hfs-user] Wrapper and Readme
In-Reply-To: <001401c1f27e$b2ec3470$0401a7c0@modemserver>
Message-ID:
On Friday, May 3, 2002, at 01:44 AM, Entwicklung wrote:
> Thanks to the friendly feedback I got I managed to get started off with including an HFS-Wrapper in my code. It seems to work ok now but I'm not too sure... I only have access to an iMac with MacOS 9 - my HFS+ Volume gets displayed but how do I get to verify if the ReadMe I'm creating in the Wrapper is ok ? The volume is recognized as an HFS+ Volume (since the embedded volume seems to be getting mounted directly) and I can do a GetInfo on it. Do I necessarily need an older Mac which doesn't support HFS+ to get to see the ReadMe ?
Probably the most convenient way is to change the drEmbedSigWord in the MDB. That will prevent the File Manager from recognizing it as an HFS Plus volume. It you don't want to burn another CD, then just make a disk image (use Disk Copy to make a read/write image so it will be a block-for-block copy) and use some file editor to change the signature. Then mount the image, and you should see the wrapper. If you're planning on verifying the disk using Disk First Aid or Disk Utility, you should also change the signature in the alternate MDB.
> I have one more question - Is it possible to have a Wrapper for HFS-volumes as well - embedding an HFS-volume within another HFS-Volume ? I guess this wouldn't have any benefits as such but theoretically it should be possible, right ?
Theoretically, the mechanism could be extended to include embedded things other than HFS Plus. That's the point of the drEmbedSigWord field in the MDB. However, there is no standard for any value other than 'H+', and no implementation that I know of would mount any other embedded volume.
The embedded extent is NOT treated like any old generic partition. Since HFS and HFS Plus volumes are so similar, a single filesystem plug-in handles both kinds of volumes (much like a single plug-in would handle FAT12, FAT16 and FAT32). It is inside that plug-in that the embedded volume is handled. It reads the block where the MDB should be. If it looks like an MDB, and the drEmbedSigWord is set to 'H+', and there is a Volume Header 1024 bytes from the start of the embedded extent, then the volume is recognized as (wrapped) HFS Plus.
-Mark
From entwicklung@whengenibk.de Fri May 3 16:55:11 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 3 May 2002 17:55:11 +0200
Subject: [hfs-user] Wrapper and Readme
References: <7C9AFAF3-5E7B-11D6-82C8-003065A0E6DE@apple.com>
Message-ID: <002501c1f2bb$16bb62f0$0401a7c0@modemserver>
Hi,
I just tried it - and it works... Thanks for the tip!
Btw. Mark had written sth about Disk First Aid and the alternate volume
header - one problem I've been having right from the start is that Disk
First Aid is unable to read my CD and Norton Disk Doctor detects 'major
problems' on my CD. It seems as though this is due to the runout-blocks
being appended to the end of my image i.e. after the sector in which the
alternate volume header is present. This doesn't really disturb me too much
since the Mac mounts my CD's and reads them without a problem but I'd like
to know if there's sth I can do to overcome this.
-Nandini
----- Original Message -----
From: "Patrick Dirks"
To: "Entwicklung"
Cc: ; ;
Sent: Friday, May 03, 2002 11:52 AM
Subject: Re: [hfs-user] Wrapper and Readme
> Hi,
>
> It's probably pretty simple for testing purposes to remove the pointers to
the
> "wrapped" HFS+ volume; the resulting disk image should then be just
another
> HFS disk and you can use all the usual disk verification tools directly on
it
> to see if there are any inconsistencies found. If all is well and you can
> double-click your "ReadMe" and see what you expect you can be reasonably
> confident that a user on a non-HFS+-savvy system would see exactly that,
too.
>
> Good luck,
> -Pat Dirks.
>
> On Friday, May 3, 2002, at 01:44 AM, Entwicklung wrote:
>
> > Hello Listers,
> > Thanks to the friendly feedback I got I managed to
get
> started off with including an HFS-Wrapper in my code. It seems to work ok
now
> but I'm not too sure... I only have access to an iMac with MacOS 9 - my
HFS+
> Volume gets displayed but how do I get to verify if the ReadMe I'm
creating in
> the Wrapper is ok ? The volume is recognized as an HFS+ Volume (since the
> embedded volume seems to be getting mounted directly) and I can do a
GetInfo
> on it. Do I necessarily need an older Mac which doesn't support HFS+ to
get to
> see the ReadMe ?
> >
> > I have one more question - Is it possible to have a Wrapper for
HFS-volumes
> as well - embedding an HFS-volume within another HFS-Volume ? I guess
this
> wouldn't have any benefits as such but theoretically it should be
possible,
> right ?
> >
> > -Nandini
> >
> >
> > **************************************************
> >
> >
> > The really bad thing about software
> > is debugging it is a real nightmare
> > when you weed one bug out
> > then ten new ones will sprout
> > 'til you get as mad as a march hare
> >
> >
> >
> > *****************************************************
> _______________________________________________
> studentdev mailing list | studentdev@lists.apple.com
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/studentdev
> Do not post admin requests to the list. They will be ignored.
From mday@apple.com Fri May 3 17:48:52 2002
From: mday@apple.com (Mark Day)
Date: Fri, 3 May 2002 09:48:52 -0700
Subject: [hfs-user] Wrapper and Readme
In-Reply-To: <002501c1f2bb$16bb62f0$0401a7c0@modemserver>
Message-ID:
On Friday, May 3, 2002, at 08:55 AM, Entwicklung wrote:
> Btw. Mark had written sth about Disk First Aid and the alternate volume
> header - one problem I've been having right from the start is that Disk
> First Aid is unable to read my CD and Norton Disk Doctor detects 'major
> problems' on my CD. It seems as though this is due to the runout-blocks
> being appended to the end of my image i.e. after the sector in which the
> alternate volume header is present. This doesn't really disturb me too much
> since the Mac mounts my CD's and reads them without a problem but I'd like
> to know if there's sth I can do to overcome this.
Remember that the alternate MDB or alternate Volume Header starts 1024 bytes from the end of the volume. So, on a CD with 2048-byte physical sectors, it would start in the middle of the last physical sector. In the case of a wrapped HFS Plus volume, the alternate MDB is 1024 bytes from the end of the volume, and the alternate Volume Header is 1024 bytes from the end of the embedded part of the volume.
The last 512 bytes of the volume (and embedded volume) are reserved for uses outside the filesystem. Apple's manufacturing process uses the space for various things, without having to disturb the actual volume contents.
I don't know much about the low-level data organization on CDs, but I would think that the driver shouldn't include runout blocks as part of the data (i.e. part of the logical device or partition). Might you actually be writing data past the end of your volume?
If you're working with disk images, you could try truncating the image to 1024 bytes past the start of the alternate MDB (or alternate Volume Header for unwrapped HFS Plus volumes). But you still ought to figure out why there is extra data past the logical end of your volume (or why you aren't putting the alternate MDB/VH in the correct spot).
Disk First Aid tries to use the alternate MDB/VH to identify the volume and find the various structures. The idea is that if the first few blocks of the volume have been overwritten, Disk First Aid can find and fix the volume using the alternate structures, and write corrected information back out to the main MDB/VH. Current versions of DFA should try to find the main MDB/VH if it can't find any alternate. Norton Disk Doctor apparently only uses the main MDB/VH to find the volume's structures, and then later compares the alternate to the main copy.
-Mark
From entwicklung@whengenibk.de Fri May 3 17:56:21 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 3 May 2002 18:56:21 +0200
Subject: [hfs-user] Wrapper and Readme
References:
Message-ID: <000801c1f2c3$7547aa60$0401a7c0@modemserver>
Hi,
> Remember that the alternate MDB or alternate Volume Header starts 1024
bytes from the end of the volume. So, on a CD with 2048-byte physical
sectors, it would start in the middle of the last physical sector. In the
case of a wrapped HFS Plus volume, the alternate MDB is 1024 bytes from the
end of the volume, and the alternate Volume Header is 1024 bytes from the
end of the embedded part of the volume.
Yes, that's the way it is in my implementation too...
> The last 512 bytes of the volume (and embedded volume) are reserved for
uses outside the filesystem. Apple's manufacturing process uses the space
for various things, without having to disturb the actual volume contents.
I've just set the last 512Bytes to zero - reserved.
> I don't know much about the low-level data organization on CDs, but I
would think that the driver shouldn't include runout blocks as part of the
data (i.e. part of the logical device or partition). Might you actually be
writing data past the end of your volume?
The runout blocks are just present after the data-part and get appended by
the driver responsible for writing out the data - starting off at the point
where the data ends. The logical part or partition ends 1024Bytes after the
start of the alternate volume header as you said.
> If you're working with disk images, you could try truncating the image to
1024 bytes past the start of the alternate MDB (or alternate Volume Header
for unwrapped HFS Plus volumes). But you still ought to figure out why
there is extra data past the logical end of your volume (or why you aren't
putting the alternate MDB/VH in the correct spot).
As mentioned - these extra blocks are not data but Disk First Aid apparently
mistakes them to be so since it starts checking from the end....Could it be
that I'm making a mistake in my allocation bitmap (in the volume header)?
.... if my HFS-volume has n sectors(2kB) including the 2kB blocks containing
the volume header and alternate volume header, with block size =512Bytes I
would have to account for (n-1)*4 if I'm marking all blocks as allocated,
right ? Or should it be (n-2)*4 ?
> Disk First Aid tries to use the alternate MDB/VH to identify the volume
and find the various structures. The idea is that if the first few blocks
of the volume have been overwritten, Disk First Aid can find and fix the
volume using the alternate structures, and write corrected information back
out to the main MDB/VH. Current versions of DFA should try to find the main
MDB/VH if it can't find any alternate.
Which are the versions which do this ?
TIA,
Nandini
From iosglpgc@teleline.es Sat May 4 15:05:23 2002
From: iosglpgc@teleline.es (Industrias O.S.G.)
Date: Sat, 4 May 2002 15:05:23 +0100
Subject: [hfs-user] MFS & HFS on-disk layout
Message-ID: <000401c1f374$bcbf15c0$0100a8c0@zeus>
Hi!
I need the docs that contains the MFS on-disk layout and the HFS on-disk
layout. They are no longer on the Apple web. Does someone have it?
Natasha Portillo
Industrias O.S.G.
Más allá del límite
Beyond the limits
begin 666 Natasha Portillo (Fax del trabajo).vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..E!O"!D96P@=')A8F%J;RD-"D]21SI)
M;F1U
> -Nandini
>
> ----- Original Message -----
> From: "Industrias O.S.G."
> To: "'Entwicklung'"
> Sent: Saturday, May 04, 2002 9:49 PM
> Subject: RE: [hfs-user] MFS & HFS on-disk layout
>
>
> > It was. No longer.
> >
> > Natasha Portillo
> > Industrias O.S.G.
> > Más allá del límite
> > Beyond the limits
> >
> >
> > > -----Original Message-----
> > > From: Entwicklung [mailto:entwicklung@whengenibk.de]
> > > Sent: Saturday, May 04, 2002 8:30 PM
> > > To: iosglpgc@teleline.es
> > > Cc: hfs-user@lists.mars.org
> > > Subject: Re: [hfs-user] MFS & HFS on-disk layout
> > >
> > >
> > > HFS should be available under Inside Macintosh-File Manager
> > > (Data Organization on Volumes)... downloadable as a .pdf file
> > > from the web.
> > >
> > > -Nandini
> > >
> > > ----- Original Message -----
> > > From: "Industrias O.S.G."
> > > To:
> > > Sent: Saturday, May 04, 2002 4:05 PM
> > > Subject: [hfs-user] MFS & HFS on-disk layout
> > >
> > >
> > > > Hi!
> > > >
> > > > I need the docs that contains the MFS on-disk layout and the HFS
> > > > on-disk layout. They are no longer on the Apple web. Does
> > > someone have
> > > > it?
> > > >
> > > > Natasha Portillo
> > > > Industrias O.S.G.
> > > > Más allá del límite
> > > > Beyond the limits
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>
From entwicklung@whengenibk.de Mon May 6 10:38:00 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Mon, 6 May 2002 11:38:00 +0200
Subject: [hfs-user] Executables..
Message-ID: <001801c1f4e1$b76dcd50$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_0015_01C1F4F2.79BBD360
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
I'd like to store some executable files (.exe) onto =
the HFS-CD I'm creating under Windows.
1) Is it possible to store up executables in a format recognizable on =
the Mac at all?
2) Would it be necessary to have a resource-fork for this purpose ?=20
3) What should I be taking into account ?
Any tips/suggestions are greatly appreciated.
-Nandini
*************************************************************************=
*********************************
Could you imagine the price of air if it were brought to you by another =
supplier ? - GOD
*************************************************************************=
**********************************
------=_NextPart_000_0015_01C1F4F2.79BBD360
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Listers,
&nbs=
p; =20
I'd like to store some executable files (.exe) onto the HFS-CD I'm =
creating=20
under Windows.
1) Is it possible to store up =
executables in a=20
format recognizable on the Mac at all?
2) Would it be necessary to have a =
resource-fork=20
for this purpose ?
3) What should I be taking into account =
?
Any tips/suggestions are greatly=20
appreciated.
-Nandini
****************************************************************=
******************************************
Could you imagine the price of air if =
it were=20
brought to you by another supplier ? - =
GOD
****************************************************************=
*******************************************
------=_NextPart_000_0015_01C1F4F2.79BBD360--
From entwicklung@whengenibk.de Mon May 6 11:53:22 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Mon, 6 May 2002 12:53:22 +0200
Subject: [hfs-user] hfsutils
Message-ID: <001001c1f4ec$4470d8f0$0401a7c0@modemserver>
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C1F4FD.016EDAF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
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 ?
Regards,
Nandini Hengen
------=_NextPart_000_000B_01C1F4FD.016EDAF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I'd like=20
to know if anyone who has used hfsutils in the past knows upto what =
allocation=20
block size it supports for reading. I have an allocation block size =
of =20
64kB and I'm unable to mount my hfs-volume. It is slightly larger than =
2GB in=20
size. Images of size 32MB, 64MB upto 512MB, 1GB and < 2GB seem to =
work=20
fine.
I get the following error : Sorry, =
unable to mount=20
volume. Read unallocated block (Input/Output error).
Does anybody know if hfsutils imposes a =
restriction=20
on allocation block size or this error is due to some bug in my program =
? What=20
could possibly be causing this ?
Regards,
Nandini =
Hengen
------=_NextPart_000_000B_01C1F4FD.016EDAF0--
From gbeatty@cpc.gc.ca Mon May 6 20:33:16 2002
From: gbeatty@cpc.gc.ca (Gordon Beatty)
Date: Mon, 6 May 2002 15:33:16 -0400
Subject: [hfs-user] Unwrapped HFS+ volumes
Message-ID: <000501c1f534$df766f70$760aa8c0@cpc.gc.ca>
Hi all,
Since people have asked questions about wrapped HFS+ volumes, I was
reminded of a question I'd been meaning to ask. In general, by default,
HFS+ volumes are created with the HFS wrapper for compatibility and are
coded in the Partition Map with a type of 'Apple_HFS'. However, the
potential exists for HFS+ volumes to exist on their own without the wrapper
(especially where OS X is concerned -- or so I am led to believe).
My question is simply, would such an unwrapped volume be coded in the
Partition Map with the same type (Apple_HFS) or is there a type that exists
specifically for this case?
Gord Beatty
From mday@apple.com Mon May 6 20:41:26 2002
From: mday@apple.com (Mark Day)
Date: Mon, 6 May 2002 12:41:26 -0700
Subject: [hfs-user] Unwrapped HFS+ volumes
In-Reply-To: <000501c1f534$df766f70$760aa8c0@cpc.gc.ca>
Message-ID: <40C4E587-6129-11D6-BC83-00039354009A@apple.com>
On Monday, May 6, 2002, at 12:33 PM, Gordon Beatty wrote:
> My question is simply, would such an unwrapped volume be coded in the
> Partition Map with the same type (Apple_HFS) or is there a type that exists
> specifically for this case?
Pure HFS Plus volumes use partition type Apple_HFS, just like plain HFS or wrapped volumes.
-Mark
From rob@mars.org Tue May 7 02:20:36 2002
From: rob@mars.org (Rob Leslie)
Date: Mon, 6 May 2002 18:20:36 -0700
Subject: [hfs-user] hfsutils
In-Reply-To: <001001c1f4ec$4470d8f0$0401a7c0@modemserver>
Message-ID:
[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
offset.
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
rob@mars.org
From entwicklung@whengenibk.de Tue May 7 11:26:24 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 7 May 2002 12:26:24 +0200
Subject: [hfs-user] hfsutils
References:
Message-ID: <006a01c1f5b1$a4dd5630$0401a7c0@modemserver>
Hello,
Thanks for replying !
> Rob Leslie wrote :
> 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
> offset.
>
> 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.
Which platforms are these ? Im using hfsutils under Suse Linux 7.3 and am
also using
xhfs. Is a call to lseek() being made in a number of places ? I'd like your
advice as to how I should proceed. I had to internally change a number of
variables in my prog. from 'int' to 'unsigned long' to avoid an overflow. If
I could do this in the related files of fsutils and recompile or sth. to
make it work,
it would be great !
TIA,
Nandini
From entwicklung@whengenibk.de Tue May 7 15:10:41 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 7 May 2002 16:10:41 +0200
Subject: [hfs-user] Icon for Readme...
References: <7C9AFAF3-5E7B-11D6-82C8-003065A0E6DE@apple.com>
Message-ID: <000c01c1f5d0$f9d4f390$0401a7c0@modemserver>
Hi,
1) What do I do if I want to store up my own customized icon for the ReadMe
file ?
2) Is this possible at all from another platform like Windows? (using the
resource fork of the file to dump my bitmap of the icon perhaps?)
3) Somebody said I would have to necessarily include sth. in the DTDB/DF
files which I've copied into my Wrapper from a freshly initialized
HFS-Volume on the Mac ? Is this true ? Can one even do without it ?
Where could I find relevant info about using Resource forks ? This has
really been a vague topic to me until now. My head is spinning with Bundle
bits and Finder flags right now...
Please do help.
-Nandini
----- Original Message -----
From: "Patrick Dirks"
To: "Entwicklung"
Cc: ; ;
Sent: Friday, May 03, 2002 11:52 AM
Subject: Re: [hfs-user] Wrapper and Readme
> Hi,
>
> It's probably pretty simple for testing purposes to remove the pointers to
the
> "wrapped" HFS+ volume; the resulting disk image should then be just
another
> HFS disk and you can use all the usual disk verification tools directly on
it
> to see if there are any inconsistencies found. If all is well and you can
> double-click your "ReadMe" and see what you expect you can be reasonably
> confident that a user on a non-HFS+-savvy system would see exactly that,
too.
>
> Good luck,
> -Pat Dirks.
>
> On Friday, May 3, 2002, at 01:44 AM, Entwicklung wrote:
>
> > Hello Listers,
> > Thanks to the friendly feedback I got I managed to
get
> started off with including an HFS-Wrapper in my code. It seems to work ok
now
> but I'm not too sure... I only have access to an iMac with MacOS 9 - my
HFS+
> Volume gets displayed but how do I get to verify if the ReadMe I'm
creating in
> the Wrapper is ok ? The volume is recognized as an HFS+ Volume (since the
> embedded volume seems to be getting mounted directly) and I can do a
GetInfo
> on it. Do I necessarily need an older Mac which doesn't support HFS+ to
get to
> see the ReadMe ?
> >
> > I have one more question - Is it possible to have a Wrapper for
HFS-volumes
> as well - embedding an HFS-volume within another HFS-Volume ? I guess
this
> wouldn't have any benefits as such but theoretically it should be
possible,
> right ?
> >
> > -Nandini
> >
> >
> > **************************************************
> >
> >
> > The really bad thing about software
> > is debugging it is a real nightmare
> > when you weed one bug out
> > then ten new ones will sprout
> > 'til you get as mad as a march hare
> >
> >
> >
> > *****************************************************
> _______________________________________________
> studentdev mailing list | studentdev@lists.apple.com
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/studentdev
> Do not post admin requests to the list. They will be ignored.
From rob@mars.org Tue May 7 21:49:08 2002
From: rob@mars.org (Rob Leslie)
Date: Tue, 7 May 2002 13:49:08 -0700
Subject: [hfs-user] hfsutils
In-Reply-To: <006a01c1f5b1$a4dd5630$0401a7c0@modemserver>
Message-ID:
On Tuesday, May 7, 2002, at 03:26 AM, Entwicklung wrote:
>> 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.
>
> Which platforms are these ? Im using hfsutils under Suse Linux 7.3 and am
> also using xhfs. Is a call to lseek() being made in a number of places ?
> I'd like your advice as to how I should proceed. I had to internally
> change a number of variables in my prog. from 'int' to 'unsigned long' to
> avoid an overflow. If I could do this in the related files of fsutils
> and recompile or sth. to make it work, it would be great !
Well, I can't say for certain which platforms use which sizes, but for
example: on my Linux 2.2 system, sizeof(off_t) == 4, and on my Mac OS X 10.
1 system, sizeof(off_t) == 8.
The call to lseek() is localized to the file libhfs/os/unix.c, namely the
os_seek() routine. On platforms where sizeof(off_t) > 4, I think this
routine makes a mistake by not casting `offset' to off_t, since leaving it
as unsigned long may cause bits to be lost when it is left-shifted by
HFS_BLOCKSZ_BITS.
On platforms where sizeof(off_t) == 4, you'd have to find another method
to seek beyond 2GB, if one even exists. Linux offers _llseek(), for
example, but also keep in mind the ext2 filesystem does not support files
>= 2GB, so your image would have to be on a raw partition or another
filesystem or something.
--
Rob Leslie
rob@mars.org
From entwicklung@whengenibk.de Wed May 8 08:11:56 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Wed, 8 May 2002 09:11:56 +0200
Subject: [hfs-user] Re: hfsutils
References:
Message-ID: <007e01c1f65f$d5be2960$0401a7c0@modemserver>
Hi,
Thanks for the reply.
The problem is that I don't have any medium(disk) for such large images. I'm
using Linux on an Intel PC and hfsutils since I can also specify a path to a
directory. Upto 650MB I was using a normal CD.
Manual mounting gives me the error 'not a block device' if I specify the
path to the image.
I also have no clue as to how I could write my image to a hard-disk perhaps
starting at physical block 0. Maybe after that a manual mount would be
possible.(?) But I guess that would probably be too tedious.
Any other tips as to what I could possibly do ? Is there some application on
the Mac which would allow me to mount the image-file as a volume ? ( maybe
if I send it across from my PC to the Mac per FTP ) - I presume the Mac
would see my file then as a regular file and not as an image of a volume
right ?
-Nandini
----- Original Message -----
From: "Don Brady"
To: "Entwicklung"
Sent: Monday, May 06, 2002 6:39 PM
Subject: Re: hfsutils
> What happens if you manually mount the disk?
> (eg mount -t hfs /dev/disk3 /Volumes/xyz)
>
> hfs.util calls /sbin/mount, which in turn calls /sbin/mount_hfs
>
> -Don
> Darwin File System Developer
>
>
> On Monday, May 6, 2002, at 03:53 AM, Entwicklung wrote:
>
> > Hello,
> > 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 ?
> >
> > Regards,
> > Nandini Hengen
> > _______________________________________________
> > darwin-development mailing list | darwin-development@lists.apple.com
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/darwin-development
> > Do not post admin requests to the list. They will be ignored.
>
From Biswaroop\(External\)"
Hi everybody,
I want some help in finding a approximate value of the extents file.
Let me describe it...
I HAVE the following information
-->> Total no. of directories present in the volume
-->> Total no. of files with their full path and size in bytes.
-->> The total amount of space needed for the data of those files.
Problem faced :: Till now I used to find the total volume size first
since i knew the size of each file. And then as in the Linux implementation
they keep 1/128 th part of the Volume size as
the size of the Catalog File. The problem was when I used to select
some directories for eg. DDK folder whose total
size is around 58 MB and has around 4300 files in 300 directories.
The Catalog file size decided upon the volume
size would fill before all the entries were made and hence I would be
left wtih an incomplete filesystem.
I manipulated with different fiqures for the
Catalog file size but it was more a hit and trial method.
I know that Catalog File has information of the
whole directory structure of the volume in a B* tree format.
I also know at any given timeshot the B* tree
will be around 2/3 rds full.
I now know the size of the Catalog File depends
actually on the no. of File and Directory entries rather than the full
Volume size.
So, can anybody give me a simple formula ( may be
a good approximation) in trying to find out the Catalog File size needed
for a given volume when I have the information as
mentioned above.
Such that the file size may be bigger than
actually needed but not exceedingly big. In other words is there any way to
find out
the size from no. of Directory entries and file
entriee???
Waitng for help .
Bye
Biswaroop
God Created Earth.
We made two worlds out of it!
HEAVEN and HELL!!
From Biswaroop\(External\)"
Hi everybody,
I want some help in finding a approximate value of the extents file.
Let me describe it...
I HAVE the following information
-->> Total no. of directories present in the volume
-->> Total no. of files with their full path and size in bytes.
-->> The total amount of space needed for the data of those files.
Problem faced :: Till now I used to find the total volume size first
since i knew the size of each file. And then as in the Linux implementation
they keep 1/128 th part of the Volume size as the size of the Catalog File
The problem was when I used to select some directories for eg. DDK
folder whose total size is around 58 MB and has around 4300 files
in 300 directories. The Catalog file size decided upon the volume
size would fill before all the entries were made and hence I would be
left wtih an incomplete filesystem.I manipulated with different fiqures for
the
Catalog file size but it was more a hit and trial method.I know that Catalog
File
has information of the whole directory structure of the volume in a B* tree
format.
I also know at any given timeshot the B* tree will be around 2/3 rds full.
I now know the size of the Catalog File depends
actually on the no. of File and Directory entries rather than the full
Volume size.
So, can anybody give me a simple formula ( may be
a good approximation) in trying to find out the Catalog File size needed
for a given volume when I have the information as mentioned above.
Such that the file size may be bigger than
actually needed but not exceedingly big. In other words is there any way to
find out the size from no. of Directory entries and file
entriee???
Waitng for help .
Bye
Biswaroop
God Created Earth.
We made two worlds out of it!
HEAVEN and HELL!!
From entwicklung@whengenibk.de Wed Jun 19 16:08:45 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Wed, 19 Jun 2002 17:08:45 +0200
Subject: [hfs-user] Displaying custom icon for a file
Message-ID: <3D109E7D.E53AE83C@whengenibk.de>
Hi,
How do I add an Icon family to a file and see the Icon being
displayed.
What I tried is as follows:
First add the icon family to a file using ResEdit
"Use Custom icon" in the properties of the file is set.
After saving the changes the Icon was still not displayed.
Please help me out.
Thanks In Advance
From entwicklung@whengenibk.de Thu Jun 20 09:35:04 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Thu, 20 Jun 2002 10:35:04 +0200
Subject: [hfs-user] Adding to a Resource Fork of a File programmatically in Windows
Message-ID: <3D1193B8.70D1F473@whengenibk.de>
Hi,
I am working on a Project dealing with HFS and I need some help:
Is it possible to display a custom icon for a normal document(not an
application) - by writing the resource header, icon-list and resource
map in the file's resource fork. If possible how do I do it in
Windows(not in Mac)?
What is the structure of a resource fork? How do I programmatically
insert the resources into a file in Windows, so that the Icon resource
is visible when viewed in a Mac.
Entwicklung.
From entwicklung@whengenibk.de Fri Jun 21 10:30:22 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Fri, 21 Jun 2002 11:30:22 +0200
Subject: [hfs-user] Structure of an ICN# Resource
Message-ID: <3D12F22E.7F112AFE@whengenibk.de>
Hi,
I am trying to write an Icon-Extractor.
Is there documentation available for the ICN# resource, regarding its
structure and other relevant details.I would like to know how I can
write Icon information into a file programmatically, once the Icon
information has been extracted.
TIA,
Entwicklung
From jude@smellycat.com Fri Jun 21 11:23:33 2002
From: jude@smellycat.com (Jude Giampaolo)
Date: Fri, 21 Jun 2002 06:23:33 -0400
Subject: [hfs-user] Structure of an ICN# Resource
In-Reply-To: <3D12F22E.7F112AFE@whengenibk.de>
Message-ID:
I think it's just raw bitmap data for the icons one after another:
/*----------------------------ICN# • Icon
List------------------------------------------*/
type 'ICN#' {
array {
hex string[128]; /* Icon
data */
};
};
On Friday, June 21, 2002, at 05:30 AM, Entwicklung wrote:
> Hi,
> I am trying to write an Icon-Extractor.
>
> Is there documentation available for the ICN# resource, regarding its
> structure and other relevant details.I would like to know how I can
> write Icon information into a file programmatically, once the Icon
> information has been extracted.
>
> TIA,
> Entwicklung
>
>
--
Jude Giampaolo
jude@smellycat.com http://www.smellycat.com/jude/
Woodpeckers: Nature's foley artists
From nathan_day@mac.com Fri Jun 21 16:16:17 2002
From: nathan_day@mac.com (Nathan Day)
Date: Sat, 22 Jun 2002 00:46:17 +0930
Subject: [hfs-user] Re: Structure of an ICN# Resource
In-Reply-To: <3D12F22E.7F112AFE@whengenibk.de>
Message-ID:
Yes there is documentation on this look for IconFamilies in carbon. the
ICN# is just the black and white icon resource there are other resources
as well. If you are trying to do this in Objective-C then don't waste
your time, it's been done already and the source code is freely
available,
http://homepage.mac.com/troy_stephens/software/objects/IconFamily/
On Friday, June 21, 2002, at 07:00 PM, Entwicklung wrote:
> Hi,
> I am trying to write an Icon-Extractor.
>
> Is there documentation available for the ICN# resource, regarding its
> structure and other relevant details.I would like to know how I can
> write Icon information into a file programmatically, once the Icon
> information has been extracted.
From entwicklung@whengenibk.de Mon Jun 24 16:31:05 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Mon, 24 Jun 2002 17:31:05 +0200
Subject: [hfs-user] Writing to the Desktop Database
Message-ID: <3D173B39.79CC0DD0@whengenibk.de>
Hi,
I am working on a project where I am required to create a
Desktop Database.
I have more then 100 files of the same type for which I would
like to display the custom icon. I would like to know whether it is
possible to display the the custom icon for a file by putting the
relevant information in the Desktop Database. How can I set the creator,
type, kind and icon data for the custom icon files by writing into the
DTDB.
Is there a flag called "hasDTDB" present and is it system defined. If
so, where and how do we set it?
I am coding in the "Windows platform" so I would not be able to
user Mac routines. I am using a Mac to test whether my files are
displaying the proper icons later.
I would be thankful for any inputs in this regard.
Thank you,
Entwicklung.
From jcpearso@ps.ucl.ac.uk Thu Jun 27 15:10:01 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Thu, 27 Jun 2002 15:10:01 +0100
Subject: [hfs-user] Format of '._' files on non-HFS(+) disks?
Message-ID: <168145.1025187001@ourhome.freeserve.co.uk>
Does anyone know where I can find out the layout of the files with names
starting with '._' that are created when an HFS/HFS+ file is copied to a
UFS, NFS etc file system?
Thanks
James Pearson
From mday@apple.com Thu Jun 27 16:35:58 2002
From: mday@apple.com (Mark Day)
Date: Thu, 27 Jun 2002 08:35:58 -0700
Subject: [hfs-user] Format of '._' files on non-HFS(+) disks?
In-Reply-To: <168145.1025187001@ourhome.freeserve.co.uk>
Message-ID: <93B63EBE-89E3-11D6-9D9D-00039354009A@apple.com>
On Thursday, June 27, 2002, at 07:10 AM, James Pearson wrote:
> Does anyone know where I can find out the layout of the files with
> names
> starting with '._' that are created when an HFS/HFS+ file is copied to
> a
> UFS, NFS etc file system?
It should be the second file of an AppleDouble pair. A quick search on
Google found the following link:
-Mark
From jcpearso@ps.ucl.ac.uk Thu Jun 27 17:53:09 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Thu, 27 Jun 2002 17:53:09 +0100
Subject: [hfs-user] Format of '._' files on non-HFS(+) disks?
In-Reply-To: Your message of Thu, 27 Jun 2002 08:35:58 -0700.
<93B63EBE-89E3-11D6-9D9D-00039354009A@apple.com>
Message-ID: <167883.1025196789@ourhome.freeserve.co.uk>
>It should be the second file of an AppleDouble pair.
Thanks ... I should have guessed it would have been AppleDouble before
asking the question ...
However, do you know why '._' was chosen as the prefix for the
resource/finderinfo file when the specs for AppleDouble state '%' ...
James Pearson
From mday@apple.com Thu Jun 27 17:59:53 2002
From: mday@apple.com (Mark Day)
Date: Thu, 27 Jun 2002 09:59:53 -0700
Subject: [hfs-user] Format of '._' files on non-HFS(+) disks?
In-Reply-To: <167883.1025196789@ourhome.freeserve.co.uk>
Message-ID: <4D1D9D2C-89EF-11D6-9D9D-00039354009A@apple.com>
On Thursday, June 27, 2002, at 09:53 AM, James Pearson wrote:
> However, do you know why '._' was chosen as the prefix for the
> resource/finderinfo file when the specs for AppleDouble state '%' ...
The leading "." is the Unix convention for making a file invisible. I
think the underscore is to help avoid name collisions. If memory
serves, other Unix-based implementations that stored AppleDouble (eg.,
AU/X and maybe NetATalk) adopted the same naming convention.
-Mark
From iosglpgc@teleline.es Thu Jun 27 22:36:31 2002
From: iosglpgc@teleline.es (Natasha Portillo)
Date: Thu, 27 Jun 2002 22:36:31 +0100
Subject: [hfs-user] Format of '._' files on non-HFS(+) disks?
In-Reply-To: <167883.1025196789@ourhome.freeserve.co.uk>
Message-ID: <000401c21e22$c8208150$0100a8c0@zeus>
Starting dot makes it hidden... The % is used in UNIX for introducing
hexadecimal values of the character instead its graphic symbol (example,
%41 instead of A). I think these are the reasons :p
-----Mensaje original-----
De: hfs-user-admin@lists.mars.org [mailto:hfs-user-admin@lists.mars.org]
En nombre de James Pearson
Enviado el: jueves, 27 de junio de 2002 17:53
Para: Mark Day
CC: hfs-user@lists.mars.org
Asunto: Re: [hfs-user] Format of '._' files on non-HFS(+) disks?
>It should be the second file of an AppleDouble pair.
Thanks ... I should have guessed it would have been AppleDouble before
asking the question ...
However, do you know why '._' was chosen as the prefix for the
resource/finderinfo file when the specs for AppleDouble state '%' ...
James Pearson
From entwicklung@whengenibk.de Tue Jul 2 09:09:48 2002
From: entwicklung@whengenibk.de (Entwicklung)
Date: Tue, 02 Jul 2002 10:09:48 +0200
Subject: [hfs-user] Presence and Working of a Desktop Database
Message-ID: <3D215FCC.A78AD532@whengenibk.de>
Hi,
I am working on a project which requires me to understand the
internals of a Desktop Database on a CD. I have a few questions in this
regard. Any leads which can be provided would be of great help.
How does the Mac recognise the presence of a Desktop Database?
What are the required files, flags and structures that tell the Mac that
there is a Desktop Database on the HFS Volume CD it is reading. And what
are the routines used to write into these files, flags and structures.
Is there documentation on the structure and layout of the Desktop
Database(Both Desktop DB and DF files). Are there any other files which
are required by the Finder to read from the Desktop Database. Does the
Volume header have any information regarding the presence, size and
contents of a DTDB?
What happens when the user copies documents from the CD onto the hard
disk?
In case it is an application, the Finder updates the DTDB with the
information available from the resources. And we are able to see the
corresponding icon displayed properly. What happens incase of
user-defined files (not files which have custom icons) whose information
we store in the DTDB of the CD. When the file is viewed on the CD the
Finder displays the icon from the DTDB of the CD, but what happens when
the user copies it onto the hard disk? Is the information on the DTDB of
the CD for that file(not application) transferred to the hard disk of
the Mac.
From nand@gmx.de Mon Jul 22 08:55:50 2002
From: nand@gmx.de (nand@gmx.de)
Date: Mon, 22 Jul 2002 09:55:50 +0200 (MEST)
Subject: [hfs-user] Case-insensitive sort...
Message-ID: <7278.1027324550@www25.gmx.net>
Hello,
Both the HFS specs and the HFS+ technical notes say that the keys
of the records in the Catalog B-Tree have to be sorted in a case insensitive
fashion. The names are however in MacRoman and Unicode encoding respectively.
I stumbled across a case where I had underscores '_' in my filenames and the
Finder gave up on certain files on my HFS+ volume though the same sort
techniques worked fine for HFS.
It took me some time and quite a bit of trial and error to figure out that a
toupper(..) works fine for HFS but not for HFS+..... using a tolower(..)
instead solved the problem for Unicode... what's the reason ?... Is
'case-insensitive' sorting for MacRoman in some way different from case-insensitive
sorting for Unicode ??? Ultimately the same codes are used except for the fact
that we have a 2-Byte character representation, right ?
Any tips are greatly appreciated !
Regards,
Nandini
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
From m.siennicki@cloos.pl Tue Aug 20 23:27:50 2002
From: m.siennicki@cloos.pl (m.siennicki@cloos.pl)
Date: Wed, 21 Aug 2002 00:27:50 +0200
Subject: [hfs-user] Problems with MacBinaries
Message-ID: <20020821002750.A4049@mimi.domek.foo>
Hi,
First, I have to say that I'm Mac newbie --- I'm just playing
with an old 7300 for 2 days. For two days i'm trying to copy one
file (MacOS upgrade) into Mac's disk, and I cannot do it.
I downloaded the file into my PC, I attached Mac's disk into
mine PC SCSI bus and I try, and try, and try, ...
hmount works,
hdir, hcd works too, hcopy Mac disk -> e2fs works. But I cannot
copy any *.bin file into Mac disk.
When I try to copy files downloaded from apple.com, I see message:
hcopy: "THERE IS SOME .bin FILENAME": unknown, unsupported, or corrupt MacBinary file (Invalid argument)
When I try the other way, for example:
$ hcopy ":FreeHand 5.0.1" .
I get the .bin file, but, when I try to copy it back into hfs I get:
hcopy: "./FreeHand_5.0.1.bin": error seeking medium (Invalid argument)
These .bin files are recognized by ``macutils''.
I think the problem is that the source doesn't compile properly
on my PC - linux-2.4.19, Athlon, gcc 2.96.
Can somebody help me? (I think the problem could be in me too :) )
Sincerely,
Marcin
(I tried to use kernel hfs driver, too: I tried this way:
1) I extracted file.bin with macunpack into file.data, file.rsrc, and file.info
2) I copied file.data into hfs directory as ``file''
3) I copied file.rsrc into .resources (or sth like this) directory as ``file''
It doesn't work too - I see my file as plain document :(
)
From m.siennicki@cloos.pl Thu Aug 22 21:12:11 2002
From: m.siennicki@cloos.pl (m.siennicki@cloos.pl)
Date: Thu, 22 Aug 2002 22:12:11 +0200
Subject: [hfs-user] Problems with MacBinaries - first solution
In-Reply-To: <20020821002750.A4049@mimi.domek.foo>; from m.siennicki@cloos.pl on Wed, Aug 21, 2002 at 12:27:50AM +0200
References: <20020821002750.A4049@mimi.domek.foo>
Message-ID: <20020822221211.A7329@mimi.domek.foo>
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Aug 21, 2002 at 12:27:50AM +0200, m.siennicki@cloos.pl wrote:
> I think the problem is that the source doesn't compile properly
And I'm right :) Linux users on ix86 should add (after doing ./configure)
following defines in Makefile, and libhfs/Makefile:
there is:
DEFINES = -DHAVE_CONFIG_H
there should be:
DEFINES = -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64
it lets to do long seeks on /dev/sdX. It solves the problem
with hqx file (there was ``error seeking media''). I'll
try to find solution for wrong counted crc in MacBinary,
but maybe somebody knows it already?
(I attach the patch for Intel x86 users:
Copy it into hfsutils-3.2.6/ directory, then do:
$ patch -p1 < hfsutils-3.2.6-1.patch
Then configure, make, etc..., you do won't have to edit Makefiles.
I hope it can help somebody.)
Sincerely,
Marcin
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="hfsutils-3.2.6-1.patch"
--- hfsutils-3.2.6/configure Tue Nov 3 00:33:47 1998
+++ hfsutils-3.2.6.new/configure Thu Aug 22 21:53:02 2002
@@ -591,6 +591,16 @@
{ echo "configure: error: --with-tk requires --with-tcl" 1>&2; exit 1; }
fi
+echo -n "checking the machine type ..."
+MACHINE_TYPE=`uname -m`
+MACHINE_CLASS=$MACHINE_TYPE
+case "$MACHINE_TYPE" in
+ i385|i486|i586|i686)
+ MACHINE_CLASS="ix86"
+ ;;
+esac
+
+echo "$MACHINE_TYPE/$MACHINE_CLASS"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:597: checking whether ${MAKE-make} sets \${MAKE}" >&5
@@ -1716,6 +1726,10 @@
DEFS=-DHAVE_CONFIG_H
+if test "$MACHINE_CLASS" = "ix86"; then
+ DEFS="$DEFS -D_FILE_OFFSET_BITS=64"
+fi
+
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
--OXfL5xGRrasGEqWY--
From Pierre Duhem Fri Sep 20 10:40:16 2002
From: Pierre Duhem (Pierre Duhem)
Date: Fri, 20 Sep 2002 11:40:16 +0200
Subject: [hfs-user] Last mounted version in HFS+
Message-ID: <6211481154.20020920114016@duhem.com>
Hello,
I'm new to this list and searched the archive about the last mounted
version in the HFS+ Volume Header Block. The spec says that external
apps creating or modifying HFS+ volumes should use a creator code in
this slot.
Mark Day answered, in a message from april :
>> myVolHeader.lastMountedVersion=kHFSPlusMountVersion; //
>> implementation version which last mounted volume
>You should pick some other constant unique to your implementation. That
>way, if a bug is found in your implementation, other implementations can
>check this version to correct for the bug.
When I pass my volume through Norton, I get an error on this precise
point.
Who should I believe?
--
Best Regards
Pierre Duhem
Logiciels & Services Duhem, Paris (France)
duhem@macdisk.com
From Pierre Duhem Fri Sep 20 13:42:59 2002
From: Pierre Duhem (Pierre Duhem)
Date: Fri, 20 Sep 2002 14:42:59 +0200
Subject: Re[2]: [hfs-user] Last mounted version in HFS+
In-Reply-To: <3D8B0E62.5C7E0F84@eyeeye.com>
References: <6211481154.20020920114016@duhem.com> <3D8B0E62.5C7E0F84@eyeeye.com>
Message-ID: <16922445740.20020920144259@duhem.com>
Simon,
SB> At a guess I'd say Norton is picking up on exactly that point. Yes
SB> its great you've used a unique identifier, no Norton doesn't know
SB> anything about it, so doesn't no how to react. What should an
SB> arbretary piece of software do about a file system wuth an unknown
SB> unique identifier?
Since the spec is so clear, I thought that the author of Norton Disk
Doctor would have accepted any value in this slot.
[snip]
SB> In short, if you really have to, change the value to something
SB> that works quietly.
The problem is that many users check their media with Norton and whine
when it barks. I remember many problems with the bundle bit and with
the modification date.
Thanks for your answer.
--
Best Regards
Pierre Duhem
Logiciels & Services Duhem, Paris (France)
duhem@macdisk.com
From mday@apple.com Fri Sep 20 17:43:43 2002
From: mday@apple.com (Mark Day)
Date: Fri, 20 Sep 2002 09:43:43 -0700
Subject: [hfs-user] Last mounted version in HFS+
In-Reply-To: <6211481154.20020920114016@duhem.com>
Message-ID: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
On Friday, September 20, 2002, at 02:40 AM, Pierre Duhem wrote:
> I'm new to this list and searched the archive about the last mounted
> version in the HFS+ Volume Header Block. The spec says that external
> apps creating or modifying HFS+ volumes should use a creator code in
> this slot.
>
> Mark Day answered, in a message from april :
>>> myVolHeader.lastMountedVersion=kHFSPlusMountVersion; //
>>> implementation version which last mounted volume
>> You should pick some other constant unique to your implementation.
>> That
>> way, if a bug is found in your implementation, other implementations
>> can
>> check this version to correct for the bug.
>
> When I pass my volume through Norton, I get an error on this precise
> point.
>
> Who should I believe?
Me. :-)
The fact that Norton Disk Doctor (or at least some versions) complains
about an unrecognized signature is a bug in Disk Doctor. I think they
simply misunderstood the purpose of that field when they did their
first HFS Plus compatible product.
Mac OS X puts a different signature there than does Mac OS 8/9. And if
we ever make any significant changes in the part of the code that
handles the on-disk structures, we will probably use yet another
signature. Older versions of Disk Doctor complained about the Mac OS X
signature, but current versions don't seem to. I don't know whether
Disk Doctor now has a list of known signatures, or if they allow any
value.
On Friday, September 20, 2002, at 05:42 AM, Pierre Duhem wrote:
> Since the spec is so clear, I thought that the author of Norton Disk
> Doctor would have accepted any value in this slot.
Or at least make it sound less worrisome (a "note" rather than "disk
corruption").
> The problem is that many users check their media with Norton and whine
> when it barks. I remember many problems with the bundle bit and with
> the modification date.
I know what you mean. By all means write up bugs against Disk Doctor
if they complain about something they shouldn't. It would certainly be
nice if they were clearer about the severity of the inconsistencies
they find.
-Mark
From simon@eyeeye.com Fri Sep 20 13:02:43 2002
From: simon@eyeeye.com (Simon Bazley)
Date: Fri, 20 Sep 2002 13:02:43 +0100
Subject: [hfs-user] Last mounted version in HFS+
References: <6211481154.20020920114016@duhem.com>
Message-ID: <3D8B0E62.5C7E0F84@eyeeye.com>
At a guess I'd say Norton is picking up on exactly that point. Yes its great you've used a unique identifier, no Norton doesn't know anything about it, so doesn't no how to react. What should an arbretary piece of software do about a file system wuth an
unknown unique identifier?
My gut feeling is to treat a unique identifier as if it were apple, unless you know something (ie say symantec started doing stuff, I bet they have a number norton knows about).
If Norton haven't implemented it this way, then you'll have to either ignore the error, if you can, (which would be my preference) or lie to norton about who last made changes to the drive. The later would work, but if there are errors in your
implementation there is no way for other clever utilities to identify whats yours and whats not.
In short, if you really have to, change the value to something that works quietly.
Simon
From Pierre Duhem Thu Sep 26 13:29:12 2002
From: Pierre Duhem (Pierre Duhem)
Date: Thu, 26 Sep 2002 14:29:12 +0200
Subject: [hfs-user] Last mounted version in HFS+
In-Reply-To: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
Message-ID: <2022498242.20020926142912@duhem.com>
Mark,
MD> Mac OS X puts a different signature there than does Mac OS 8/9. And if
MD> we ever make any significant changes in the part of the code that
MD> handles the on-disk structures, we will probably use yet another
MD> signature. Older versions of Disk Doctor complained about the Mac OS X
MD> signature, but current versions don't seem to.
On my older 6100, under 8.1, I get "8.10". On my new eMac under OS X, I get
"10.0". I still have to upgrade it to Jaguar and will see what gives.
--
Best Regards
Pierre Duhem
Logiciels & Services Duhem, Paris (France)
duhem@macdisk.com
From Pierre Duhem Thu Sep 26 15:52:47 2002
From: Pierre Duhem (Pierre Duhem)
Date: Thu, 26 Sep 2002 16:52:47 +0200
Subject: [hfs-user] Floppy formatting
In-Reply-To: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
Message-ID: <1831114722.20020926165247@duhem.com>
Hello,
In the past years, I've seen many times formatting utilities which
formatted removable media as floppies, that is, without partition
table and with the MBR (signature BR) in the 2nd sector.
When I test such a scheme under Norton Disk Doctor v. 5, the disk
passes, with some residual errors.
I'm now testing also under NDD 7 and Disk Utility, under OS X.1.4, and
the disk never mounts.
Is such a formatting scheme deprecated?
Under NDD 5, the program complains about the block size (I chose 4KB,
as I had noted from other media) and insists on having 512B sectors.
Does this make sense?
Thanks in advance.
--
Best Regards
Pierre Duhem
Logiciels & Services Duhem, Paris (France)
duhem@macdisk.com
From Pierre Duhem Thu Sep 26 16:57:05 2002
From: Pierre Duhem (Pierre Duhem)
Date: Thu, 26 Sep 2002 17:57:05 +0200
Subject: [hfs-user] Floppy formatting
In-Reply-To: <3D9325A7.64CE7176@eyeeye.com>
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
<1831114722.20020926165247@duhem.com> <3D9325A7.64CE7176@eyeeye.com>
Message-ID: <6134972539.20020926175705@duhem.com>
Simon,
SB> 4kb is the default block size for HFS+, 512B is the default for
SB> HFS. My understanding is that having a device without parition
SB> table is the norm for small devices.
Where does this "default block size" come? In my understanding, the
formatter sets the block size in the MBR (or in the VHB for HFS+). I
have already seen floppies formatted in HFS with 1024B/sector and they
seem to work OK.
On the other hand, I never had a formatter which formatted as a floppy
(I used Silver lining, FWB, Apple's own tools, Drivor, Formac's
formatter and many others). But I saw many media formatted as
floppies.
SB> Are you sure you have HFS support?
Yes. HFS and HFS+, under OS 8.1 and 10.1.4.
--
Bien à vous
Pierre Duhem
mailto:lsduhem@duhem.com
From Pierre Duhem Thu Sep 26 17:01:09 2002
From: Pierre Duhem (Pierre Duhem)
Date: Thu, 26 Sep 2002 18:01:09 +0200
Subject: [hfs-user] Floppy formatting
In-Reply-To: <3D932602.F7EC4D48@eyeeye.com>
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
<1831114722.20020926165247@duhem.com> <3D932602.F7EC4D48@eyeeye.com>
Message-ID: <19835217167.20020926180109@duhem.com>
Bonjour Simon,
Le jeudi 26 septembre 2002, à 17:21, vous écriviez :
SB> Note thought that under HFS+ blocks size can be changed. Under HFS
SB> it MUST be 512bytes.
I don't think this is true. My formatter computes the block size with
a simple division: 1 + (nb_sectors / 0xFFFF). I think I found this
formula on some Apple document (Inside Macintosh ?).
SB> Changing it means its not a HFS disk anymore.
SB> Perhaps HFS+ requires a partition table. Have a read of Technote
SB> TN1150 for more information (regarding HFS+)
I read TN1150 several times along the years, from one of the first
editions, in 1999. I didn't read anything about the need of a
partition table. That is what one should conclude from reading IM and
other documents, but it is never stated so clearly. On the other hand,
I already saw many such media.
--
Best Regards
Pierre Duhem
Logiciels & Services Duhem, Paris (France)
duhem@macdisk.com
From mday@apple.com Thu Sep 26 19:05:59 2002
From: mday@apple.com (Mark Day)
Date: Thu, 26 Sep 2002 11:05:59 -0700
Subject: [hfs-user] Last mounted version in HFS+
In-Reply-To: <2022498242.20020926142912@duhem.com>
Message-ID: <9C9AF844-D17A-11D6-A4AC-00039354009A@apple.com>
On Thursday, September 26, 2002, at 05:29 AM, Pierre Duhem wrote:
> On my older 6100, under 8.1, I get "8.10".
All the way up to Mac OS 9.2.2 use '8.10', though we really should have
been changing that as we made significant changes or fixes.
> On my new eMac under OS X, I get
> "10.0". I still have to upgrade it to Jaguar and will see what gives.
Jaguar still uses '10.0'. It arguable that it should have changed the
lastMountedVersion, too.
-Mark
From garyliu@fas.harvard.edu Thu Sep 26 19:24:46 2002
From: garyliu@fas.harvard.edu (Gary Liu)
Date: Thu, 26 Sep 2002 14:24:46 -0400
Subject: [hfs-user] Last mounted version in HFS+
In-Reply-To: <9C9AF844-D17A-11D6-A4AC-00039354009A@apple.com>
Message-ID: <000401c2658a$010f7e40$0b5a93ac@GARYLIU>
Somebody please tell me how to get off this mailing list.
Thanks.
-----Original Message-----
From: hfs-user-admin@lists.mars.org
[mailto:hfs-user-admin@lists.mars.org] On Behalf Of Mark Day
Sent: Thursday, September 26, 2002 2:06 PM
To: Pierre Duhem
Cc: hfs-user-admin@lists.mars.org; hfs-user@lists.mars.org
Subject: Re: [hfs-user] Last mounted version in HFS+
On Thursday, September 26, 2002, at 05:29 AM, Pierre Duhem wrote:
> On my older 6100, under 8.1, I get "8.10".
All the way up to Mac OS 9.2.2 use '8.10', though we really should have
been changing that as we made significant changes or fixes.
> On my new eMac under OS X, I get
> "10.0". I still have to upgrade it to Jaguar and will see what gives.
Jaguar still uses '10.0'. It arguable that it should have changed the
lastMountedVersion, too.
-Mark
From pwd@apple.com Fri Sep 27 00:28:56 2002
From: pwd@apple.com (Patrick Dirks)
Date: Thu, 26 Sep 2002 16:28:56 -0700
Subject: [hfs-user] Floppy formatting
In-Reply-To: <19835217167.20020926180109@duhem.com>
Message-ID:
On Thursday, September 26, 2002, at 09:01 AM, Pierre Duhem wrote:
> Bonjour Simon,
>
> Le jeudi 26 septembre 2002, à 17:21, vous écriviez :
>
> SB> Note thought that under HFS+ blocks size can be changed. Under HFS
> SB> it MUST be 512bytes.
>
> I don't think this is true. My formatter computes the block size with
> a simple division: 1 + (nb_sectors / 0xFFFF). I think I found this
> formula on some Apple document (Inside Macintosh ?).
Um, not sure exactly what you're trying to do but this could be
trouble. On HFS the allocation block size was, by default, the
smallest multiple of 512 bytes that would make the total number of
allocation blocks fit in 16 bits. On HFS+, however, the allocation
block size must be a power of two multiple of 512, i.e. 512 bytes, 1K,
2K, 4K, 8K, etc. 3K, for instance, would NOT be a valid allocation
block size!
See TN1150 (bottom of page 4).
>
> SB> Changing it means its not a HFS disk anymore.
> SB> Perhaps HFS+ requires a partition table. Have a read of Technote
> SB> TN1150 for more information (regarding HFS+)
>
> I read TN1150 several times along the years, from one of the first
> editions, in 1999. I didn't read anything about the need of a
> partition table. That is what one should conclude from reading IM and
> other documents, but it is never stated so clearly. On the other hand,
> I already saw many such media.
>
>
> --
> Best Regards
> Pierre Duhem
> Logiciels & Services Duhem, Paris (France)
> duhem@macdisk.com
>
From simon@eyeeye.com Thu Sep 26 16:20:07 2002
From: simon@eyeeye.com (Simon Bazley)
Date: Thu, 26 Sep 2002 16:20:07 +0100
Subject: [hfs-user] Floppy formatting
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com> <1831114722.20020926165247@duhem.com>
Message-ID: <3D9325A7.64CE7176@eyeeye.com>
4kb is the default block size for HFS+, 512B is the default for HFS. My understanding is that having a device without parition table is the norm for small devices. Are you sure you have HFS support?
Simon
From simon@eyeeye.com Thu Sep 26 16:21:38 2002
From: simon@eyeeye.com (Simon Bazley)
Date: Thu, 26 Sep 2002 16:21:38 +0100
Subject: [hfs-user] Floppy formatting
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com> <1831114722.20020926165247@duhem.com>
Message-ID: <3D932602.F7EC4D48@eyeeye.com>
Note thought that under HFS+ blocks size can be changed. Under HFS it MUST be 512bytes. Changing it means its not a HFS disk anymore. Perhaps HFS+ requires a partition table. Have a read of Technote TN1150 for more information (regarding HFS+)
Simon
From simon@eyeeye.com Thu Sep 26 18:15:41 2002
From: simon@eyeeye.com (Simon Bazley)
Date: Thu, 26 Sep 2002 18:15:41 +0100
Subject: [hfs-user] Floppy formatting
References: <1FBD3142-CCB8-11D6-BCDB-00039354009A@apple.com>
<1831114722.20020926165247@duhem.com> <3D932602.F7EC4D48@eyeeye.com> <19835217167.20020926180109@duhem.com>
Message-ID: <3D9340BD.4DE85DB1@eyeeye.com>
The default block size is specified in Inside Macintosh: Files page 2-54 and 2-56. It states that the default macintosh block size is 512 bytes. Each device is conceptually a physical and logical device, the physical one being what in linux is a block
device (that happens to be a hard disk), logical one being on a per volume basis. All Physical devices are 512 byte blocks, this is stated on 2-54, and discussed further in Inside Macintosh: Devices, SCSI Manager (3-12).
All code relating to the partition table, takes place at device level, rather than file system level. This all changed with HFS+
I think the thing you're confusing is logical block size, which is stated as the lowest multiple of 512 such that less than 65535 blocks exist on the volume, and physical block size (always 512).
It states (2-54) that the organisation of a floppy disk doesn't include partitions (and hence can't include device drivers), wheras hard disks do. Perhaps this has something to do with it.
This is all fairly academic if you're using HFS+ though, which I think sounds like the best idea.
Simon
From Frank Meurer Sat Sep 28 11:01:15 2002
From: Frank Meurer (Frank Meurer)
Date: Sat, 28 Sep 2002 12:01:15 +0200 (CEST)
Subject: [hfs-user] Floppy formatting
In-Reply-To: <3D932602.F7EC4D48@eyeeye.com>
Message-ID:
On Thu, 26 Sep 2002, Simon Bazley cum veritate scripsit :
> Note thought that under HFS+ blocks size can be changed. Under HFS it
> MUST be 512bytes. Changing it means its not a HFS disk anymore.
[...]
Just a small note: You can use HFS 512 byte block sizes even if your drive
is formatted with other block sizes (i.e. 4k blocks). This is a layer
beyond HFS. Don't mix it up! ;-)
OT:
Thank you all for the information given on this list (just wanted to say
it)!
--
Sending unsolicited commercial email to this address may be a violation
of the Washington State Consumer Protection Act, chapter 19.86 RCW.
Das Verschicken unverlangter kommerzieller email an diese Adresse ist
verboten (LG Traunstein, 2 HK O 3755/97 vom 14.10.1997, CR 1998, 171f).
From jcpearso@ps.ucl.ac.uk Wed Oct 2 16:09:45 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Wed, 02 Oct 2002 16:09:45 +0100
Subject: [hfs-user] HFS utils and large volumes
Message-ID: <413754.1033571385@ourhome.freeserve.co.uk>
In case anyone is interested, here is a small patch to make hfsutils work
with large volumes (over 4Gb).
Under Linux, I also has to compile the code with
"-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
(There is probably a way to do this via 'configure', but I haven't a clue
how to do that ...)
The only strange bit about the the patch is that I had to split the
"return" line into two lines - which is the only way it would gives
the correct result using gcc v2.96-98 on Linux for large numbers ...
James Pearson
*** hfsutils-3.2.6/libhfs/os/unix.c.dist Mon Nov 2 22:09:13 1998
--- hfsutils-3.2.6/libhfs/os/unix.c Wed Oct 2 13:46:29 2002
***************
*** 147,158 ****
if (offset == (unsigned long) -1)
result = lseek(fd, 0, SEEK_END);
else
! result = lseek(fd, offset << HFS_BLOCKSZ_BITS, SEEK_SET);
if (result == -1)
ERROR(errno, "error seeking medium");
! return (unsigned long) result >> HFS_BLOCKSZ_BITS;
fail:
return -1;
--- 147,160 ----
if (offset == (unsigned long) -1)
result = lseek(fd, 0, SEEK_END);
else
! result = lseek(fd, (off_t)offset << HFS_BLOCKSZ_BITS, SEEK_SET);
if (result == -1)
ERROR(errno, "error seeking medium");
! result >>= HFS_BLOCKSZ_BITS;
!
! return (unsigned long) result;
fail:
return -1;
From jcpearso@ps.ucl.ac.uk Thu Oct 3 16:45:07 2002
From: jcpearso@ps.ucl.ac.uk (James Pearson)
Date: Thu, 03 Oct 2002 16:45:07 +0100
Subject: [hfs-user] HFS utils and large volumes
In-Reply-To: Your message of Wed, 02 Oct 2002 16:09:45 +0100.
<413754.1033571385@ourhome.freeserve.co.uk>
Message-ID: <382331.1033659907@ourhome.freeserve.co.uk>
>In case anyone is interested, here is a small patch to make hfsutils work
>with large volumes (over 4Gb).
>
>Under Linux, I also has to compile the code with
>
> "-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
>
>(There is probably a way to do this via 'configure', but I haven't a clue
>how to do that ...)
>
>The only strange bit about the the patch is that I had to split the
>"return" line into two lines - which is the only way it would gives
>the correct result using gcc v2.96-98 on Linux for large numbers ...
I missed that hfsutils reports the number free bytes on a volume - which
overflow a 32 bit integer for volumes over 4Gb - the following replacement
patch should fix this.
James Pearson
begin 664 hfsutils-3.2.6-lfs-2.patch.gz
M'XL(")UAG#T``VAFY:W=T>C2ZQIY>R7IY$G[M^-X@8
M5\[2!";I-8`%EN48^XYI@[F_/]S2=?TI!N4]"6#J_ZUC[8!F&M=6N
M?T0;S/Y>QQP,078`?J(0U#0,&>%P<`!JGK!HD2`C39.%!KJIR5D`&6$YQ3E`
M&2%7:AATP.B`.QZ_FX\G)]I(3B,XN+7=-+]L6@O=DK^]SH9G2+#S-""H(:_@UV'R.\";]Y
M'(]>TM2_8C=UBLW)Y4R?YO$*Y]W9[&NZDO.$^I5HI25^OFCU%"OR['N%?(+S
M6<1]W!C+)F.8WV*,Y1UC]$W'M!XQQJ#3MVZ+AK_T,DB\F'P443L[^FU^<3J>
MP$LP/XV47EL.X74O#I7C+_7,\Z!2*4*(<)0%"[^/6,9=`T7H(5X:S#EW'=;2Q2X]B
MG\T8Z+2]9IL-[;W.L&]71E-`T.*!\;80-T9YSQ3=
M\VO&/2[NU0[LX*`F;C8<8JL,0QRJ^(=D*_VP*,!8XU_0'/#;Z@BJ;A7,HK6.
MCJSYRM?RD5"\2.0;@O',CU>JERVN/YJ?D,[/`H^3EB:>%89X52A_22&J,Y39
M^Z//(`_Q
Message-ID: <406059.1033659322@ourhome.freeserve.co.uk>
>In case anyone is interested, here is a small patch to make hfsutils work
>with large volumes (over 4Gb).
>
>Under Linux, I also has to compile the code with
>
> "-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
>
>(There is probably a way to do this via 'configure', but I haven't a clue
>how to do that ...)
>
>The only strange bit about the the patch is that I had to split the
>"return" line into two lines - which is the only way it would gives
>the correct result using gcc v2.96-98 on Linux for large numbers ...
I missed that hfsutils reports the number free bytes on a volume - which
overflow a 32 bit integer for volumes over 4Gb - the following replacement
patch should fix this.
James Pearson
begin 664 hfsutils-3.2.6-lfs-2.patch.gz
M'XL(")UAG#T``VAFY:W=T>C2ZQIY>R7IY$G[M^-X@8
M5\[2!";I-8`%EN48^XYI@[F_/]S2=?TI!N4]"6#J_ZUC[8!F&M=6N
M?T0;S/Y>QQP,078`?J(0U#0,&>%P<`!JGK!HD2`C39.%!KJIR5D`&6$YQ3E`
M&2%7:AATP.B`.QZ_FX\G)]I(3B,XN+7=-+]L6@O=DK^]SH9G2+#S-""H(:_@UV'R.\";]Y
M'(]>TM2_8C=UBLW)Y4R?YO$*Y]W9[&NZDO.$^I5HI25^OFCU%"OR['N%?(+S
M6<1]W!C+)F.8WV*,Y1UC]$W'M!XQQJ#3MVZ+AK_T,DB\F'P443L[^FU^<3J>
MP$LP/XV47EL.X74O#I7C+_7,\Z!2*4*(<)0%"[^/6,9=`T7H(5X:S#EW'=;2Q2X]B
MG\T8Z+2]9IL-[;W.L&]71E-`T.*!\;80-T9YSQ3=
M\VO&/2[NU0[LX*`F;C8<8JL,0QRJ^(=D*_VP*,!8XU_0'/#;Z@BJ;A7,HK6.
MCJSYRM?RD5"\2.0;@O',CU>JERVN/YJ?D,[/`H^3EB:>%89X52A_22&J,Y39
M^Z//(`_Q
Message-ID: <19345.1035557487@www26.gmx.net>
--- Weitergeleitete Nachricht / Forwarded Message ---
Date: Fri, 25 Oct 2002 16:47:39 +0200 (MEST)
From: nand@gmx.de
To: hfs-user@lists.apple.com
Subject: FinderInfo
> Hello Listers,
> Does anyone know what the 32 bytes of FinderInfo in the
> MDB/VolmeHeader of an HFS/HFS+ volume are actually supposed to contain ?
>
> Neither Universal Interfaces or TN 1150 seem to mention the exact format
> of
> the data stored in here. Some sample driver code from Apple led me to
> believe
> that these 32 bytes are organized as eight 4 byte units of which the fifth
> long integer holds the CNID of the System Folder of the Volume (if
> present).
> What do the other fields stand for... could someone direct me links
> describing
> these if any?
> The weblinks point to Inside Macintosh: Finder but only the finder fields
> relevant to the catalog files and folders seem to be described here.
>
> Any help is greatly appreciated!
>
> Regards,
> Nandini Hengen
>
> --
> +++ GMX - Mail, Messaging & more http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
>
>
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!