Revert "Ported ntfsclone to Windows", should be "Fixed bad copying of the backup boot sector"

This reverts commit 92cd41b6e5.

The title and description were wrong
edge.strict_endians
Jean-Pierre André 2013-02-09 12:50:16 +01:00
parent 92cd41b6e5
commit d32c593521
1 changed files with 9 additions and 12 deletions

View File

@ -1542,14 +1542,13 @@ static void dump_clusters(ntfs_walk_clusters_ctx *image, runlist *rl)
return;
lseek_to_cluster(rl->lcn);
if (opt.metadata_image && wipe)
gap_to_cluster(rl->lcn - image->current_lcn);
if (opt.metadata_image ? wipe : !wipe) {
if (opt.metadata_image)
gap_to_cluster(rl->lcn - image->current_lcn);
/* FIXME: this could give pretty suboptimal performance */
for (i = 0; i < len; i++)
copy_cluster(opt.rescue, rl->lcn + i, rl->lcn + i);
if (opt.metadata_image)
image->current_lcn = rl->lcn + len;
image->current_lcn = rl->lcn + len;
}
}
@ -1917,16 +1916,14 @@ out:
compare_bitmaps(&lcn_bitmap, TRUE);
walk->image->current_lcn = 0;
}
if (opt.metadata_image ? wipe : !wipe) {
/* also get the backup bootsector */
nr_clusters = vol->nr_clusters;
lseek_to_cluster(nr_clusters);
if (opt.metadata_image && wipe)
gap_to_cluster(nr_clusters
- walk->image->current_lcn);
nr_clusters = vol->nr_clusters;
lseek_to_cluster(nr_clusters);
if (opt.metadata_image && wipe)
gap_to_cluster(nr_clusters - walk->image->current_lcn);
if (opt.metadata_image ? wipe : !wipe)
copy_cluster(opt.rescue, nr_clusters, nr_clusters);
walk->image->current_lcn = nr_clusters;
}
walk->image->current_lcn = nr_clusters;
/* Not counted, for compatibility with older versions */
if (!opt.metadata_image)
walk->image->inuse++;