diff options
author | Tianjie Xu <xunchang@google.com> | 2019-03-20 19:10:04 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-20 19:10:04 +0100 |
commit | 9b177eb32d5156df43565831d8e80d958db36af5 (patch) | |
tree | 7d534e4a3f47b18eb13b11f4a386f98ae1cd289e /minadbd/fuse_adb_provider.cpp | |
parent | Merge "Create a FuseDataProvider base class" am: eeea86f5fd am: 4aa4bf5e19 (diff) | |
parent | Merge "Remove the provider_vtab" am: 2037c60de4 (diff) | |
download | android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.tar android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.tar.gz android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.tar.bz2 android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.tar.lz android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.tar.xz android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.tar.zst android_bootable_recovery-9b177eb32d5156df43565831d8e80d958db36af5.zip |
Diffstat (limited to 'minadbd/fuse_adb_provider.cpp')
-rw-r--r-- | minadbd/fuse_adb_provider.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/minadbd/fuse_adb_provider.cpp b/minadbd/fuse_adb_provider.cpp index cada4bd2a..9d19a1ec3 100644 --- a/minadbd/fuse_adb_provider.cpp +++ b/minadbd/fuse_adb_provider.cpp @@ -18,14 +18,10 @@ #include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> -#include <functional> - #include "adb.h" #include "adb_io.h" -#include "fuse_sideload.h" bool FuseAdbDataProvider::ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_size, uint32_t start_block) const { @@ -45,14 +41,3 @@ bool FuseAdbDataProvider::ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_s void FuseAdbDataProvider::Close() { WriteFdExactly(fd_, "DONEDONE"); } - -int run_adb_fuse(android::base::unique_fd&& sfd, uint64_t file_size, uint32_t block_size) { - FuseAdbDataProvider adb_data_reader(std::move(sfd), file_size, block_size); - - provider_vtab vtab; - vtab.read_block = std::bind(&FuseAdbDataProvider::ReadBlockAlignedData, &adb_data_reader, - std::placeholders::_2, std::placeholders::_3, std::placeholders::_1); - vtab.close = [&adb_data_reader]() { adb_data_reader.Close(); }; - - return run_fuse_sideload(vtab, file_size, block_size); -} |