found:
strncpy(id->type_version, lvm->type, 8);
id->usage_id = VOLUME_ID_RAID;
- id->type_id = VOLUME_ID_LVM1;
+ id->type_id = VOLUME_ID_LVM2;
id->type = "LVM2_member";
return 0;
p = &id->partitions[i];
+ p->partition_type_raw = part[i].sys_ind;
+
if (is_extended(part[i].sys_ind)) {
dbg("found extended partition at 0x%llx", poff);
p->usage_id = VOLUME_ID_PARTITIONTABLE;
p->off = current + poff;
p->len = plen;
id->partition_count++;
+
+ p->partition_type_raw = part[i].sys_ind;
+
if (id->partition_count >= VOLUME_ID_PARTITIONS_MAX) {
dbg("to many partitions");
next = 0;
for (i = 0; i <= root_dir_entries; i++) {
/* end marker */
- if (dir[i].attr == 0x00) {
+ if (dir[i].name[0] == 0x00) {
dbg("end of dir");
break;
}
/* empty entry */
- if (dir[i].attr == 0xe5)
+ if (dir[i].name[0] == 0xe5)
continue;
if (dir[i].attr == FAT_ATTR_VOLUME) {
for (i = 0; i <= count; i++) {
/* end marker */
- if (dir[i].attr == 0x00) {
+ if (dir[i].name[0] == 0x00) {
dbg("end of dir");
goto fat32_label;
}
/* empty entry */
- if (dir[i].attr == 0xe5)
+ if (dir[i].name[0] == 0xe5)
continue;
if (dir[i].attr == FAT_ATTR_VOLUME) {
set_label_raw(id, vs->type.fat32.label, 11);
set_label_string(id, vs->type.fat32.label, 11);
}
- set_uuid(id, vs->type.fat32.serno, UUID_DCE);
+ set_uuid(id, vs->type.fat32.serno, UUID_DOS);
found:
id->usage_id = VOLUME_ID_FILESYSTEM;
break;
case VOLUME_ID_ALL:
default:
+ /* probe for raid first, cause fs probes may be successful on raid members */
rc = probe_linux_raid(id, off, size);
if (rc == 0)
break;
-
- /* signature in the first block */
- rc = probe_ntfs(id, off);
+ rc = probe_lvm1(id, off);
if (rc == 0)
break;
- rc = probe_vfat(id, off);
+ rc = probe_lvm2(id, off);
if (rc == 0)
break;
+
+ /* signature in the first block, only small buffer needed */
rc = probe_msdos_part_table(id, off);
+ if (rc == 0)
+ break;
+ rc = probe_ntfs(id, off);
+ if (rc == 0)
+ break;
+ rc = probe_vfat(id, off);
if (rc == 0)
break;
rc = probe_mac_partition_map(id, off);
if (rc == 0)
break;
rc = probe_ufs(id, off);
- if (rc == 0)
- break;
- rc = probe_lvm1(id, off);
- if (rc == 0)
- break;
- rc = probe_lvm2(id, off);
if (rc == 0)
break;