[haiku-development] Oddity on UDF file system

  • From: Jérôme Duval <korli@xxxxxxxxxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 9 Oct 2012 11:36:02 +0200

Hi,

I investigated a bit our support for UDF 2.50 and went through an
oddity on the initialization of some const structures in
src/add-ons/kernel/file_systems/udf/UdfStructures.cpp
Here they are

// entity_ids
const entity_id kMetadataPartitionMapId(0, "*UDF Metadata Partition");
const entity_id kSparablePartitionMapId(0, "*UDF Sparable Partition");
const entity_id kVirtualPartitionMapId(0, "*UDF Virtual Partition");
const entity_id kImplementationId(0, "*OpenBeOS UDF",
implementation_id_suffix(OS_BEOS, BEOS_GENERIC));
const entity_id kPartitionContentsId1xx(0, "+NSR02");
const entity_id kPartitionContentsId2xx(0, "+NSR03");
const entity_id kLogicalVolumeInfoId150(0, "*UDF LV Info",
udf_id_suffix(0x0150, OS_BEOS, BEOS_GENERIC));
const entity_id kLogicalVolumeInfoId201(0, "*UDF LV Info",
udf_id_suffix(0x0201, OS_BEOS, BEOS_GENERIC));
const entity_id kDomainId150(0, "*OSTA UDF Compliant", domain_id_suffix(0x0150,
                                  DF_HARD_WRITE_PROTECT));
const entity_id kDomainId201(0, "*OSTA UDF Compliant", domain_id_suffix(0x0201,
                                  DF_HARD_WRITE_PROTECT));


When using and dumping these structures, I noticed they are not
initialized as expected. I'm wondering whether it's really supposed to
work, or whether it's a regression.
The fact that this code is located in a kernel addon might be important.

Thoughts?

For the time being, I added a function to init these structures
correctly in every hook.

Bye,
Jérôme

Other related posts: