summaryrefslogtreecommitdiffstats
path: root/src/win32.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-24 08:51:29 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-24 08:51:29 +0200
commiteb3b555b50e2c82f67559472bdf0a1d54325550f (patch)
treef3aaea1d3c9cd8e8423d69eeda0fba794bed7eb0 /src/win32.c
parent91c44757340fd6f598e2708f8e20038158766c8e (diff)
Get rid of pread_fast(), it's too error prone
Diffstat (limited to 'src/win32.c')
-rw-r--r--src/win32.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/win32.c b/src/win32.c
index fa93b6f..a6a5165 100644
--- a/src/win32.c
+++ b/src/win32.c
@@ -60,7 +60,6 @@ static uint64_t filewin32_getfilesize(HANDLE handle, const char *device);
static const char *file_win32_description(disk_t *disk_car);
static const char *file_win32_description_short(disk_t *disk_car);
static void file_win32_clean(disk_t *disk_car);
-static void *file_win32_pread_fast(disk_t *disk, void *buf, const unsigned int count, const uint64_t offset);
static int file_win32_pread(disk_t *disk_car, void *buf, const unsigned int count, const uint64_t offset);
static int file_win32_pwrite(disk_t *disk_car, const void *buf, const unsigned int count, const uint64_t offset);
static int file_win32_nopwrite(disk_t *disk_car, const void *buf, const unsigned int count, const uint64_t offset);
@@ -324,7 +323,6 @@ disk_t *file_test_availability_win32(const char *device, const int verbose, int
disk_car->data=data;
disk_car->description=file_win32_description;
disk_car->description_short=file_win32_description_short;
- disk_car->pread_fast=file_win32_pread_fast;
disk_car->pread=file_win32_pread;
disk_car->pwrite=((data->mode&FILE_WRITE_DATA)==FILE_WRITE_DATA?file_win32_pwrite:file_win32_nopwrite);
disk_car->sync=file_win32_sync;
@@ -496,13 +494,6 @@ static int file_win32_pread(disk_t *disk_car, void *buf, const unsigned int coun
return align_pread(&file_win32_pread_aux, disk_car, buf, count, offset);
}
-static void *file_win32_pread_fast(disk_t *disk, void *buf, const unsigned int count, const uint64_t offset)
-{
- if(file_win32_pread(disk, buf, count, offset)==offset)
- return buf;
- return NULL;
-}
-
static int file_win32_pwrite_aux(disk_t *disk_car, const void *buf, const unsigned int count, const uint64_t offset)
{
long int ret;