From ffd6c31a770618eff6354b65ba7352f4da116055 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 26 Feb 2015 15:33:00 -0800 Subject: Add tests for read_block_adb. These tests aren't completely representative in that they don't run in the recovery image. We might want to look in to adding a self-test option to the recovery UI. Until then, these can be run on a normal device (which is easier to do anyway). Bug: 19522788 Change-Id: Idb20feb55d10c62905c2480ab1b61a2e4b5f60d8 --- minadbd/fuse_adb_provider.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'minadbd/fuse_adb_provider.c') diff --git a/minadbd/fuse_adb_provider.c b/minadbd/fuse_adb_provider.c index 0d710727d..5da7fd76c 100644 --- a/minadbd/fuse_adb_provider.c +++ b/minadbd/fuse_adb_provider.c @@ -23,16 +23,11 @@ #include "adb.h" #include "adb_io.h" +#include "fuse_adb_provider.h" #include "fuse_sideload.h" -struct adb_data { - int sfd; // file descriptor for the adb channel - - uint64_t file_size; - uint32_t block_size; -}; - -static int read_block_adb(void* cookie, uint32_t block, uint8_t* buffer, uint32_t fetch_size) { +int read_block_adb(void* cookie, uint32_t block, uint8_t* buffer, + uint32_t fetch_size) { struct adb_data* ad = (struct adb_data*)cookie; char buf[10]; -- cgit v1.2.3