summaryrefslogtreecommitdiffstats
path: root/src/fatp.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-01 13:42:51 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-01 13:42:51 +0100
commitb58be737f078928b6e1dc3cabc77bec20b059ece (patch)
treefff7ad10fc6993a247d4b9d2cc88d00c466ed8de /src/fatp.c
parent0bf23249bb4ea2bf930148bfd59a13342cdedd76 (diff)
new functions is_fat_directory() and fat_get_cluster_from_entry()
rename sectors() to fat_sectors()
Diffstat (limited to 'src/fatp.c')
-rw-r--r--src/fatp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fatp.c b/src/fatp.c
index 2b0f886..359abb3 100644
--- a/src/fatp.c
+++ b/src/fatp.c
@@ -33,6 +33,7 @@
#include "filegen.h"
#include "fatp.h"
#include "fat.h"
+#include "fat_common.h"
#include "log.h"
static void fat16_remove_used_space(disk_t *disk_car,const partition_t *partition, alloc_data_t *list_search_space, const unsigned int fat_offset, const unsigned int no_of_cluster, const unsigned int start_data, const unsigned int cluster_size, const unsigned int sector_size);
@@ -200,7 +201,7 @@ unsigned int fat_remove_used_space(disk_t *disk_car, const partition_t *partitio
return 0;
}
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));
+ part_size=(fat_sectors(fat_header)>0?fat_sectors(fat_header):le32(fat_header->total_sect));
start_fat1=le16(fat_header->reserved);
start_data=start_fat1+fat_header->fats*fat_length+(get_dir_entries(fat_header)*32+sector_size-1)/sector_size;
no_of_cluster=(part_size-start_data)/fat_header->sectors_per_cluster;