summaryrefslogtreecommitdiffstats
path: root/src/ntfs_adv.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-06-23 18:58:49 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-06-23 18:58:49 +0200
commitf665795dc14643ebf029b23e13305c18f468db6f (patch)
tree468866252f406b1f8e47c2ec1555146918598d19 /src/ntfs_adv.c
parent25b7a566d39b70f8a4588e81fa9fb9724602ab84 (diff)
When rebuilding the NTFS boot sector, log the information before the read()
operation
Diffstat (limited to 'src/ntfs_adv.c')
-rw-r--r--src/ntfs_adv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ntfs_adv.c b/src/ntfs_adv.c
index b753b7d..9ad80d4 100644
--- a/src/ntfs_adv.c
+++ b/src/ntfs_adv.c
@@ -611,6 +611,10 @@ int rebuild_NTFS_BS(disk_t *disk_car, partition_t *partition, const int verbose,
if(sectors_per_cluster>0 && mft_record_size>0)
{
unsigned int index_block_size=4096;
+ log_info("ntfs_find_mft: sectors_per_cluster %u\n",sectors_per_cluster);
+ log_info("ntfs_find_mft: mft_lcn %lu\n",(long unsigned int)mft_lcn);
+ log_info("ntfs_find_mft: mftmirr_lcn %lu\n",(long unsigned int)mftmirr_lcn);
+ log_info("ntfs_find_mft: mft_record_size %u\n",mft_record_size);
/* Read "root directory" in MFT */
if(disk_car->read(disk_car,mft_record_size, &buffer, partition->part_offset+(uint64_t)mft_lcn*sectors_per_cluster*disk_car->sector_size+5*(uint64_t)mft_record_size)!=0)
{
@@ -620,10 +624,6 @@ int rebuild_NTFS_BS(disk_t *disk_car, partition_t *partition, const int verbose,
index_block_size=ntfs_get_attr(buffer,0x90,partition,buffer+mft_record_size,verbose,0,NULL);
if(index_block_size%512!=0)
index_block_size=4096;
- log_info("ntfs_find_mft: sectors_per_cluster %u\n",sectors_per_cluster);
- log_info("ntfs_find_mft: mft_lcn %lu\n",(long unsigned int)mft_lcn);
- log_info("ntfs_find_mft: mftmirr_lcn %lu\n",(long unsigned int)mftmirr_lcn);
- log_info("ntfs_find_mft: mft_record_size %u\n",mft_record_size);
log_info("ntfs_find_mft: index_block_size %u\n",index_block_size);
create_ntfs_boot_sector(disk_car,partition, interface, sectors_per_cluster*disk_car->sector_size, mft_lcn, mftmirr_lcn, mft_record_size, index_block_size,current_cmd);
/* TODO: ask if the user want to continue the search of MFT */