From 62f963608067cca2f8d919907035a4a628a4affd Mon Sep 17 00:00:00 2001 From: antona Date: Thu, 13 Oct 2005 08:26:02 +0000 Subject: [PATCH] Temporarily disable use of the legal ansi character checking in libntfs/unistr.c::ntfs_names_collate() pending a proper fix at some point. (Anton) --- ChangeLog | 6 ++++++ configure.ac | 4 ++-- include/ntfs/unistr.h | 2 -- libntfs/unistr.c | 16 +++++++++++----- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fddc474..1874e216 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +xx/xx/2005 - 1.12.2-WIP + + - Temporarily disable use of the legal ansi character checking in + libntfs/unistr.c::ntfs_names_collate() pending a proper fix at some + point. (Anton) + 10/10/2005 - 1.12.1 - Minor fix to location of mount.ntfs-fuse and mkfs.ntfs. - Fix hardcoded location for uninstalling mount.ntfs-fuse hardlink to diff --git a/configure.ac b/configure.ac index a68c7c90..6a63308e 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ # AC_PREREQ(2.59) -AC_INIT([ntfsprogs],[1.12.1],[linux-ntfs-dev@lists.sourceforge.net]) +AC_INIT([ntfsprogs],[1.12.2-WIP],[linux-ntfs-dev@lists.sourceforge.net]) # # Before making a release, the LTVERSION string should be modified. @@ -50,7 +50,7 @@ AC_INIT([ntfsprogs],[1.12.1],[linux-ntfs-dev@lists.sourceforge.net]) # # - If the interface is the same as the previous version, change to C:R+1:A # -LTVERSION_LIBNTFS="8:1:0" +LTVERSION_LIBNTFS="9:0:0" AC_SUBST(LTVERSION_LIBNTFS) AC_CANONICAL_HOST([]) diff --git a/include/ntfs/unistr.h b/include/ntfs/unistr.h index 7fdbc678..d5b22627 100644 --- a/include/ntfs/unistr.h +++ b/include/ntfs/unistr.h @@ -26,8 +26,6 @@ #include "types.h" #include "layout.h" -extern const u8 legal_ansi_char_array[0x40]; - extern BOOL ntfs_names_are_equal(const ntfschar *s1, size_t s1_len, const ntfschar *s2, size_t s2_len, const IGNORE_CASE_BOOL ic, const ntfschar *upcase, const u32 upcase_size); diff --git a/libntfs/unistr.c b/libntfs/unistr.c index 79103627..529a2b9e 100644 --- a/libntfs/unistr.c +++ b/libntfs/unistr.c @@ -53,7 +53,8 @@ * This is used by the name collation functions to quickly determine what * characters are (in)valid. */ -const u8 legal_ansi_char_array[0x40] = { +#if 0 +static const u8 legal_ansi_char_array[0x40] = { 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, @@ -66,6 +67,7 @@ const u8 legal_ansi_char_array[0x40] = { 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x04, 0x16, 0x18, 0x16, 0x18, 0x18, }; +#endif /** * ntfs_names_are_equal - compare two Unicode names for equality @@ -118,8 +120,9 @@ BOOL ntfs_names_are_equal(const ntfschar *s1, size_t s1_len, */ int ntfs_names_collate(const ntfschar *name1, const u32 name1_len, const ntfschar *name2, const u32 name2_len, - const int err_val, const IGNORE_CASE_BOOL ic, - const ntfschar *upcase, const u32 upcase_len) + const int err_val __attribute__((__unused__)), + const IGNORE_CASE_BOOL ic, const ntfschar *upcase, + const u32 upcase_len) { u32 cnt; ntfschar c1, c2; @@ -130,8 +133,7 @@ int ntfs_names_collate(const ntfschar *name1, const u32 name1_len, exit(1); } #endif - for (cnt = 0; cnt < min(name1_len, name2_len); ++cnt) - { + for (cnt = 0; cnt < min(name1_len, name2_len); ++cnt) { c1 = le16_to_cpu(*name1); name1++; c2 = le16_to_cpu(*name2); @@ -142,8 +144,10 @@ int ntfs_names_collate(const ntfschar *name1, const u32 name1_len, if (c2 < upcase_len) c2 = le16_to_cpu(upcase[c2]); } +#if 0 if (c1 < 64 && legal_ansi_char_array[c1] & 8) return err_val; +#endif if (c1 < c2) return -1; if (c1 > c2) @@ -154,9 +158,11 @@ int ntfs_names_collate(const ntfschar *name1, const u32 name1_len, if (name1_len == name2_len) return 0; /* name1_len > name2_len */ +#if 0 c1 = le16_to_cpu(*name1); if (c1 < 64 && legal_ansi_char_array[c1] & 8) return err_val; +#endif return 1; }