summaryrefslogtreecommitdiffstats
path: root/src/hdcache.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2007-12-06 00:29:52 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2007-12-06 00:29:52 +0100
commitf51aa191c2be32b989b4ddb5fee31b8bfd75edf5 (patch)
treebfaf4e746da8d6bd071af09d4d0e5a0ad6a56884 /src/hdcache.c
parent980ff85c3050ff15bf8e473ead40c24dba4b4353 (diff)
"testdisk -lu device" will list the partition with sector unit
Diffstat (limited to 'src/hdcache.c')
-rw-r--r--src/hdcache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hdcache.c b/src/hdcache.c
index e95a3df..4a07e7f 100644
--- a/src/hdcache.c
+++ b/src/hdcache.c
@@ -233,7 +233,7 @@ static int cache_clean(disk_t *disk_car)
static int cache_sync(disk_t *disk_car)
{
struct cache_struct *data=disk_car->data;
- data->disk_car->sync(data->disk_car);
+ return data->disk_car->sync(data->disk_car);
}
disk_t *new_diskcache(disk_t *disk_car, const unsigned int testdisk_mode)
@@ -257,7 +257,6 @@ disk_t *new_diskcache(disk_t *disk_car, const unsigned int testdisk_mode)
dup_CHS(&new_disk_car->CHS,&disk_car->CHS);
new_disk_car->disk_size=disk_car->disk_size;
new_disk_car->disk_real_size=disk_car->disk_real_size;
- new_disk_car->halt_on_errors=0;
new_disk_car->write_used=0;
new_disk_car->data=data;
new_disk_car->read=cache_read;
@@ -266,6 +265,10 @@ disk_t *new_diskcache(disk_t *disk_car, const unsigned int testdisk_mode)
new_disk_car->clean=cache_clean;
new_disk_car->description=cache_description;
new_disk_car->description_short=cache_description_short;
+ new_disk_car->rbuffer=NULL;
+ new_disk_car->wbuffer=NULL;
+ new_disk_car->rbuffer_size=0;
+ new_disk_car->wbuffer_size=0;
for(i=0;i<CACHE_BUFFER_NBR;i++)
data->cache[i].buffer=NULL;
return new_disk_car;