diff --git a/src/add-ons/kernel/file_systems/udf/Array.h b/src/add-ons/kernel/file_systems/udf/Array.h index 2f2f6ee1e2..84d6653709 100644 --- a/src/add-ons/kernel/file_systems/udf/Array.h +++ b/src/add-ons/kernel/file_systems/udf/Array.h @@ -40,13 +40,14 @@ struct array { { const uint8 bytesPerRow = 8; char classname[40]; - sprintf(classname, "array", arrayLength); + sprintf(classname, "array", arrayLength); DUMP_INIT(classname); for (uint32 i = 0; i < arrayLength; i++) { if (i % bytesPerRow == 0) - PRINT(("[%ld:%ld]: ", i, i + bytesPerRow - 1)); + PRINT(("[%" B_PRIu32 ":%" B_PRIu32 "]: ", + i, i + bytesPerRow - 1)); SIMPLE_PRINT(("0x%.2x ", data[i])); if ((i + 1) % bytesPerRow == 0 || i + 1 == arrayLength) SIMPLE_PRINT(("\n")); @@ -66,13 +67,14 @@ struct array { { const uint8 bytesPerRow = 8; char classname[40]; - sprintf(classname, "array", arrayLength); + sprintf(classname, "array", arrayLength); DUMP_INIT(classname); for (uint32 i = 0; i < arrayLength; i++) { if (i % bytesPerRow == 0) - PRINT(("[%ld:%ld]: ", i, i + bytesPerRow - 1)); + PRINT(("[%" B_PRIu32 ":%" B_PRIu32 "]: ", + i, i + bytesPerRow - 1)); SIMPLE_PRINT(("0x%.2x ", data[i])); if ((i + 1) % bytesPerRow == 0 || i + 1 == arrayLength) SIMPLE_PRINT(("\n")); diff --git a/src/add-ons/kernel/file_systems/udf/Icb.cpp b/src/add-ons/kernel/file_systems/udf/Icb.cpp index e60be96429..6f0fcc991a 100644 --- a/src/add-ons/kernel/file_systems/udf/Icb.cpp +++ b/src/add-ons/kernel/file_systems/udf/Icb.cpp @@ -303,7 +303,7 @@ Icb::Read(off_t pos, void *buffer, size_t *length, uint32 *block) TRACE(("Icb::Read: pos = %" B_PRIdOFF ", buffer = %p, length = (%p)->%ld\n", pos, buffer, length, (length ? *length : 0))); - DEBUG_INIT_ETC("Icb", ("pos: %lld, length: %ld", pos, *length)); + DEBUG_INIT_ETC("Icb", ("pos: %" B_PRIdOFF " , length: %ld", pos, *length)); if (fFileCache != NULL) return file_cache_read(fFileCache, NULL, pos, buffer, length); diff --git a/src/add-ons/kernel/file_systems/udf/Recognition.cpp b/src/add-ons/kernel/file_systems/udf/Recognition.cpp index e3aefd1ec5..12ddee2355 100644 --- a/src/add-ons/kernel/file_systems/udf/Recognition.cpp +++ b/src/add-ons/kernel/file_systems/udf/Recognition.cpp @@ -194,21 +194,22 @@ walk_anchor_volume_descriptor_sequences(int device, off_t offset, off_t length, ssize_t bytesRead = read_pos(device, address, chunk.Data(), blockSize); anchorErr = bytesRead == (ssize_t)blockSize ? B_OK : B_IO_ERROR; if (anchorErr) { - PRINT(("block %Ld: read_pos(pos:%Ld, len:%ld) failed with error 0x%lx\n", - block, address, blockSize, bytesRead)); + PRINT(("block %" B_PRIdOFF ": read_pos(pos:%" B_PRIdOFF ", " + "len:%" PRIu32 ") failed with error 0x%lx\n", + block, address, blockSize, bytesRead)); } } if (!anchorErr) { anchor = reinterpret_cast(chunk.Data()); anchorErr = anchor->tag().init_check(block + offset); if (anchorErr) { - PRINT(("block %Ld: invalid anchor\n", block)); + PRINT(("block %" B_PRIdOFF ": invalid anchor\n", block)); } else { - PRINT(("block %Ld: valid anchor\n", block)); + PRINT(("block %" B_PRIdOFF ": valid anchor\n", block)); } } if (!anchorErr) { - PRINT(("block %Ld: anchor:\n", block)); + PRINT(("block %" B_PRIdOFF ": anchor:\n", block)); PDUMP(anchor); // Found an avds, so try the main sequence first, then // the reserve sequence if the main one fails. @@ -224,12 +225,14 @@ walk_anchor_volume_descriptor_sequences(int device, off_t offset, off_t length, partitionDescriptorCount); } if (!anchorErr) { - PRINT(("block %Ld: found valid vds\n", avds_locations[i])); + PRINT(("block %" B_PRIdOFF ": found valid vds\n", + avds_locations[i])); found_vds = true; break; } else { // Both failed, so loop around and try another avds - PRINT(("block %Ld: vds search failed\n", avds_locations[i])); + PRINT(("block %" B_PRIdOFF ": vds search failed\n", + avds_locations[i])); } } status_t error = found_vds ? B_OK : B_ERROR; @@ -245,8 +248,9 @@ walk_volume_descriptor_sequence(extent_address descriptorSequence, partition_descriptor partitionDescriptors[], uint8 &partitionDescriptorCount) { - DEBUG_INIT_ETC(NULL, ("descriptorSequence.loc:%ld, descriptorSequence.len:%ld", - descriptorSequence.location(), descriptorSequence.length())); + DEBUG_INIT_ETC(NULL, ("descriptorSequence.loc:%" PRIu32 ", " + "descriptorSequence.len:%" PRIu32, + descriptorSequence.location(), descriptorSequence.length())); uint32 count = descriptorSequence.length() >> blockShift; bool foundLogicalVolumeDescriptor = false; @@ -261,15 +265,16 @@ walk_volume_descriptor_sequence(extent_address descriptorSequence, MemoryChunk chunk(blockSize); descriptor_tag *tag = NULL; - PRINT(("descriptor #%ld (block %Ld):\n", i, block)); + PRINT(("descriptor #%" PRIu32 " (block %" B_PRIdOFF "):\n", i, block)); status_t loopError = chunk.InitCheck(); if (!loopError) { ssize_t bytesRead = read_pos(device, address, chunk.Data(), blockSize); loopError = bytesRead == (ssize_t)blockSize ? B_OK : B_IO_ERROR; if (loopError) { - PRINT(("block %Ld: read_pos(pos:%Ld, len:%ld) failed with error 0x%lx\n", - block, address, blockSize, bytesRead)); + PRINT(("block %" B_PRIdOFF ": read_pos(pos:%" B_PRIdOFF ", " + "len:%" B_PRIu32 ") failed with error 0x%lx\n", + block, address, blockSize, bytesRead)); } } if (!loopError) { @@ -326,8 +331,10 @@ walk_volume_descriptor_sequence(extent_address descriptorSequence, if (partitionDescriptors[num].vds_number() < partition->vds_number()) { partitionDescriptors[num] = *partition; - PRINT(("Replacing previous partition #%d (vds_number: %ld) with " - "new partition #%d (vds_number: %ld)\n", + PRINT(("Replacing previous partition #%d " + "(vds_number: %" B_PRIu32 ") " + "with new partition #%d " + "(vds_number: %" B_PRIu32 ")\n", partitionDescriptors[num].partition_number(), partitionDescriptors[num].vds_number(), partition->partition_number(), @@ -343,7 +350,8 @@ walk_volume_descriptor_sequence(extent_address descriptorSequence, // At least one more partition descriptor allowed partitionDescriptors[num] = *partition; uniquePartitions++; - PRINT(("Adding partition #%d (vds_number: %ld)\n", + PRINT(("Adding partition #%d (vds_number: %" B_PRIu32 + ")\n", partition->partition_number(), partition->vds_number())); } else { @@ -359,8 +367,10 @@ walk_volume_descriptor_sequence(extent_address descriptorSequence, < partition->vds_number()) { foundReplacement = true; partitionDescriptors[j] = *partition; - PRINT(("Replacing partition #%d (vds_number: %ld) " - "with partition #%d (vds_number: %ld)\n", + PRINT(("Replacing partition #%d " + "(vds_number: %" B_PRIu32 ") " + "with partition #%d " + "(vds_number: %" B_PRIu32 ")\n", partitionDescriptors[j].partition_number(), partitionDescriptors[j].vds_number(), partition->partition_number(), @@ -455,7 +465,9 @@ static status_t walk_integrity_sequence(int device, uint32 blockSize, uint32 blockShift, extent_address descriptorSequence, uint32 sequenceNumber) { - DEBUG_INIT_ETC(NULL, ("descriptorSequence.loc:%ld, descriptorSequence.len:%ld", + DEBUG_INIT_ETC(NULL, + ("descriptorSequence.loc:%" B_PRIu32 ", " + "descriptorSequence.len:%" B_PRIu32 , descriptorSequence.location(), descriptorSequence.length())); uint32 count = descriptorSequence.length() >> blockShift; @@ -468,14 +480,17 @@ walk_integrity_sequence(int device, uint32 blockSize, uint32 blockShift, MemoryChunk chunk(blockSize); descriptor_tag *tag = NULL; - PRINT(("integrity descriptor #%ld:%ld (block %Ld):\n", sequenceNumber, i, block)); + PRINT(("integrity descriptor #%" B_PRIu32 ":%" B_PRIu32 + " (block %" B_PRIdOFF "):\n", + sequenceNumber, i, block)); status_t loopError = chunk.InitCheck(); if (!loopError) { ssize_t bytesRead = read_pos(device, address, chunk.Data(), blockSize); loopError = check_size_error(bytesRead, blockSize); if (loopError) { - PRINT(("block %Ld: read_pos(pos:%Ld, len:%ld) failed with error 0x%lx\n", + PRINT(("block %" B_PRIdOFF": read_pos(pos:%" B_PRIdOFF + ", len:%" B_PRIu32 ") failed with error 0x%lx\n", block, address, blockSize, bytesRead)); } } diff --git a/src/add-ons/kernel/file_systems/udf/UdfDebug.h b/src/add-ons/kernel/file_systems/udf/UdfDebug.h index fa7360fc4a..5835e72e27 100644 --- a/src/add-ons/kernel/file_systems/udf/UdfDebug.h +++ b/src/add-ons/kernel/file_systems/udf/UdfDebug.h @@ -177,8 +177,9 @@ private: (objectPointer)->dump(); \ } - #define REPORT_ERROR(error) { \ - LPRINT(("returning error 0x%lx, `%s'\n", error, strerror(error))); \ + #define REPORT_ERROR(error) { \ + LPRINT(("returning error 0x%" B_PRIx32 ", `%s'\n", error, \ + strerror(error))); \ } #define RETURN_ERROR(error) { \ @@ -195,7 +196,8 @@ private: } else if (_status == (status_t)B_OK) { \ LPRINT(("returning B_OK\n")); \ } else { \ - LPRINT(("returning 0x%lx = %ld\n", _status, _status)); \ + LPRINT(("returning 0x%" B_PRIx32 " = %" PRId32 "\n", \ + _status, _status)); \ } \ return _status; \ } diff --git a/src/add-ons/kernel/file_systems/udf/UdfString.cpp b/src/add-ons/kernel/file_systems/udf/UdfString.cpp index b8fa5918fe..82f62e40d9 100644 --- a/src/add-ons/kernel/file_systems/udf/UdfString.cpp +++ b/src/add-ons/kernel/file_systems/udf/UdfString.cpp @@ -237,7 +237,7 @@ UdfString::SetTo(const char *utf8) void UdfString::SetTo(const char *cs0, uint32 length) { - DEBUG_INIT_ETC("UdfString", ("cs0: %p, length: %ld", cs0, length)); + DEBUG_INIT_ETC("UdfString", ("cs0: %p, length: %" B_PRIu32, cs0, length)); _Clear(); if (length == 0) @@ -253,7 +253,7 @@ UdfString::SetTo(const char *cs0, uint32 length) memcpy(fCs0String, cs0, length); fCs0Length = length; } else { - PRINT(("new fCs0String[%ld] allocation failed\n", length)); + PRINT(("new fCs0String[%" B_PRIu32 "] allocation failed\n", length)); return; } @@ -281,7 +281,8 @@ UdfString::SetTo(const char *cs0, uint32 length) } outputString[0] = 0; } else { - PRINT(("new fUtf8String[%ld] allocation failed\n", allocationLength)); + PRINT(("new fUtf8String[%" B_PRId32 "] allocation failed\n", + allocationLength)); } break; @@ -302,7 +303,8 @@ UdfString::SetTo(const char *cs0, uint32 length) } outputString[0] = 0; } else { - PRINT(("new fUtf8String[%ld] allocation failed\n", allocationLength)); + PRINT(("new fUtf8String[%" B_PRId32 "] allocation failed\n", + allocationLength)); } break; diff --git a/src/add-ons/kernel/file_systems/udf/UdfStructures.cpp b/src/add-ons/kernel/file_systems/udf/UdfStructures.cpp index 175204db8f..2bc749caa2 100644 --- a/src/add-ons/kernel/file_systems/udf/UdfStructures.cpp +++ b/src/add-ons/kernel/file_systems/udf/UdfStructures.cpp @@ -458,8 +458,8 @@ void extent_address::dump() const { DUMP_INIT("extent_address"); - PRINT(("length: %ld\n", length())); - PRINT(("location: %ld\n", location())); + PRINT(("length: %" B_PRIu32 "\n", length())); + PRINT(("location: %" B_PRIu32 "\n", location())); } //---------------------------------------------------------------------- @@ -470,7 +470,7 @@ void logical_block_address::dump() const { DUMP_INIT("logical_block_address"); - PRINT(("block: %ld\n", block())); + PRINT(("block: %" B_PRIu32 "\n", block())); PRINT(("partition: %d\n", partition())); } @@ -498,8 +498,8 @@ void long_address::dump() const { DUMP_INIT("long_address"); - PRINT(("length: %ld\n", length())); - PRINT(("block: %ld\n", block())); + PRINT(("length: %" B_PRIu32 "\n", length())); + PRINT(("block: %" B_PRIu32 "\n", block())); PRINT(("partition: %d\n", partition())); PRINT(("implementation_use:\n")); DUMP(implementation_use()); @@ -519,7 +519,7 @@ descriptor_tag::dump() const PRINT(("serial_number: %d\n", serial_number())); PRINT(("crc: %d\n", crc())); PRINT(("crc_length: %d\n", crc_length())); - PRINT(("location: %ld\n", location())); + PRINT(("location: %" B_PRIu32 "\n", location())); } @@ -545,10 +545,11 @@ descriptor_tag::dump() const status_t descriptor_tag::init_check(uint32 block, bool calculateCrc) { - DEBUG_INIT_ETC("descriptor_tag", ("location: %ld, calculateCrc: %s", - block, bool_to_string(calculateCrc))); - PRINT(("location (parameter) == %ld\n", block)); - PRINT(("location (in structure) == %ld\n", location())); + DEBUG_INIT_ETC("descriptor_tag", ("location: %" B_PRIu32 ", " + "calculateCrc: %s", + block, bool_to_string(calculateCrc))); + PRINT(("location (parameter) == %" B_PRIu32 "\n", block)); + PRINT(("location (in structure) == %" B_PRIu32 "\n", location())); if (calculateCrc) { PRINT(("crc (calculated) == %d\n", calculate_crc(reinterpret_cast(this)+sizeof(descriptor_tag), @@ -591,16 +592,19 @@ primary_volume_descriptor::dump() const PRINT(("tag:\n")); DUMP(tag()); - PRINT(("vds_number: %ld\n", vds_number())); - PRINT(("primary_volume_descriptor_number: %ld\n", primary_volume_descriptor_number())); + PRINT(("vds_number: %" B_PRIu32 "\n", vds_number())); + PRINT(("primary_volume_descriptor_number: %" B_PRIu32 "\n", + primary_volume_descriptor_number())); string = volume_identifier(); PRINT(("volume_identifier: `%s'\n", string.Utf8())); PRINT(("volume_sequence_number: %d\n", volume_sequence_number())); PRINT(("max_volume_sequence_number: %d\n", max_volume_sequence_number())); PRINT(("interchange_level: %d\n", interchange_level())); PRINT(("max_interchange_level: %d\n", max_interchange_level())); - PRINT(("character_set_list: %ld\n", character_set_list())); - PRINT(("max_character_set_list: %ld\n", max_character_set_list())); + PRINT(("character_set_list: %" B_PRIu32 "\n", + character_set_list())); + PRINT(("max_character_set_list: %" B_PRIu32 "\n", + max_character_set_list())); string = volume_set_identifier(); PRINT(("volume_set_identifier: `%s'\n", string.Utf8())); PRINT(("descriptor_character_set:\n")); @@ -619,8 +623,8 @@ primary_volume_descriptor::dump() const DUMP(implementation_id()); PRINT(("implementation_use:\n")); DUMP(implementation_use()); - PRINT(("predecessor_vds_location: %ld\n", - predecessor_volume_descriptor_sequence_location())); + PRINT(("predecessor_vds_location: %" B_PRIu32 "\n", + predecessor_volume_descriptor_sequence_location())); PRINT(("flags: %d\n", flags())); } @@ -656,7 +660,7 @@ logical_volume_info::dump() const PRINT(("logical_volume_id: `%s'\n", string.Utf8())); for (uint32 i = 0; i < _logical_volume_info.length(); i++) { string = _logical_volume_info[i]; - PRINT(("logical_volume_info #%ld: %s\n", i, string.Utf8())); + PRINT(("logical_volume_info #%" B_PRIu32 ": %s\n", i, string.Utf8())); } PRINT(("implementation_id:\n")); DUMP(implementation_id()); @@ -674,7 +678,7 @@ implementation_use_descriptor::dump() const DUMP_INIT("implementation_use_descriptor"); PRINT(("tag:\n")); DUMP(tag()); - PRINT(("vds_number: %ld\n", vds_number())); + PRINT(("vds_number: %" B_PRIu32 "\n", vds_number())); PRINT(("implementation_id:\n")); DUMP(implementation_id()); PRINT(("implementation_use: XXX\n")); @@ -691,7 +695,7 @@ partition_descriptor::dump() const DUMP_INIT("partition_descriptor"); PRINT(("tag:\n")); DUMP(tag()); - PRINT(("vds_number: %ld\n", vds_number())); + PRINT(("vds_number: %" B_PRIu32 "\n", vds_number())); PRINT(("partition_flags: %d\n", partition_flags())); PRINT(("partition_flags.allocated: %s\n", allocated() ? "true" : "false")); PRINT(("partition_number: %d\n", partition_number())); @@ -699,9 +703,9 @@ partition_descriptor::dump() const DUMP(partition_contents()); PRINT(("partition_contents_use: XXX\n")); DUMP(partition_contents_use()); - PRINT(("access_type: %ld\n", access_type())); - PRINT(("start: %ld\n", start())); - PRINT(("length: %ld\n", length())); + PRINT(("access_type: %" B_PRIu32 "\n", access_type())); + PRINT(("start: %" B_PRIu32 "\n", start())); + PRINT(("length: %" B_PRIu32 "\n", length())); PRINT(("implementation_id:\n")); DUMP(implementation_id()); PRINT(("implementation_use: XXX\n")); @@ -718,20 +722,22 @@ logical_volume_descriptor::dump() const DUMP_INIT("logical_volume_descriptor"); PRINT(("tag:\n")); DUMP(tag()); - PRINT(("vds_number: %ld\n", vds_number())); + PRINT(("vds_number: %" B_PRIu32 "\n", vds_number())); PRINT(("character_set:\n")); DUMP(character_set()); UdfString string(logical_volume_identifier()); PRINT(("logical_volume_identifier: `%s'\n", string.Utf8())); - PRINT(("logical_block_size: %ld\n", logical_block_size())); + PRINT(("logical_block_size: %" B_PRIu32 "\n", + logical_block_size())); PRINT(("domain_id:\n")); DUMP(domain_id()); PRINT(("logical_volume_contents_use:\n")); DUMP(logical_volume_contents_use()); PRINT(("file_set_address:\n")); DUMP(file_set_address()); - PRINT(("map_table_length: %ld\n", map_table_length())); - PRINT(("partition_map_count: %ld\n", partition_map_count())); + PRINT(("map_table_length: %" B_PRIu32 "\n", map_table_length())); + PRINT(("partition_map_count: %" B_PRIu32 "\n", + partition_map_count())); PRINT(("implementation_id:\n")); DUMP(implementation_id()); PRINT(("implementation_use:\n")); @@ -824,10 +830,10 @@ sparable_partition_map::dump() PRINT(("volume_sequence_number: %d\n", volume_sequence_number())); PRINT(("partition_number: %d\n", partition_number())); PRINT(("sparing_table_count: %d\n", sparing_table_count())); - PRINT(("sparing_table_size: %ld\n", sparing_table_size())); + PRINT(("sparing_table_size: %" B_PRIu32 "\n", sparing_table_size())); PRINT(("sparing_table_locations:")); for (uint8 i = 0; i < sparing_table_count(); i++) - PRINT((" %d: %ld\n", i, sparing_table_location(i))); + PRINT((" %d: %" B_PRIu32 "\n", i, sparing_table_location(i))); } //---------------------------------------------------------------------- @@ -840,8 +846,9 @@ unallocated_space_descriptor::dump() const DUMP_INIT("unallocated_space_descriptor"); PRINT(("tag:\n")); DUMP(tag()); - PRINT(("vds_number: %ld\n", vds_number())); - PRINT(("allocation_descriptor_count: %ld\n", allocation_descriptor_count())); + PRINT(("vds_number: %" B_PRIu32 "\n", vds_number())); + PRINT(("allocation_descriptor_count: %" B_PRIu32 "\n", + allocation_descriptor_count())); // \todo dump alloc_descriptors } @@ -872,10 +879,12 @@ file_set_descriptor::dump() const DUMP(recording_date_and_time()); PRINT(("interchange_level: %d\n", interchange_level())); PRINT(("max_interchange_level: %d\n", max_interchange_level())); - PRINT(("character_set_list: %ld\n", character_set_list())); - PRINT(("max_character_set_list: %ld\n", max_character_set_list())); - PRINT(("file_set_number: %ld\n", file_set_number())); - PRINT(("file_set_descriptor_number: %ld\n", file_set_descriptor_number())); + PRINT(("character_set_list: %" B_PRIu32 "\n", character_set_list())); + PRINT(("max_character_set_list: %" B_PRIu32 "\n", + max_character_set_list())); + PRINT(("file_set_number: %" B_PRIu32 "\n", file_set_number())); + PRINT(("file_set_descriptor_number: %" B_PRIu32 "\n", + file_set_descriptor_number())); PRINT(("logical_volume_id_character_set:\n")); DUMP(logical_volume_id_character_set()); PRINT(("logical_volume_id:\n")); @@ -919,32 +928,37 @@ logical_volume_integrity_descriptor::dump() const SIMPLE_PRINT(("closed\n")); break; default: - SIMPLE_PRINT(("invalid integrity type (%ld)", integrity_type())); + SIMPLE_PRINT(("invalid integrity type (%" B_PRIu32 ")", + integrity_type())); break; } PRINT(("next_integrity_extent:\n")); DUMP(next_integrity_extent()); PRINT(("logical_volume_contents_use:\n")); DUMP(logical_volume_contents_use()); - PRINT(("next_unique_id: %Ld\n", next_unique_id())); - PRINT(("partition_count: %ld\n", partition_count())); - PRINT(("implementation_use_length: %ld\n", implementation_use_length())); + PRINT(("next_unique_id: %" B_PRIu64 "\n", next_unique_id())); + PRINT(("partition_count: %" B_PRIu32 "\n", partition_count())); + PRINT(("implementation_use_length: %" B_PRIu32 "\n", + implementation_use_length())); if (partition_count() > 0) { PRINT(("free_space_table:\n")); for (uint32 i = 0; i < partition_count(); i++) { - PRINT(("partition %ld: %ld free blocks\n", i, free_space_table()[i])); + PRINT(("partition %" B_PRIu32 ": %" B_PRIu32 " free blocks\n", + i, free_space_table()[i])); } PRINT(("size_table:\n")); for (uint32 i = 0; i < partition_count(); i++) { - PRINT(("partition %ld: %ld blocks large\n", i, size_table()[i])); + PRINT(("partition %" B_PRIu32 ": %" B_PRIu32 " blocks large\n", + i, size_table()[i])); } } if (implementation_use_length() >= minimum_implementation_use_length) { PRINT(("implementation_id:\n")); DUMP(implementation_id()); - PRINT(("file_count: %ld\n", file_count())); - PRINT(("directory_count: %ld\n", directory_count())); + PRINT(("file_count: %" B_PRIu32 "\n", file_count())); + PRINT(("directory_count: %" B_PRIu32 "\n", + directory_count())); PRINT(("minimum_udf_read_revision: 0x%04x\n", minimum_udf_read_revision())); PRINT(("minimum_udf_write_revision: 0x%04x\n", minimum_udf_write_revision())); PRINT(("maximum_udf_write_revision: 0x%04x\n", maximum_udf_write_revision())); @@ -986,7 +1000,8 @@ void icb_entry_tag::dump() const { DUMP_INIT("icb_entry_tag"); - PRINT(("prior_entries: %ld\n", prior_recorded_number_of_direct_entries())); + PRINT(("prior_entries: %" B_PRIu32 "\n", + prior_recorded_number_of_direct_entries())); PRINT(("strategy_type: %d\n", strategy_type())); PRINT(("strategy_parameters:\n")); DUMP(strategy_parameters()); @@ -1059,31 +1074,38 @@ file_icb_entry::dump() const PRINT(("icb_tag:\n")); DUMP(icb_tag()); - PRINT(("uid: %lu, 0x%lx\n", uid(), uid())); - PRINT(("gid: %lu, 0x%lx\n", gid(), gid())); - PRINT(("permissions: %ld, 0x%lx\n", permissions(), permissions())); + PRINT(("uid: %" B_PRIu32 ", 0x%" B_PRIx32 "\n", + uid(), uid())); + PRINT(("gid: %" B_PRIu32 ", 0x%" B_PRIx32 "\n", + gid(), gid())); + PRINT(("permissions: %" B_PRIu32 ", 0x%" B_PRIx32 "\n", + permissions(), permissions())); PRINT(("file_link_count: %d\n", file_link_count())); PRINT(("record_format: %d\n", record_format())); PRINT(("record_display_attributes: %d\n", record_display_attributes())); PRINT(("record_length: %d\n", record_length())); - PRINT(("information_length: %Ld\n", information_length())); - PRINT(("logical_blocks_recorded: %Ld\n", logical_blocks_recorded())); + PRINT(("information_length: %" B_PRIu64 "\n", + information_length())); + PRINT(("logical_blocks_recorded: %" B_PRIu64 "\n", + logical_blocks_recorded())); PRINT(("access_date_and_time:\n")); DUMP(access_date_and_time()); PRINT(("modification_date_and_time:\n")); DUMP(modification_date_and_time()); PRINT(("attribute_date_and_time:\n")); DUMP(attribute_date_and_time()); - PRINT(("checkpoint: %ld\n", checkpoint())); + PRINT(("checkpoint: %" B_PRIu32 "\n", checkpoint())); PRINT(("extended_attribute_icb:\n")); DUMP(extended_attribute_icb()); PRINT(("implementation_id:\n")); DUMP(implementation_id()); - PRINT(("unique_id: %Ld\n", unique_id())); - PRINT(("extended_attributes_length: %ld\n", extended_attributes_length())); - PRINT(("allocation_descriptors_length: %ld\n", allocation_descriptors_length())); + PRINT(("unique_id: %" B_PRIu64 "\n", unique_id())); + PRINT(("extended_attributes_length: %" B_PRIu32 "\n", + extended_attributes_length())); + PRINT(("allocation_descriptors_length: %" B_PRIu32 "\n", + allocation_descriptors_length())); PRINT(("allocation_descriptors:\n")); switch (icb_tag().descriptor_flags()) { @@ -1127,15 +1149,20 @@ extended_file_icb_entry::dump() const PRINT(("icb_tag:\n")); DUMP(icb_tag()); - PRINT(("uid: %lu, 0x%lx\n", uid(), uid())); - PRINT(("gid: %lu, 0x%lx\n", gid(), gid())); - PRINT(("permissions: %ld, 0x%lx\n", permissions(), permissions())); + PRINT(("uid: %" B_PRIu32 ", 0x%" B_PRIx32 "\n", + uid(), uid())); + PRINT(("gid: %" B_PRIu32 ", 0x%" B_PRIx32 "\n", + gid(), gid())); + PRINT(("permissions: %" B_PRIu32 ", 0x%" B_PRIx32 "\n", + permissions(), permissions())); PRINT(("file_link_count: %d\n", file_link_count())); PRINT(("record_format: %d\n", record_format())); PRINT(("record_display_attributes: %d\n", record_display_attributes())); - PRINT(("record_length: %ld\n", record_length())); - PRINT(("information_length: %Ld\n", information_length())); - PRINT(("logical_blocks_recorded: %Ld\n", logical_blocks_recorded())); + PRINT(("record_length: %" B_PRIu32 "\n", record_length())); + PRINT(("information_length: %" B_PRIu64 "\n", + information_length())); + PRINT(("logical_blocks_recorded: %" B_PRIu64 "\n", + logical_blocks_recorded())); PRINT(("access_date_and_time:\n")); DUMP(access_date_and_time()); PRINT(("modification_date_and_time:\n")); @@ -1144,7 +1171,7 @@ extended_file_icb_entry::dump() const DUMP(creation_date_and_time()); PRINT(("attribute_date_and_time:\n")); DUMP(attribute_date_and_time()); - PRINT(("checkpoint: %ld\n", checkpoint())); + PRINT(("checkpoint: %" B_PRIu32 "\n", checkpoint())); PRINT(("extended_attribute_icb:\n")); DUMP(extended_attribute_icb()); @@ -1153,9 +1180,11 @@ extended_file_icb_entry::dump() const PRINT(("implementation_id:\n")); DUMP(implementation_id()); - PRINT(("unique_id: %Ld\n", unique_id())); - PRINT(("extended_attributes_length: %ld\n", extended_attributes_length())); - PRINT(("allocation_descriptors_length: %ld\n", allocation_descriptors_length())); + PRINT(("unique_id: %" B_PRIu64 "\n", unique_id())); + PRINT(("extended_attributes_length: %" B_PRIu32 "\n", + extended_attributes_length())); + PRINT(("allocation_descriptors_length: %" B_PRIu32 "\n", + allocation_descriptors_length())); PRINT(("allocation_descriptors:\n")); switch (icb_tag().descriptor_flags()) { diff --git a/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp b/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp index 2ec9852a94..c069b9cc00 100644 --- a/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp @@ -345,11 +345,13 @@ static status_t udf_read(fs_volume *volume, fs_vnode *vnode, void *cookie, off_t pos, void *buffer, size_t *length) { - TRACE(("udf_read: ID = %ld, pos = %lld, length = %lu\n", + TRACE(("udf_read: ID = %" B_PRIdDEV ", pos = %" B_PRIdOFF ", " + "length = %lu\n", ((Volume *)volume->private_volume)->ID(), pos, *length)); Icb *icb = (Icb *)vnode->private_node; - DEBUG_INIT_ETC("udf_read", ("ID = %ld, pos = %lld, length = %lu", + DEBUG_INIT_ETC("udf_read", ("ID = %" B_PRIdDEV ", pos = %" B_PRIdOFF ", " + "length = %lu", ((Volume *)volume->private_volume)->ID(), pos, *length)); // if (!inode->HasUserAccessableStream()) { @@ -393,7 +395,7 @@ static status_t udf_open_dir(fs_volume *volume, fs_vnode *vnode, void **cookie) { TRACE(("udf_open_dir: volume = %p, vnode = %p\n", volume, vnode)); - DEBUG_INIT_ETC("udf_open_dir", ("ID = %ld", + DEBUG_INIT_ETC("udf_open_dir", ("ID = %" B_PRIdDEV, ((Volume *)volume->private_volume)->ID())); if (!volume || !vnode || !cookie) @@ -453,7 +455,7 @@ udf_read_dir(fs_volume *_volume, fs_vnode *vnode, void *cookie, Icb *dir = (Icb *)vnode->private_node; DirectoryIterator *iterator = (DirectoryIterator *)cookie; - DEBUG_INIT_ETC("udf_read_dir", ("ID = %ld", volume->ID())); + DEBUG_INIT_ETC("udf_read_dir", ("ID = %" B_PRIdDEV , volume->ID())); if (dir != iterator->Parent()) { TRACE_ERROR(("udf_read_dir: Icb does not match parent Icb of given " @@ -486,7 +488,7 @@ udf_rewind_dir(fs_volume *volume, fs_vnode *vnode, void *cookie) { TRACE(("udf_rewind_dir: volume = %p, vnode = %p, cookie = %p\n", volume, vnode, cookie)); - DEBUG_INIT_ETC("udf_rewind_dir", ("ID = %ld", + DEBUG_INIT_ETC("udf_rewind_dir", ("ID = %" B_PRIdDEV, ((Volume *)volume->private_volume)->ID())); if (!volume || !vnode || !cookie)