From 2416a50b5a329a5f2d28b4caa45a965b8d601e96 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Tue, 12 Apr 2016 19:54:46 -0500 Subject: Rewrite TWRP fstab flag processing * Do not flip/flop between std::string and char* when no std::string specific functions are applied. * Remove the need to manually count flag string lengths * Move checks for Display_Name, Storage_Name, and Backup_Display_Name out of flag processing Change-Id: I24d432c222124012b2a98d27598e42d0944f7da2 --- twrp-functions.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'twrp-functions.hpp') diff --git a/twrp-functions.hpp b/twrp-functions.hpp index 6c33c5eaf..3f9b2ff5a 100644 --- a/twrp-functions.hpp +++ b/twrp-functions.hpp @@ -50,6 +50,7 @@ public: static int Try_Decrypting_File(string fn, string password); // -1 for some error, 0 for failed to decrypt, 1 for decrypted, 3 for decrypted and found gzip format static unsigned long Get_File_Size(const string& Path); // Returns the size of a file static std::string Remove_Trailing_Slashes(const std::string& path, bool leaveLast = false); // Normalizes the path, e.g /data//media/ -> /data/media + static void Strip_Quotes(char* &str); // Remove leading & trailing double-quotes from a string static vector split_string(const string &in, char del, bool skip_empty); static timespec timespec_diff(timespec& start, timespec& end); // Return a diff for 2 times static int32_t timespec_diff_ms(timespec& start, timespec& end); // Returns diff in ms -- cgit v1.2.3