summaryrefslogtreecommitdiffstats
path: root/src/exfat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-19 16:13:20 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-19 16:13:20 +0200
commit4699591268012128de457f172963a51ae1c681d6 (patch)
tree6553606fd73ff8b11ea2e17e7d4296548db418a1 /src/exfat_dir.c
parentea952b0cc9d7a732916fc37db13383a0ae31faf7 (diff)
TestDisk, Advanced, List will now always display files or a warning message
Diffstat (limited to 'src/exfat_dir.c')
-rw-r--r--src/exfat_dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exfat_dir.c b/src/exfat_dir.c
index e012f08..a4fee56 100644
--- a/src/exfat_dir.c
+++ b/src/exfat_dir.c
@@ -228,7 +228,7 @@ static int exfat_dir(disk_t *disk, const partition_t *partition, dir_data_t *dir
return 0;
}
-int dir_partition_exfat_init(disk_t *disk, const partition_t *partition, dir_data_t *dir_data, const int verbose)
+dir_partition_t dir_partition_exfat_init(disk_t *disk, const partition_t *partition, dir_data_t *dir_data, const int verbose)
{
static struct exfat_dir_struct *ls;
struct exfat_super_block *exfat_header;
@@ -239,14 +239,14 @@ int dir_partition_exfat_init(disk_t *disk, const partition_t *partition, dir_dat
{
log_error("Can't read exFAT boot sector.\n");
free(exfat_header);
- return -1;
+ return DIR_PART_EIO;
}
if(le16(exfat_header->signature)!=0xAA55 ||
memcmp(exfat_header->oem_id, "EXFAT ", sizeof(exfat_header->oem_id))!=0)
{
log_error("Not an exFAT boot sector.\n");
free(exfat_header);
- return -1;
+ return DIR_PART_EIO;
}
ls=(struct exfat_dir_struct *)MALLOC(sizeof(*ls));
ls->boot_sector=exfat_header;
@@ -266,7 +266,7 @@ int dir_partition_exfat_init(disk_t *disk, const partition_t *partition, dir_dat
dir_data->local_dir=NULL;
dir_data->private_dir_data=ls;
dir_data->get_dir=exfat_dir;
- return 0;
+ return DIR_PART_OK;
}
static void dir_partition_exfat_close(dir_data_t *dir_data)