Changeset d9c65429 in rtems


Ignore:
Timestamp:
Feb 13, 2017, 2:13:02 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6dbbafc6
Parents:
239dd35f
git-author:
Sebastian Huber <sebastian.huber@…> (02/13/17 14:13:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/14/17 07:07:22)
Message:

dosfs: Fix msdos_find_file_in_directory()

For a filename match the entry must match without anything remaining.

Close #2908.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/dosfs/msdos_misc.c

    r239dd35f rd9c65429  
    15401540                        if (lfn_entry || (lfn_checksum != cs))
    15411541                            entry_matched = false;
    1542                         else {
     1542                        else if (filename_size_remaining == 0) {
    15431543                            filename_matched = true;
    15441544                            rc = msdos_on_entry_found (
  • testsuites/fstests/fsdosfsname01/init.c

    r239dd35f rd9c65429  
    10771077}
    10781078
     1079static void test_end_of_string_matches( void )
     1080{
     1081  int rc;
     1082
     1083  rc = mkdir( MOUNT_DIR "/lib.beam", S_IRWXU | S_IRWXG | S_IRWXO );
     1084  rtems_test_assert( rc == 0 );
     1085
     1086  errno = 0;
     1087  rc = unlink( MOUNT_DIR "/proc_lib.beam" );
     1088  rtems_test_assert( rc == -1 );
     1089  rtems_test_assert( errno == ENOENT );
     1090
     1091  rc = unlink( MOUNT_DIR "/lib.beam" );
     1092  rtems_test_assert( rc == 0 );
     1093}
     1094
    10791095/*
    10801096 * Main test method
     
    11341150    "/dev/rdb",
    11351151    NULL);
     1152
     1153  test_end_of_string_matches();
    11361154
    11371155  rc = unmount( MOUNT_DIR );
     
    12031221    &mount_opts[1]);
    12041222
     1223  test_end_of_string_matches();
     1224
    12051225  rc = unmount( MOUNT_DIR );
    12061226  rtems_test_assert( rc == 0 );
     
    12661286    &mount_opts[1]);
    12671287
     1288  test_end_of_string_matches();
     1289
    12681290  rc = unmount( MOUNT_DIR );
    12691291  rtems_test_assert( rc == 0 );
Note: See TracChangeset for help on using the changeset viewer.