From 9e0593eaf6defb15761f41246093c0d3661b140d Mon Sep 17 00:00:00 2001 From: that Date: Wed, 8 Oct 2014 00:01:24 +0200 Subject: mtp: cleanup, fixes and performance improvements - use std::map instead of linked list - read directories on demand - fix writing zip files to storage root - fix creating directories - lots of minor fixes - simplify generation of storage IDs and make them spec compliant Change-Id: I2137c27549ddbdc58466f2e3aeda464fac70a3c5 --- partitions.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'partitions.hpp') diff --git a/partitions.hpp b/partitions.hpp index 652d73357..0a57f6506 100644 --- a/partitions.hpp +++ b/partitions.hpp @@ -45,7 +45,7 @@ public: }; public: - TWPartition(int *id); + TWPartition(); virtual ~TWPartition(); public: @@ -76,7 +76,7 @@ public: protected: bool Has_Data_Media; // Indicates presence of /data/media, may affect wiping and backup methods - void Setup_Data_Media(int mtp); // Sets up a partition as a /data/media emulated storage partition + void Setup_Data_Media(); // Sets up a partition as a /data/media emulated storage partition private: bool Process_Fstab_Line(string Line, bool Display_Error); // Processes a fstab line @@ -133,8 +133,6 @@ private: string Decrypted_Block_Device; // Decrypted block device available after decryption bool Removable; // Indicates if this partition is removable -- affects how often we check overall size, if present, etc. int Length; // Used by make_ext4fs to leave free space at the end of the partition block for things like a crypto footer - int *initmtpid; // Initial MTP ID - int mtpid; // Store MTP ID unsigned long long Size; // Overall size of the partition unsigned long long Used; // Overall used space unsigned long long Free; // Overall free space @@ -241,7 +239,6 @@ private: void Output_Partition(TWPartition* Part); TWPartition* Find_Next_Storage(string Path, string Exclude); int Open_Lun_File(string Partition_Path, string Lun_File); - int mtpid; pid_t mtppid; bool mtp_was_enabled; -- cgit v1.2.3