Add Floppy Write-Protect status to media tag and data type enums

This commit is contained in:
2026-01-06 14:00:55 +00:00
parent 231287db53
commit 4df22c47ef
5 changed files with 39 additions and 25 deletions

View File

@@ -398,27 +398,27 @@ typedef enum
// Advanced Intelligent Tape, types 320 to 339 // Advanced Intelligent Tape, types 320 to 339
// Iomega, types 340 to 359 // Iomega, types 340 to 359
Bernoulli = 340, Bernoulli = 340,
Bernoulli2 = 341, Bernoulli2 = 341,
Ditto = 342, Ditto = 342,
DittoMax = 343, DittoMax = 343,
Jaz = 344, Jaz = 344,
Jaz2 = 345, Jaz2 = 345,
PocketZip = 346, PocketZip = 346,
REV120 = 347, REV120 = 347,
REV35 = 348, REV35 = 348,
REV70 = 349, REV70 = 349,
ZIP100 = 350, ZIP100 = 350,
ZIP250 = 351, ZIP250 = 351,
ZIP750 = 352, ZIP750 = 352,
Bernoulli35 = 353,///< 5⅓" Bernoulli Box II disk with 35Mb capacity Bernoulli35 = 353, ///< 5⅓" Bernoulli Box II disk with 35Mb capacity
Bernoulli44 = 354,///< 5⅓" Bernoulli Box II disk with 44Mb capacity Bernoulli44 = 354, ///< 5⅓" Bernoulli Box II disk with 44Mb capacity
Bernoulli65 = 355,///< 5⅓" Bernoulli Box II disk with 65Mb capacity Bernoulli65 = 355, ///< 5⅓" Bernoulli Box II disk with 65Mb capacity
Bernoulli90 = 356,///< 5⅓" Bernoulli Box II disk with 90Mb capacity Bernoulli90 = 356, ///< 5⅓" Bernoulli Box II disk with 90Mb capacity
Bernoulli105 = 357,///< 5⅓" Bernoulli Box II disk with 105Mb capacity Bernoulli105 = 357, ///< 5⅓" Bernoulli Box II disk with 105Mb capacity
Bernoulli150 = 358,///< 5⅓" Bernoulli Box II disk with 150Mb capacity Bernoulli150 = 358, ///< 5⅓" Bernoulli Box II disk with 150Mb capacity
Bernoulli230 = 359,///< 5⅓" Bernoulli Box II disk with 230Mb capacity Bernoulli230 = 359, ///< 5⅓" Bernoulli Box II disk with 230Mb capacity
// Iomega, types 340 to 359 // Iomega, types 340 to 359
// Audio or video media, types 360 to 369 // Audio or video media, types 360 to 369
CompactCassette = 360, CompactCassette = 360,
@@ -1071,7 +1071,8 @@ typedef enum
MiniDiscDTOC = 72, ///< Not entirely clear kind of TOC that only appears on MD-DATA discs MiniDiscDTOC = 72, ///< Not entirely clear kind of TOC that only appears on MD-DATA discs
DVD_DiscKey_Decrypted = 73, ///< Decrypted DVD disc key, DVD_DiscKey_Decrypted = 73, ///< Decrypted DVD disc key,
DVD_PFI_2ndLayer = 74, ///< DVD Physical Format Information for the second layer DVD_PFI_2ndLayer = 74, ///< DVD Physical Format Information for the second layer
MaxMediaTag = DVD_PFI_2ndLayer Floppy_WriteProtect = 75, ///< Write protection status of the floppy disk
MaxMediaTag = Floppy_WriteProtect
} MediaTagType; } MediaTagType;
/** @} */ /* end of MediaTags group */ /** @} */ /* end of MediaTags group */

View File

@@ -132,7 +132,8 @@ typedef enum
DvdEccBlockPo = 87, ///< DVD Error Correction Code (ECC) Parity of Outer Code (PO) DvdEccBlockPo = 87, ///< DVD Error Correction Code (ECC) Parity of Outer Code (PO)
DvdPfi2ndLayer = 88, ///< DVD Physical Format Information for the second layer DvdPfi2ndLayer = 88, ///< DVD Physical Format Information for the second layer
FluxData = 89, ///< Flux data. FluxData = 89, ///< Flux data.
BitstreamData = 90 ///< Bitstream data. BitstreamData = 90, ///< Bitstream data.
FloppyWriteProtectStatus = 91 ///< Floppy write-protect status.
} DataType; } DataType;
/** /**
@@ -162,7 +163,8 @@ typedef enum
TapePartitionBlock = 0x54425054, ///< Block containing list of partitions for a tape image. TapePartitionBlock = 0x54425054, ///< Block containing list of partitions for a tape image.
AaruMetadataJsonBlock = 0x444D534A, ///< Block containing JSON version of Aaru Metadata AaruMetadataJsonBlock = 0x444D534A, ///< Block containing JSON version of Aaru Metadata
FluxDataBlock = 0x58554C46, ///< Block containing flux data metadata. FluxDataBlock = 0x58554C46, ///< Block containing flux data metadata.
DataStreamPayloadBlock = 0x4C505344 ///< Block containing compressed data stream payload (e.g., flux data, bitstreams). DataStreamPayloadBlock =
0x4C505344 ///< Block containing compressed data stream payload (e.g., flux data, bitstreams).
} BlockType; } BlockType;
/** /**

View File

@@ -17,8 +17,8 @@
*/ */
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#include <wincrypt.h> #include <wincrypt.h>
#include <windows.h>
#endif #endif
#include <aaru.h> #include <aaru.h>
@@ -182,6 +182,8 @@ AARU_LOCAL int32_t AARU_CALL aaruf_get_media_tag_type_for_datatype(const int32_t
return CD_LeadIn; return CD_LeadIn;
case DvdDiscKeyDecrypted: case DvdDiscKeyDecrypted:
return DVD_DiscKey_Decrypted; return DVD_DiscKey_Decrypted;
case FloppyWriteProtectStatus:
return Floppy_WriteProtect;
default: default:
return -1; return -1;
} }
@@ -342,6 +344,8 @@ AARU_LOCAL int32_t AARU_CALL aaruf_get_datatype_for_media_tag_type(const int32_t
return CompactDiscLeadIn; return CompactDiscLeadIn;
case DVD_DiscKey_Decrypted: case DVD_DiscKey_Decrypted:
return DvdDiscKeyDecrypted; return DvdDiscKeyDecrypted;
case Floppy_WriteProtect:
return FloppyWriteProtectStatus;
default: default:
return -1; return -1;
} }

View File

@@ -204,6 +204,8 @@ const char *media_tag_type_to_string(int32_t type)
return "DVD Disc Key (decrypted)"; return "DVD Disc Key (decrypted)";
case DVD_PFI_2ndLayer: case DVD_PFI_2ndLayer:
return "DVD Physical Format Information (2nd layer)"; return "DVD Physical Format Information (2nd layer)";
case Floppy_WriteProtect:
return "Floppy Write-Protect Status";
default: default:
return "Unknown Media Tag"; return "Unknown Media Tag";
} }
@@ -387,6 +389,8 @@ const char *data_type_to_string(uint16_t type)
return "DVD ECC Block Parity Outer"; return "DVD ECC Block Parity Outer";
case DvdPfi2ndLayer: case DvdPfi2ndLayer:
return "DVD Physical Format Info (2nd layer)"; return "DVD Physical Format Info (2nd layer)";
case FloppyWriteProtectStatus:
return "Floppy Write-Protect Status";
default: default:
return "Unknown Data Type"; return "Unknown Data Type";
} }

View File

@@ -124,6 +124,7 @@ static const MediaTagTypeMapping media_tag_mappings[] = {
{"MiniDiscDTOC", MiniDiscDTOC}, {"MiniDiscDTOC", MiniDiscDTOC},
{"DVD_DiscKey_Decrypted", DVD_DiscKey_Decrypted}, {"DVD_DiscKey_Decrypted", DVD_DiscKey_Decrypted},
{"DVD_PFI_2ndLayer", DVD_PFI_2ndLayer}, {"DVD_PFI_2ndLayer", DVD_PFI_2ndLayer},
{"Floppy_WriteProtect", Floppy_WriteProtect},
}; };
// clang-format on // clang-format on
@@ -278,6 +279,8 @@ static int32_t get_datatype_for_media_tag_type(MediaTagType tag_type)
return CompactDiscLeadIn; return CompactDiscLeadIn;
case DVD_DiscKey_Decrypted: case DVD_DiscKey_Decrypted:
return DvdDiscKeyDecrypted; return DvdDiscKeyDecrypted;
case Floppy_WriteProtect:
return FloppyWriteProtectStatus;
default: default:
return -1; return -1;
} }