summaryrefslogtreecommitdiffstats
path: root/src/fat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-19 11:08:14 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-19 11:08:14 +0200
commit68509cae8f62089d1cdfe6bcb12beee8f1a49495 (patch)
tree3c83bf395a85fec89a3f3faa8add7d9919eb861f /src/fat_dir.c
parent64a278f1def5688f51ef9455a0b2a25afbec722e (diff)
fat_dir.c: use fat_method_t instead of int type
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index df12027..bdd7376 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -300,7 +300,7 @@ RecEnd:
return 0;
}
-enum {FAT_FOLLOW_CLUSTER, FAT_NEXT_FREE_CLUSTER, FAT_NEXT_CLUSTER};
+typedef enum {FAT_FOLLOW_CLUSTER, FAT_NEXT_FREE_CLUSTER, FAT_NEXT_CLUSTER} fat_method_t;
static int is_EOC(const unsigned int cluster, const upart_type_t upart_type)
{
@@ -346,7 +346,7 @@ static int fat_dir(disk_t *disk_car, const partition_t *partition, dir_data_t *d
int stop=0;
uint64_t start_fat1,start_data,part_size;
unsigned long int no_of_cluster,fat_length;
- unsigned int fat_meth=FAT_FOLLOW_CLUSTER;
+ fat_method_t fat_meth=FAT_FOLLOW_CLUSTER;
memset(buffer_dir,0,cluster_size*NBR_CLUSTER_MAX);
fat_length=le16(fat_header->fat_length)>0?le16(fat_header->fat_length):le32(fat_header->fat32_length);
part_size=(sectors(fat_header)>0?sectors(fat_header):le32(fat_header->total_sect));
@@ -488,7 +488,7 @@ static int fat_copy(disk_t *disk_car, const partition_t *partition, dir_data_t *
unsigned char *buffer_file=(unsigned char *)MALLOC(block_size);
unsigned int cluster;
unsigned int file_size=file->st_size;
- unsigned int fat_meth=FAT_FOLLOW_CLUSTER;
+ fat_method_t fat_meth=FAT_FOLLOW_CLUSTER;
uint64_t start_fat1,start_data,part_size;
unsigned long int no_of_cluster,fat_length;
f_out=fopen_local(&new_file, dir_data->local_dir, dir_data->current_directory);