MD5 verification sanity
We can use switches and enums to make things more understandable
and work with results in a more sensible manner.
PS2: Move file MD5 verification and error handling into
a separate function to reduce code.
PS3: Default to false in Check_Restore_File_MD5 function
Change-Id: Id3ee0bb444cf13be67bb5dec2c43f7c26a86b954
(cherry picked from commit 5c3950716e5c7c6279efd5f3f338d6d22e5215e2)
diff --git a/partitions.hpp b/partitions.hpp
index e301d9c..4b9354f 100644
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -156,6 +156,7 @@
string Get_Restore_File_System(PartitionSettings *part_settings); // Returns the file system that was in place at the time of the backup
bool Restore_Tar(PartitionSettings *part_settings); // Restore using tar for file systems
bool Restore_Image(PartitionSettings *part_settings); // Restore using dd for images
+ bool Check_Restore_File_MD5(const string& Filename); // Verifies MD5 matches for a file before restoration
bool Get_Size_Via_statfs(bool Display_Error); // Get Partition size, used, and free space using statfs
bool Get_Size_Via_df(bool Display_Error); // Get Partition size, used, and free space using df command
bool Make_Dir(string Path, bool Display_Error); // Creates a directory if it doesn't already exist