From 899d78277ab728f116583c69f7c3ac78a6efb683 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 24 Sep 2024 12:04:55 -0700 Subject: [PATCH] Clarify GPT structure offset Change-Id: I378194e2ae35b61a15bc1bb2f2e1edc0e3016a4c Related-Bug: #2081872 --- oslo_utils/imageutils/format_inspector.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oslo_utils/imageutils/format_inspector.py b/oslo_utils/imageutils/format_inspector.py index 49d426d5..ac1aea96 100644 --- a/oslo_utils/imageutils/format_inspector.py +++ b/oslo_utils/imageutils/format_inspector.py @@ -1218,7 +1218,10 @@ class GPTInspector(FileInspector): def _initialize(self): self.new_region('mbr', CaptureRegion(0, 512)) - self.new_region('gpt', CaptureRegion(512, 512)) + # TODO(danms): If we start inspecting the contents of the GPT + # structures themselves, we need to realize that they are block-aligned + # and not necessarily right after the PMBR at 512 bytes. + # self.new_region('gpt', CaptureRegion(512, 512)) # If we detect that this is a GPT, we may want to capture the backup # and assert that it is equivalent. # TODO(danms): Maybe add this region and associated checks: