<p>IOKit and the DiskArbitration framework can tell me a lot of things about mounted volumes on a mac, but they don't seem to be able to differentiate between HFS+ and HFS Standard volumes. </p>

<p>The IOKit/DA keys <code>Content</code>, <code>DAVolumeKind</code> and <code>DAMediaContent</code> are always Apple_HFS and hfs for both HFS Standard and HFS+ volumes.</p>

<p>diskutil and DiskUtility.app <em>can</em> tell the difference, but I they don't seem to have been open sourced by Apple. </p>

<p>p.s. statfs (2) does not differentiate</p>

There are two ways to do this:
Use
```
getattrlist()
```
to retrieve the
```
ATTR_VOL_SIGNATURE
```
attribute for the mount path of the volume.
Use the Carbon call FSGetVolumeInfo() and look in the
```
signature
```
field of the returned struct.
The signature of a volume is a 16 bit value, usually interpreted as two ASCII characters.  The signature for HFS is 'BD', HFS+ is 'H+', and case sensitive HFS+ is 'HX'.
The man page for
```
getattrlist
```
says the field is a u_int32, but the equivalent field in the FSVolumeInfo struct is only 16 bits, so I'm not sure which 16 bits of the 32 are filled in with the signature when using
```
getattrlist
```
, you'll probably have to just experiment a bit if you want to go the non-Carbon route.
getattrlist man page
HFS Plus Volume Format reference
FSGetVolumeInfo