Restore correct V3.1 $AttrDef creation which got last by the recent command

line parsing rewrite. Thanks to ntfscmp for catching this! :)
edge.strict_endians
szaka 2005-11-10 20:54:00 +00:00
parent c832d4b2e2
commit 77a5597521
1 changed files with 7 additions and 2 deletions

View File

@ -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;