summaryrefslogtreecommitdiffstats
path: root/src/fat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-02-11 08:55:15 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-02-11 08:55:15 +0100
commit52e88bbb5bd699f53e4326a17a27e601f2a7696f (patch)
treebdf54c2216ea01a279cbfee3420b6d7c9744b825 /src/fat_dir.c
parent71b0e4cdc04a088cee8c0c017d3ee78401d6a235 (diff)
Add the first sectors number to the log message when copying files from a FAT.
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index b0f3ad9..b0bf243 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -539,13 +539,15 @@ static int fat_copy(disk_t *disk_car, const partition_t *partition, dir_data_t *
return -1;
}
cluster = file->stat.st_ino;
- log_trace("fat_copy dst=%s first_cluster=%u size=%lu\n", new_file,
- cluster, (long unsigned)file_size);
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));
start_fat1=le16(fat_header->reserved);
start_data=start_fat1+fat_header->fats*fat_length+(get_dir_entries(fat_header)*32+disk_car->sector_size-1)/disk_car->sector_size;
no_of_cluster=(part_size-start_data)/sectors_per_cluster;
+ log_trace("fat_copy dst=%s first_cluster=%u (%llu) size=%lu\n", new_file,
+ cluster,
+ (long long unsigned)start_data+(cluster-2)*sectors_per_cluster,
+ (long unsigned)file_size);
while(cluster>=2 && cluster<=no_of_cluster+2 && file_size>0)
{