[syslinux:master] ntfs: fix POSIX vs Win32 filename compares

syslinux-bot for Paulo Alcantara pcacjr at gmail.com
Fri Feb 24 10:45:12 PST 2012


Commit-ID:  6abb4eb7ca8de9de2c6e5048ce45c779d5953819
Gitweb:     http://www.syslinux.org/commit/6abb4eb7ca8de9de2c6e5048ce45c779d5953819
Author:     Paulo Alcantara <pcacjr at gmail.com>
AuthorDate: Sun, 25 Dec 2011 15:36:19 -0300
Committer:  Paulo Alcantara <pcacjr at gmail.com>
CommitDate: Sat, 11 Feb 2012 16:06:07 -0300

ntfs: fix POSIX vs Win32 filename compares

When using the COMBOOT32 module "ls" for listining directory entries on
an NTFS volume, for e.g. directories as "/Foobar" (a Win32 filename)
could be only listed as "ls.c32 /foobar" and neither "ls.c32
"/Foobar" nor "ls.c32 /FOOBAR". POSIX filenames must be handled in a
case-sensitivity way, while Win32 filenames are handled in a
non-case-sensitivity way.

Note also that the POSIX/Win32 filename compare is done in the
ntfs_filename_cmp() function.

Signed-off-by: Paulo Alcantara <pcacjr at gmail.com>

---
 core/fs/ntfs/ntfs.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/core/fs/ntfs/ntfs.c b/core/fs/ntfs/ntfs.c
index 463d4e2..a60bf0f 100644
--- a/core/fs/ntfs/ntfs.c
+++ b/core/fs/ntfs/ntfs.c
@@ -687,16 +687,6 @@ static struct inode *ntfs_index_lookup(const char *dname, struct inode *dir)
                     if (ie->flags & INDEX_ENTRY_END)
                         break;
 
-                    /* Do case-sensitive compares for Posix file names */
-                    if (ie->key.file_name.file_name_type == FILE_NAME_POSIX) {
-                        if (ie->key.file_name.file_name[0] > *dname)
-                            break;
-                    } else {
-                        if (tolower(ie->key.file_name.file_name[0]) >
-                            tolower(*dname))
-                            break;
-                    }
-
                     if (ntfs_filename_cmp(dname, ie))
                         goto found;
                 }


More information about the Syslinux-commits mailing list