From 77a559752173005c87c3d143fbbdeb4d98f99007 Mon Sep 17 00:00:00 2001 From: szaka Date: Thu, 10 Nov 2005 20:54:00 +0000 Subject: [PATCH] Restore correct V3.1 $AttrDef creation which got last by the recent command line parsing rewrite. Thanks to ntfscmp for catching this! :) --- ntfsprogs/mkntfs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/mkntfs.c b/ntfsprogs/mkntfs.c index 0a7322d9..5e9cec49 100644 --- a/ntfsprogs/mkntfs.c +++ b/ntfsprogs/mkntfs.c @@ -4932,8 +4932,13 @@ static int mkntfs_redirect(struct mkntfs_options *opts2) // XXX rename arg g_vol->indx_record_size = 4096; g_vol->indx_record_size_bits = 12; - g_vol->attrdef = (ATTR_DEF*)&attrdef_ntfs12_array; - g_vol->attrdef_len = sizeof(attrdef_ntfs12_array); + if (g_vol->major_ver < 3) { + g_vol->attrdef = (ATTR_DEF*)&attrdef_ntfs12_array; + g_vol->attrdef_len = sizeof(attrdef_ntfs12_array); + } else { + g_vol->attrdef = (ATTR_DEF*)&attrdef_ntfs3x_array; + g_vol->attrdef_len = sizeof(attrdef_ntfs3x_array); + } if (mkntfs_open_partition()) /* Open the partition. */ goto done;