+ struct hfs_mdb *hfs = (struct hfs_mdb *) buf;
+ char uuid_str[17];
+ __u64 uuid;
+
+ if ((memcmp(hfs->embed_sig, "H+", 2) == 0) ||
+ (memcmp(hfs->embed_sig, "HX", 2) == 0))
+ return 1; /* Not hfs, but an embedded HFS+ */
+
+ uuid = blkid_le64(*((unsigned long long *) hfs->finder_info.id));
+ if (uuid) {
+ sprintf(uuid_str, "%016llX", uuid);
+ blkid_set_tag(probe->dev, "UUID", uuid_str, 0);
+ }
+ blkid_set_tag(probe->dev, "LABEL", hfs->label, hfs->label_len);
+ return 0;
+}
+
+
+static int probe_hfsplus(struct blkid_probe *probe,
+ struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
+ struct hfsplus_bnode_descriptor *descr;
+ struct hfsplus_bheader_record *bnode;
+ struct hfsplus_catalog_key *key;
+ struct hfsplus_vol_header *hfsplus;
+ struct hfs_mdb *sbd = (struct hfs_mdb *) buf;
+ unsigned int alloc_block_size;
+ unsigned int alloc_first_block;
+ unsigned int embed_first_block;
+ unsigned int off = 0;
+ unsigned int blocksize;
+ unsigned int cat_block;
+ unsigned int ext_block_start;
+ unsigned int ext_block_count;
+ unsigned int record_count;
+ unsigned int leaf_node_head;
+ unsigned int leaf_node_count;
+ unsigned int leaf_node_size;
+ unsigned int leaf_block;
+ unsigned int label_len;
+ int ext;
+ __u64 leaf_off, uuid;
+ char uuid_str[17], label[512];