From 8be0570dabad3febebc02dea8280499d8decef14 Mon Sep 17 00:00:00 2001 From: szaka Date: Tue, 12 Jul 2005 21:46:40 +0000 Subject: [PATCH] Prepare collect_resize_constraints() for $MFT with AT_ATTRIBUTE_LIST support --- ntfsprogs/ntfsresize.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ntfsprogs/ntfsresize.c b/ntfsprogs/ntfsresize.c index 0e32185f..1b19af0a 100644 --- a/ntfsprogs/ntfsresize.c +++ b/ntfsprogs/ntfsresize.c @@ -673,11 +673,22 @@ static void collect_resize_constraints(ntfs_resize_t *resize, runlist *rl) Vprintf("Bad clusters: %8lld - %lld\n", rl->lcn, last_lcn); return; } + + if (inode == FILE_MFT) { + llcn = &resize->last_mft; - if (NInoAttrList(resize->ni)) { + /* + * First run of $MFT AT_DATA and $MFT with AT_ATTRIBUTE_LIST + * isn't supported yet. + */ + if ((resize->ctx->attr->type != AT_DATA || rl->vcn) && + !NInoAttrList(resize->ni)) + supported = 1; + + } else if (NInoAttrList(resize->ni)) { llcn = &resize->last_multi_mft; - if (inode != FILE_MFT && inode != FILE_MFTMirr) + if (inode != FILE_MFTMirr) supported = 1; } else if (flags & ATTR_IS_SPARSE) { @@ -688,13 +699,6 @@ static void collect_resize_constraints(ntfs_resize_t *resize, runlist *rl) llcn = &resize->last_compressed; supported = 1; - } else if (inode == FILE_MFT) { - llcn = &resize->last_mft; - - /* First run of $MFT DATA attribute isn't supported yet */ - if (resize->ctx->attr->type != AT_DATA || rl->vcn) - supported = 1; - } else if (inode == FILE_MFTMirr) { llcn = &resize->last_mftmir; supported = 1;