Lines Matching full:upcase
518 "$Boot", "$BadClus", "$Secure", "$UpCase", "$Extend" }; in fix_mftmirr()
599 * Rewrite the $UpCase file as default
609 /* writing the $UpCase may require bitmap updates */ in rewrite_upcase()
633 ntfs_log_info("Rewriting $UpCase file\n"); in rewrite_upcase()
635 vol->upcase); in rewrite_upcase()
637 ntfs_log_error("Failed to rewrite $UpCase\n"); in rewrite_upcase()
639 ntfs_log_info("$UpCase has been set to default\n"); in rewrite_upcase()
653 * Fix the $UpCase file
662 ntfschar *upcase; in fix_upcase() local
671 /* Now load the upcase table from $UpCase. */ in fix_upcase()
672 ntfs_log_debug("Loading $UpCase...\n"); in fix_upcase()
678 /* Get an ntfs attribute for $UpCase/$DATA. */ in fix_upcase()
685 * Note: Normally, the upcase table has a length equal to 65536 in fix_upcase()
691 ntfs_log_error("Error: Upcase table is too big (max 32-bit " in fix_upcase()
697 upcase = (ntfschar*)ntfs_malloc(na->data_size); in fix_upcase()
698 if (!upcase) in fix_upcase()
701 l = ntfs_attr_pread(na, 0, na->data_size, upcase); in fix_upcase()
703 ntfs_log_error("Failed to read $UpCase, unexpected length " in fix_upcase()
709 /* Consistency check of $UpCase, restricted to plain ASCII chars */ in fix_upcase()
713 && (le16_to_cpu(upcase[k]) in fix_upcase()
717 ntfs_log_error("Corrupted file $UpCase\n"); in fix_upcase()
719 /* rewrite the $UpCase file from default */ in fix_upcase()
721 /* free the bad upcase record */ in fix_upcase()
723 free(upcase); in fix_upcase()
725 /* keep the default upcase but return an error */ in fix_upcase()
726 free(upcase); in fix_upcase()
729 /* accept the upcase table read from $UpCase */ in fix_upcase()
730 free(vol->upcase); in fix_upcase()
731 vol->upcase = upcase; in fix_upcase()
736 /* Done with the $UpCase mft record. */ in fix_upcase()
740 ntfs_log_perror("Failed to close $UpCase"); in fix_upcase()
1468 /* Create the default upcase table. */ in fix_startup()
1469 vol->upcase_len = ntfs_upcase_build_default(&vol->upcase); in fix_startup()
1470 if (!vol->upcase_len || !vol->upcase) in fix_startup()
1541 free(vol->upcase); in fix_startup()