projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mdev: fix breakage caused by unified parser usage
[oweals/busybox.git]
/
util-linux
/
volume_id
/
hfs.c
diff --git
a/util-linux/volume_id/hfs.c
b/util-linux/volume_id/hfs.c
index 71a3df0b880b1fdb37cbebf1eefe954413ce1e4b..79658e4fa1cc1ce2419fabb83b94f0468d3f490c 100644
(file)
--- a/
util-linux/volume_id/hfs.c
+++ b/
util-linux/volume_id/hfs.c
@@
-160,14
+160,14
@@
int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off)
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
-
return -1;
+ return -1;
hfs = (struct hfs_mdb *) buf;
if (hfs->signature[0] != 'B' || hfs->signature[1] != 'D')
goto checkplus;
/* it may be just a hfs wrapper for hfs+ */
hfs = (struct hfs_mdb *) buf;
if (hfs->signature[0] != 'B' || hfs->signature[1] != 'D')
goto checkplus;
/* it may be just a hfs wrapper for hfs+ */
- if (
memcmp(hfs->embed_sig, "H+", 2) == 0
) {
+ if (
hfs->embed_sig[0] == 'H' && hfs->embed_sig[1] == '+'
) {
alloc_block_size = be32_to_cpu(hfs->al_blk_size);
dbg("alloc_block_size 0x%x", alloc_block_size);
alloc_block_size = be32_to_cpu(hfs->al_blk_size);
dbg("alloc_block_size 0x%x", alloc_block_size);
@@
-188,14
+188,13
@@
int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off)
}
if (hfs->label_len > 0 && hfs->label_len < 28) {
}
if (hfs->label_len > 0 && hfs->label_len < 28) {
-
volume_id_set_label_raw(id, hfs->label, hfs->label_len);
+
//
volume_id_set_label_raw(id, hfs->label, hfs->label_len);
volume_id_set_label_string(id, hfs->label, hfs->label_len) ;
}
volume_id_set_uuid(id, hfs->finder_info.id, UUID_HFS);
volume_id_set_label_string(id, hfs->label, hfs->label_len) ;
}
volume_id_set_uuid(id, hfs->finder_info.id, UUID_HFS);
-
- volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
- id->type = "hfs";
+// volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
+// id->type = "hfs";
return 0;
return 0;
@@
-281,12
+280,12
@@
int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off)
label_len = be16_to_cpu(key->unicode_len) * 2;
dbg("label unicode16 len %i", label_len);
label_len = be16_to_cpu(key->unicode_len) * 2;
dbg("label unicode16 len %i", label_len);
-
volume_id_set_label_raw(id, key->unicode, label_len);
+
//
volume_id_set_label_raw(id, key->unicode, label_len);
volume_id_set_label_unicode16(id, key->unicode, BE, label_len);
found:
volume_id_set_label_unicode16(id, key->unicode, BE, label_len);
found:
-
volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
-
id->type = "hfsplus";
+
//
volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
+
//
id->type = "hfsplus";
return 0;
}
return 0;
}