--- hal-0.4.4/hald/linux/volume_id/volume_id.c 2005-01-07 04:25:58.000000000 +0100 +++ hal-0.4.4.patched/hald/linux/volume_id/volume_id.c 2005-01-09 19:26:22.000000000 +0100 @@ -1239,15 +1239,20 @@ } __attribute__((__packed__)) hs; } __attribute__((__packed__)) *is; + char vd_primary_label[32]; + is = (union iso_super_block *) get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200); if (is == NULL) return -1; + memcpy (vd_primary_label, is->iso.volume_id, 32); + if (strncmp(is->iso.id, "CD001", 5) == 0) { int vd_offset; - int i; + int i, j; __u8 found_svd; + char tmp_label[32]; found_svd = 0; vd_offset = ISO_VD_OFFSET; @@ -1264,7 +1269,11 @@ vd_offset += ISO_SECTOR_SIZE; } - if (!found_svd) { + j = 0; + for (i = 0; i+2 <= 32; i+=2) + tmp_label[j++] = is->iso.volume_id[i+1]; + + if (!found_svd || !strncmp(tmp_label, vd_primary_label, 16)) { is = (union iso_super_block *) get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200); if (is == NULL)