Index: cpukit/libfs/src/dosfs/msdos_misc.c
===================================================================
--- cpukit/libfs/src/dosfs/msdos_misc.c	(revision 7011f260617859384379cb9a351eb49983a4b7d1)
+++ cpukit/libfs/src/dosfs/msdos_misc.c	(revision 4c4869f48383986a7f36c18a0f3b52f7c39e6087)
@@ -1298,5 +1298,5 @@
     const uint32_t                        bts2rd,
     const bool                            create_node,
-    const unsigned int                    fat_entries,
+    const unsigned int                    lfn_entries,
     char                                 *name_dir_entry,
     fat_dir_pos_t                        *dir_pos,
@@ -1413,5 +1413,5 @@
                     (*empty_entry_count)++;
 
-                    if (*empty_entry_count == (fat_entries + 1))
+                    if (*empty_entry_count == (lfn_entries + 1))
                         empty_space_found = true;
                 }
@@ -1472,5 +1472,5 @@
                          * on when the characters are checked.
                          */
-                        if (fat_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
+                        if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
                                             MSDOS_LAST_LONG_ENTRY_MASK))
                             continue;
@@ -1481,5 +1481,5 @@
                         lfn_start.cln = dir_offset;
                         lfn_start.ofs = dir_entry;
-                        lfn_entry = fat_entries;
+                        lfn_entry = lfn_entries;
                         lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
 
@@ -1514,5 +1514,5 @@
                         converter,
                         entry,
-                        (lfn_entry + 1) == fat_entries,
+                        (lfn_entry + 1) == lfn_entries,
                         &entry_utf8_normalized[0],
                         sizeof (entry_utf8_normalized));
@@ -1659,5 +1659,5 @@
     fat_file_fd_t                        *fat_fd,
     const uint32_t                        bts2rd,
-    const unsigned int                    fat_entries,
+    const unsigned int                    lfn_entries,
     const char                           *name_dir_entry,
     fat_dir_pos_t                        *dir_pos,
@@ -1677,5 +1677,5 @@
      * If there is not enough space available then extend the file.
      */
-    if (empty_entry_count < fat_entries + 1)
+    if (empty_entry_count < lfn_entries + 1)
     {
         uint32_t unused;
@@ -1704,10 +1704,10 @@
          */
         slot = (empty_file_offset /
-            MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + fat_entries + 1;
+            MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
         msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
 
         lfn_checksum = msdos_lfn_checksum(name_dir_entry);
 
-        short_file_offset = empty_file_offset + fat_entries
+        short_file_offset = empty_file_offset + lfn_entries
             * MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
 
@@ -1739,5 +1739,5 @@
 
     /* Long file name entries */
-    for (lfn_entry = 0; lfn_entry < fat_entries; ++lfn_entry) {
+    for (lfn_entry = 0; lfn_entry < lfn_entries; ++lfn_entry) {
         uint8_t       *p;
         const uint8_t *n;
@@ -1754,5 +1754,5 @@
         p = entry + 1;
         n = (const uint8_t *) name_converted +
-            (fat_entries - lfn_entry - 1) * MSDOS_LFN_ENTRY_SIZE;
+            (lfn_entries - lfn_entry - 1) * MSDOS_LFN_ENTRY_SIZE;
 
 #if MSDOS_FIND_PRINT
@@ -1793,5 +1793,5 @@
         printf ( "\n" );
 #endif
-        *MSDOS_DIR_ENTRY_TYPE(entry) = fat_entries - lfn_entry;
+        *MSDOS_DIR_ENTRY_TYPE(entry) = lfn_entries - lfn_entry;
         if (lfn_entry == 0)
             *MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
@@ -1804,5 +1804,5 @@
     memcpy(entry, name_dir_entry, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
 
-    length = (fat_entries + 1) * MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
+    length = (lfn_entries + 1) * MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
     bytes_written = fat_file_write(&fs_info->fat, fat_fd,
                                    empty_file_offset,
@@ -1834,5 +1834,5 @@
     uint32_t                           empty_file_offset          = 0;
     uint32_t                           empty_entry_count          = 0;
-    unsigned int                       fat_entries;
+    unsigned int                       lfn_entries;
     rtems_dosfs_convert_control       *converter = fs_info->converter;
     void                              *buffer = converter->buffer.data;
@@ -1860,5 +1860,5 @@
                 MSDOS_SHORT_NAME_LEN);
             if (name_len_for_compare > 0) {
-                fat_entries = 0;
+                lfn_entries = 0;
             }
             else
@@ -1873,5 +1873,5 @@
                 buffer_size);
             if (name_len_for_save > 0) {
-                fat_entries = (name_len_for_save + MSDOS_LFN_ENTRY_SIZE - 1)
+                lfn_entries = (name_len_for_save + MSDOS_LFN_ENTRY_SIZE - 1)
                     / MSDOS_LFN_ENTRY_SIZE;
                 name_len_for_compare = msdos_filename_utf8_to_long_name_for_compare (
@@ -1904,5 +1904,5 @@
           bts2rd,
           create_node,
-          fat_entries,
+          lfn_entries,
           name_dir_entry,
           dir_pos,
@@ -1922,5 +1922,5 @@
                   MSDOS_SHORT_NAME_LEN);
               if (name_len_for_save > 0 ) {
-                  fat_entries = 0;
+                  lfn_entries = 0;
               }
               else
@@ -1935,5 +1935,5 @@
                   buffer_size);
               if (name_len_for_save > 0) {
-                  fat_entries = (name_len_for_save + MSDOS_LFN_ENTRY_SIZE - 1)
+                  lfn_entries = (name_len_for_save + MSDOS_LFN_ENTRY_SIZE - 1)
                     / MSDOS_LFN_ENTRY_SIZE;
               }
@@ -1954,5 +1954,5 @@
                 fat_fd,
                 bts2rd,
-                fat_entries,
+                lfn_entries,
                 name_dir_entry,
                 dir_pos,
