mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 19:37:39 +00:00
Cleanup unused functions
This commit is contained in:
parent
2839978cc1
commit
8f7d6dfb77
@ -17,24 +17,6 @@ static vector<lsplt::MapInfo> find_maps(const char *name) {
|
|||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<void *, size_t> find_map_range(const char *name, unsigned long inode) {
|
|
||||||
auto maps = find_maps(name);
|
|
||||||
uintptr_t start = 0u;
|
|
||||||
uintptr_t end = 0u;
|
|
||||||
for (const auto &map : maps) {
|
|
||||||
if (map.inode == inode) {
|
|
||||||
if (start == 0) {
|
|
||||||
start = map.start;
|
|
||||||
end = map.end;
|
|
||||||
} else if (map.start == end) {
|
|
||||||
end = map.end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LOGD("found map %s with start = %zx, end = %zx\n", name, start, end);
|
|
||||||
return make_pair(reinterpret_cast<void *>(start), end - start);
|
|
||||||
}
|
|
||||||
|
|
||||||
void unmap_all(const char *name) {
|
void unmap_all(const char *name) {
|
||||||
auto maps = find_maps(name);
|
auto maps = find_maps(name);
|
||||||
for (auto &info : maps) {
|
for (auto &info : maps) {
|
||||||
|
@ -34,9 +34,6 @@ enum : int {
|
|||||||
#define HIJACK_BIN HIJACK_BIN32
|
#define HIJACK_BIN HIJACK_BIN32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Find the memory address + size of the pages matching name + inode
|
|
||||||
std::pair<void*, size_t> find_map_range(const char *name, unsigned long inode);
|
|
||||||
|
|
||||||
// Unmap all pages matching the name
|
// Unmap all pages matching the name
|
||||||
void unmap_all(const char *name);
|
void unmap_all(const char *name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user