1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
/* Partition Management classes for TWRP
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* The code was written from scratch by Dees_Troy dees_troy at
* yahoo
*
* Copyright (c) 2012
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/vfs.h>
#include <unistd.h>
#include "variables.h"
#include "common.h"
#include "partitions.hpp"
int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error) {
LOGI("STUB TWPartitionManager::Process_Fstab, Fstab_Filename: '%s', Display_Error: %i\n", Fstab_Filename.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::Mount_By_Path(string Path, bool Display_Error) {
LOGI("STUB TWPartitionManager::Mount_By_Path, Path: '%s', Display_Error: %i\n", Path.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::Mount_By_Block(string Block, bool Display_Error) {
LOGI("STUB TWPartitionManager::Mount_By_Block, Block: '%s', Display_Error: %i\n", Block.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::Mount_By_Name(string Name, bool Display_Error) {
LOGI("STUB TWPartitionManager::Mount_By_Path, Name: '%s', Display_Error: %i\n", Name.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::UnMount_By_Path(string Path, bool Display_Error) {
LOGI("STUB TWPartitionManager::UnMount_By_Path, Path: '%s', Display_Error: %i\n", Path.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::UnMount_By_Block(string Block, bool Display_Error) {
LOGI("STUB TWPartitionManager::UnMount_By_Block, Block: '%s', Display_Error: %i\n", Block.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::UnMount_By_Name(string Name, bool Display_Error) {
LOGI("STUB TWPartitionManager::UnMount_By_Name, Name: '%s', Display_Error: %i\n", Name.c_str(), Display_Error);
return 1;
}
int TWPartitionManager::Is_Mounted_By_Path(string Path) {
LOGI("STUB TWPartitionManager::Is_Mounted_By_Path, Path: '%s'\n", Path.c_str());
return 1;
}
int TWPartitionManager::Is_Mounted_By_Block(string Block) {
LOGI("STUB TWPartitionManager::Is_Mounted_By_Block, Block: '%s'\n", Block.c_str());
return 1;
}
int TWPartitionManager::Is_Mounted_By_Name(string Name) {
LOGI("STUB TWPartitionManager::Is_Mounted_By_Name, Name: '%s'\n", Name.c_str());
return 1;
}
int TWPartitionManager::Mount_Current_Storage(void) {
LOGI("STUB TWPartitionManager::Mount_Current_Storage\n");
return 1;
}
/**TWPartition TWPartitionManager::Find_Partition_By_Path(string Path) {
LOGI("STUB TWPartitionManager::Find_Partition_By_Path, Path: '%s'\n", Path.c_str());
return NULL;
}
*TWPartition TWPartitionManager::Find_Partition_By_Block(string Block) {
LOGI("STUB TWPartitionManager::Find_Partition_By_Block, Block: '%s'\n", Block.c_str());
return NULL;
}*/
int TWPartitionManager::Run_Backup(string Backup_Name) {
LOGI("STUB TWPartitionManager::Run_Backup, Backup_Name: '%s'\n", Backup_Name.c_str());
return 1;
}
int TWPartitionManager::Run_Restore(string Restore_Name) {
LOGI("STUB TWPartitionManager::Run_Restore, Restore_Name: '%s'\n", Restore_Name.c_str());
return 1;
}
void TWPartitionManager::Set_Restore_Files(string Restore_Name) {
LOGI("STUB TWPartitionManager::Set_Restore_Files\n");
return;
}
int TWPartitionManager::Wipe_By_Path(string Path) {
LOGI("STUB TWPartitionManager::Wipe_By_Path, Path: '%s'\n", Path.c_str());
return 1;
}
int TWPartitionManager::Wipe_By_Block(string Block) {
LOGI("STUB TWPartitionManager::Wipe_By_Block, Block: '%s'\n", Block.c_str());
return 1;
}
int TWPartitionManager::Wipe_By_Name(string Name) {
LOGI("STUB TWPartitionManager::Wipe_By_Name, Name: '%s'\n", Name.c_str());
return 1;
}
int TWPartitionManager::Factory_Reset(void) {
LOGI("STUB TWPartitionManager::Factory_Reset\n");
return 1;
}
void TWPartitionManager::Refresh_Sizes(void) {
LOGI("STUB TWPartitionManager::Refresh_Sizes\n");
return;
}
void TWPartitionManager::Update_System_Details(void) {
LOGI("STUB TWPartitionManager::Update_System_Details\n");
return;
}
int TWPartitionManager::Decrypt_Device(string Password) {
LOGI("STUB TWPartitionManager::Decrypt_Device, Password: '%s'\n", Password.c_str());
return 1;
}
|