I18N volume labels
Kay Sievers
kay.sievers at vrfy.org
Tue Jan 4 07:12:36 PST 2005
On Wed, 2005-01-05 at 01:03 +1300, leon breedt wrote:
> It seems Joliet stores the volume label in something called a
> Supplementary Volume Descriptor (located some where after the Primary
> Volume Descriptor).
Sounds good and would be nice to get that capability. Thanks!
is = (union iso_super_block *)
get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200);
...
+ for (vd_offset = ISO_VD_OFFSET; ; vd_offset += ISO_SECTOR_SIZE) {
Please add a hard limit to that loop, so that a bad disk cannot loop endlessly.
+ vd = (union iso_super_block *)
+ get_buffer (id, off + vd_offset, 0x200);
...
set_label_raw(id, is->iso.volume_id, 32);
- set_label_string(id, is->iso.volume_id, 32);
Please set both the "string" and the "raw" value at the same time.
+ set_label_unicode16(id, vd->iso.volume_id, BE, 32);
You cannot use two pointers with get_buffer(), the second call may invalidate
the first one.
And please shorten the comments, it's not needed to explain these
details here.
Thanks again,
Kay
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list