Open wangyugui opened 2 years ago
we need to detect the exist filesystem and ' -F, --force' to overwrite it?
a dirty fix to wipefs when 'mkfs.ntfs --fast'
@@ -3539,6 +3539,12 @@ static BOOL mkntfs_open_partition(ntfs_volume *vol)
}
ntfs_log_warning("mkntfs forced anyway. Hope /etc/mtab is incorrect.\n");
}
+ {
+ static u8 zero_to_wipefs[256*1024];
+ vol->dev->d_ops->seek(vol->dev, 0, SEEK_SET);
+ mkntfs_write(vol->dev, &zero_to_wipefs, sizeof(zero_to_wipefs));
+ vol->dev->d_ops->seek(vol->dev, 0, SEEK_SET);
+ }
result = TRUE;
done:
return result;
Hi,
'mkfs.ntfs --fast' failed to overwrite the existing filesystem. so, we need add wipefs to 'mkfs.ntfs --fast'
version: v2022.5.17