From: Seok Hong Date: Wed, 18 Jan 2017 01:22:17 +0000 (+0900) Subject: Add BlockSize Getter in Ext4Tool X-Git-Tag: submit/tizen/20170213.020148~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3040810a33038eed336d19b8e570164dfcf1a1b;p=platform%2Fcore%2Fsecurity%2Fode.git Add BlockSize Getter in Ext4Tool Change-Id: I68ac44023326cde8aaf0e4926aa2abc64a90ad74 Signed-off-by: Seok Hong --- diff --git a/server/ext4-tool.cpp b/server/ext4-tool.cpp index d319483..b194c04 100644 --- a/server/ext4-tool.cpp +++ b/server/ext4-tool.cpp @@ -42,10 +42,9 @@ static unsigned int divCeilSafely(unsigned int a, unsigned int b) } Ext4Tool::Ext4Tool(const std::string &src) : - source(src), totalBlockCount(0) + source(src), blockSize(0), totalBlockCount(0) { unsigned int firstDataBlock = 0; - unsigned int blockSize = 0; unsigned int blocksPerGroup = 0; unsigned int clustersPerGroup = 0; runtime::File device(source); @@ -125,6 +124,11 @@ Ext4Tool::~Ext4Tool() { } +unsigned int Ext4Tool::getBlockSize() +{ + return blockSize; +} + unsigned int Ext4Tool::getTotalBlockCount() { return totalBlockCount; diff --git a/server/ext4-tool.h b/server/ext4-tool.h index fb10912..efad0fa 100644 --- a/server/ext4-tool.h +++ b/server/ext4-tool.h @@ -34,6 +34,7 @@ public: typedef std::vector data; + unsigned int getBlockSize(); unsigned int getTotalBlockCount(); bool isUsedBlock(unsigned int blockIndex); @@ -41,7 +42,7 @@ public: private: std::string source; - unsigned int totalBlockCount; + unsigned int blockSize, totalBlockCount; data bitmap; };