Avoided logging meaningless fixup errors in ntfswipe
As ntfswipe examines all MFT entries, it may find uninitialized ones. They should not be considered as erroneous ones even if the fixups are wrong.pull/2/head
parent
e7b71bb78d
commit
e43f58e0e4
|
@ -873,6 +873,9 @@ static s64 wipe_tails(ntfs_volume *vol, int byte, enum action act)
|
|||
nr_mft_records = vol->mft_na->initialized_size >>
|
||||
vol->mft_record_size_bits;
|
||||
|
||||
/* Avoid getting fixup warnings on unitialized inodes */
|
||||
NVolSetNoFixupWarn(vol);
|
||||
|
||||
for (inode_num = FILE_first_user; inode_num < nr_mft_records;
|
||||
inode_num++) {
|
||||
s64 attr_wiped;
|
||||
|
@ -923,6 +926,7 @@ close_inode:
|
|||
ntfs_inode_close(ni);
|
||||
}
|
||||
close_abort :
|
||||
NVolClearNoFixupWarn(vol);
|
||||
ntfs_log_quiet("wipe_tails 0x%02x, %lld bytes\n", byte,
|
||||
(long long)total);
|
||||
return total;
|
||||
|
@ -1236,6 +1240,9 @@ static s64 wipe_directory(ntfs_volume *vol, int byte, enum action act)
|
|||
nr_mft_records = vol->mft_na->initialized_size >>
|
||||
vol->mft_record_size_bits;
|
||||
|
||||
/* Avoid getting fixup warnings on unitialized inodes */
|
||||
NVolSetNoFixupWarn(vol);
|
||||
|
||||
for (inode_num = 5; inode_num < nr_mft_records; inode_num++) {
|
||||
u32 indx_record_size;
|
||||
s64 wiped;
|
||||
|
@ -1336,6 +1343,7 @@ close_inode:
|
|||
ntfs_inode_close(ni);
|
||||
}
|
||||
|
||||
NVolClearNoFixupWarn(vol);
|
||||
ntfs_log_quiet("wipe_directory 0x%02x, %lld bytes\n", byte,
|
||||
(long long)total);
|
||||
return total;
|
||||
|
@ -1723,14 +1731,18 @@ static int destroy_record(ntfs_volume *nv, const s64 record,
|
|||
return -2;
|
||||
}
|
||||
|
||||
/* Avoid getting fixup warnings on unitialized inodes */
|
||||
NVolSetNoFixupWarn(nv);
|
||||
/* Read the MFT reocrd of the i-node */
|
||||
if (ntfs_attr_mst_pread(mft, nv->mft_record_size * record, 1LL,
|
||||
nv->mft_record_size, file->mft) < 1) {
|
||||
|
||||
NVolClearNoFixupWarn(nv);
|
||||
ntfs_attr_close(mft);
|
||||
free_file(file);
|
||||
return -3;
|
||||
}
|
||||
NVolClearNoFixupWarn(nv);
|
||||
ntfs_attr_close(mft);
|
||||
mft = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue