From 91a7aa4577feb5f80038a30d15765e8b79845cf1 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 1 May 2017 15:57:38 -0700 Subject: Clean up fuse_sideload and add a testcase. This CL mainly changes: a) moving the interface in struct provider_vtab to std::function; b) code cleanup, such as moving the declaration closer to the uses, using explicit type conversion. Test: recovery_component_test Test: minadbd_test Test: Sideload a package on marlin. Change-Id: Id0e3c70f1ada54a4cd985b54c84438c23ed4687e --- minadbd/fuse_adb_provider.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'minadbd/fuse_adb_provider.h') diff --git a/minadbd/fuse_adb_provider.h b/minadbd/fuse_adb_provider.h index 9941709b9..36d86d539 100644 --- a/minadbd/fuse_adb_provider.h +++ b/minadbd/fuse_adb_provider.h @@ -20,13 +20,13 @@ #include struct adb_data { - int sfd; // file descriptor for the adb channel + int sfd; // file descriptor for the adb channel - uint64_t file_size; - uint32_t block_size; + uint64_t file_size; + uint32_t block_size; }; -int read_block_adb(void* cookie, uint32_t block, uint8_t* buffer, uint32_t fetch_size); +int read_block_adb(const adb_data& ad, uint32_t block, uint8_t* buffer, uint32_t fetch_size); int run_adb_fuse(int sfd, uint64_t file_size, uint32_t block_size); #endif -- cgit v1.2.3