Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28678/ntfsprogs
Modified Files:
ntfsresize.c
Log Message:
ntfsresize: give more hint if an $MFT run should be split. This will be the
next most common restriction when $MFT with ATTRIBUTE_LIST will be supported
Index: ntfsresize.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsresize.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- ntfsresize.c 12 Jul 2005 21:46:40 -0000 1.72
+++ ntfsresize.c 12 Jul 2005 22:03:13 -0000 1.73
@@ -521,7 +521,7 @@ static int parse_options(int argc, char
return (!err && !help && !ver);
}
-static void print_advise(ntfs_volume *vol, s64 supp_lcn)
+static void __print_advise(ntfs_volume *vol, s64 supp_lcn)
{
s64 old_b, new_b, freed_b, old_mb, new_mb, freed_mb;
@@ -555,7 +555,11 @@ static void print_advise(ntfs_volume *vo
else
printf("%lld bytes", (long long)freed_b);
printf(").\n");
+}
+static void print_advise(ntfs_volume *vol, s64 supp_lcn)
+{
+ __print_advise(vol, supp_lcn);
printf("Please make a test run using both the -n and -s options "
"before real resizing!\n");
}
@@ -751,6 +755,9 @@ static void collect_relocation_info(ntfs
err_printf("$MFT%s can't be split up yet. Please try "
"a different size.\n", inode ? "Mirr" : "");
last_lcn = lcn + lcn_length - 1;
+ if (!(inode == FILE_MFT && rl->vcn == 0) &&
+ lcn - 1 >= resize->inuse)
+ __print_advise(resize->vol, lcn - 1);
print_advise(resize->vol, last_lcn);
exit(1);
}
|