From 13a8f625821446fb2cff00c8b47f7647962addcf Mon Sep 17 00:00:00 2001 From: Nils Date: Sun, 23 Jan 2022 14:28:15 +0100 Subject: [PATCH] move constants to own file --- mbr/consts.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 mbr/consts.go diff --git a/mbr/consts.go b/mbr/consts.go new file mode 100644 index 0000000..93d0efa --- /dev/null +++ b/mbr/consts.go @@ -0,0 +1,30 @@ +package mbr + +const ( + MBRsize = 512 + + BootstrapCodeArea1Size = 218 + BootstrapCodeArea1Offset = 0 + BootstrapCodeArea2Size = 216 + BootstrapCodeArea2Offset = 224 + LegacyBootstrapCodeAreaOffset = 0 + LegacyBootstrapCodeAreaSize = 446 + + DiskTimestampOffset = 218 + DiskTimestampSize = 6 + DiskTimeStampSecondsOffset = 221 + DiskTimeStampSecondsSize = 1 + DiskTimeStampMinutesOffset = 222 + DiskTimeStampMinutesSize = 1 + DiskTimeStampHoursOffset = 223 + DiskTimeStampHoursSize = 1 + + PartitionEntrySize = 16 + PartitionEntry1Offset = 446 + PartitionEntry2Offset = 462 + PartitionEntry3Offset = 478 + PartitionEntry4Offset = 494 + + BootSignatureSize = 2 + BootSignatureOffset = 510 +) \ No newline at end of file