- set_label_raw(id, is->iso.volume_id, 32);
- set_label_string(id, is->iso.volume_id, 32);
+ int vd_offset;
+ int i;
+ int found_svd;
+
+ found_svd = 0;
+ vd_offset = ISO_VD_OFFSET;
+ for (i = 0; i < ISO_VD_MAX; i++) {
+ is = (union iso_super_block *)
+ get_buffer (id, off + vd_offset, 0x200);
+ if (is == NULL || is->iso.type == ISO_VD_END)
+ break;
+ if (is->iso.type == ISO_VD_SUPPLEMENTARY) {
+ dbg("found ISO supplementary VD at offset 0x%llx", off + vd_offset);
+ found_svd = 1;
+ break;
+ }
+ vd_offset += ISO_SECTOR_SIZE;
+ }
+
+ if (!found_svd) {
+ is = (union iso_super_block *)
+ get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200);
+ if (is == NULL)
+ return -1;
+ set_label_raw(id, is->iso.volume_id, 32);
+ set_label_string(id, is->iso.volume_id, 32);
+ } else {
+ set_label_raw(id, is->iso.volume_id, 32);
+ set_label_unicode16(id, is->iso.volume_id, BE, 32);
+ }