From 7fb2b53807abf9c97305a2f5fe4c35d018b8c7c0 Mon Sep 17 00:00:00 2001 From: Kouame Behouba Manasse Date: Tue, 1 Aug 2023 15:30:28 +0300 Subject: [PATCH] crit: add getter for `pagesID` field in `MemoryReader` struct This commit introduces a new getter function that allows accessing the value of the pagesID field within the MemoryReader struct. This getter function will be beneficial for enabling checkpointctl to extract only the required page image files efficiently. Signed-off-by: Kouame Behouba Manasse --- crit/mempages.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crit/mempages.go b/crit/mempages.go index e6be7ad51..06f2d7275 100644 --- a/crit/mempages.go +++ b/crit/mempages.go @@ -24,6 +24,10 @@ type MemoryReader struct { pagemapEntries []*pagemap.PagemapEntry } +func (mr *MemoryReader) GetPagesID() uint32 { + return mr.pagesID +} + // NewMemoryReader creates a new instance of MemoryReader with all the fields populated func NewMemoryReader(checkpointDir string, pid uint32, pageSize int) (*MemoryReader, error) { if pageSize == 0 {