<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450743#M15086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Luiz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also encountered similar problem in MFS of MQX 4.2. There's a lot changed in MFS from 4.1 to 4.2, and I have discovered a lot bugs in it. It seems this issue usually occurs when the SD card is larger than 1GB. The problem may be solved when you reformat the SD card with larger cluster size. You may set the table in mfs_format.c. However, I think it's better to use MFS of MQX 4.1 for now since there're still potential problem existed in the new version. I have tested to use MQX 4.2 with MFS 4.1, and it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2015 13:28:05 GMT</pubDate>
    <dc:creator>josephchen</dc:creator>
    <dc:date>2015-08-21T13:28:05Z</dc:date>
    <item>
      <title>MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450740#M15083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting a strange behavior on MFS on MQX 4.2 - which was not occurring on MQX 4.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing logs to a log directory (a:/log) on the SD card, sequentially: every time a log file reaches some fixed size a new file is created. Log filenames follow this pattern:&amp;nbsp; logN.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've noticed however that, after a certain number of logs are created (it looks like the magical number is 127), if I close the file handle and try to open it again I get a "file not found" error. Even the shell "del" command doesn't work with this file (however I can mount the filesystem normally on windows and delete the file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to debug the mfs code and it looks like it is failing on LFN calculations on the &lt;EM&gt;MFS_scan_dir_chain&lt;/EM&gt; function (file mfs_dir_chain.c) - it returns file not found error - even the file being in there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another clue is that if I delete the previous file (log126.txt, as I can't delete log127.txt) the following returns from a dir command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #c6c6c6; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;&lt;STRONG&gt;Shell default dir command response&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;LOG115.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 136 07-27-2015 19:51:40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG115.TXT&lt;/P&gt;&lt;P&gt;LOG116.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 136 07-27-2015 19:51:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG116.TXT&lt;/P&gt;&lt;P&gt;LOG117.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134 07-27-2015 19:51:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG117.TXT&lt;/P&gt;&lt;P&gt;LOG118.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 140 07-27-2015 19:51:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG118.TXT&lt;/P&gt;&lt;P&gt;LOG119.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 136 07-27-2015 19:51:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG119.TXT&lt;/P&gt;&lt;P&gt;LOG120.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 136 07-27-2015 19:51:44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG120.TXT&lt;/P&gt;&lt;P&gt;LOG121.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134 07-27-2015 20:23:18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG121.TXT&lt;/P&gt;&lt;P&gt;LOG122.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 132 07-27-2015 20:23:22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG122.TXT&lt;/P&gt;&lt;P&gt;LOG123.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 130 07-27-2015 20:23:28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG123.TXT&lt;/P&gt;&lt;P&gt;LOG124.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 128 07-27-2015 20:23:38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG124.TXT&lt;/P&gt;&lt;P&gt;LOG125.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134 07-27-2015 20:23:52&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A LOG125.TXT&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;14380240.29, 858797106 09-20-2005 06:08:20&amp;nbsp; HS DA 14380240.29,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is some garbage at the listing end. I'm not sure that both problems are related, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried different SD cards already and also tried to delete all files, however the problem is always there again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance - any help will be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 20:33:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450740#M15083</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2015-07-27T20:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450741#M15084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the problem is not related to LFN - I've tried using 8.3 names and the problem persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to make it easy to replicate the problem I've create a shell command, which can be used in the shell example to create fake files in an empty FAT32 SD card:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #c6c6c6; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Fake file creation command for shell&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;int32_t&lt;/SPAN&gt; cmd_fake_files(&lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;int32_t&lt;/SPAN&gt; argc, &lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;char&lt;/SPAN&gt; *argv[])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;bool&lt;/SPAN&gt; print_usage, shorthelp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;int&lt;/SPAN&gt; i, n, oper;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; MQX_FILE_PTR f;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;char&lt;/SPAN&gt; filename[&lt;SPAN class="Constant" style="color: #00cd00;"&gt;32&lt;/SPAN&gt;], froot[&lt;SPAN class="Constant" style="color: #00cd00;"&gt;4&lt;/SPAN&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; print_usage = Shell_check_help_request(argc, argv, &amp;amp;shorthelp);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (!print_usage) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Comment" style="color: #ee0000;"&gt;/*&lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt; create or delete files? &lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt;*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (strcmp(argv[&lt;SPAN class="Constant" style="color: #00cd00;"&gt;1&lt;/SPAN&gt;], &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"delete"&lt;/SPAN&gt;) == &lt;SPAN class="Constant" style="color: #00cd00;"&gt;0&lt;/SPAN&gt;) { oper = &lt;SPAN class="Constant" style="color: #00cd00;"&gt;0&lt;/SPAN&gt;; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;else&lt;/SPAN&gt; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (strcmp(argv[&lt;SPAN class="Constant" style="color: #00cd00;"&gt;1&lt;/SPAN&gt;], &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"create"&lt;/SPAN&gt;) == &lt;SPAN class="Constant" style="color: #00cd00;"&gt;0&lt;/SPAN&gt;) { oper = &lt;SPAN class="Constant" style="color: #00cd00;"&gt;1&lt;/SPAN&gt;; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Comment" style="color: #ee0000;"&gt;/*&lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt; number of files to create/delete &lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt;*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; n = strtoul(argv[&lt;SPAN class="Constant" style="color: #00cd00;"&gt;2&lt;/SPAN&gt;], &lt;SPAN class="Constant" style="color: #00cd00;"&gt;NULL&lt;/SPAN&gt;, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;10&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;for&lt;/SPAN&gt; (i=&lt;SPAN class="Constant" style="color: #00cd00;"&gt;0&lt;/SPAN&gt;;i&amp;lt;n;i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Comment" style="color: #ee0000;"&gt;/*&lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt; create random names &lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt;*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (!(i % &lt;SPAN class="Constant" style="color: #00cd00;"&gt;4&lt;/SPAN&gt;)) { strcpy(froot, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"ABC"&lt;/SPAN&gt;); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;else&lt;/SPAN&gt; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (!(i % &lt;SPAN class="Constant" style="color: #00cd00;"&gt;3&lt;/SPAN&gt;)) { strcpy(froot, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"DEF"&lt;/SPAN&gt;); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;else&lt;/SPAN&gt; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (!(i % &lt;SPAN class="Constant" style="color: #00cd00;"&gt;2&lt;/SPAN&gt;)) { strcpy(froot, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"GHI"&lt;/SPAN&gt;); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;else&lt;/SPAN&gt; { strcpy(froot, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"JKL"&lt;/SPAN&gt;); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Comment" style="color: #ee0000;"&gt;/*&lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt; optional third parameters allow writing in a subdir (which must be created first) &lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt;*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (argc &amp;gt; &lt;SPAN class="Constant" style="color: #00cd00;"&gt;3&lt;/SPAN&gt;) { sprintf(filename, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"a:/&lt;/SPAN&gt;&lt;SPAN class="Special" style="color: #ff1493;"&gt;%s&lt;/SPAN&gt;&lt;SPAN class="Constant" style="color: #00cd00;"&gt;/&lt;/SPAN&gt;&lt;SPAN class="Special" style="color: #ff1493;"&gt;%s%d&lt;/SPAN&gt;&lt;SPAN class="Constant" style="color: #00cd00;"&gt;.TXT"&lt;/SPAN&gt;, argv[&lt;SPAN class="Constant" style="color: #00cd00;"&gt;3&lt;/SPAN&gt;], froot, i); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;else&lt;/SPAN&gt; { sprintf(filename, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"a:/&lt;/SPAN&gt;&lt;SPAN class="Special" style="color: #ff1493;"&gt;%s%d&lt;/SPAN&gt;&lt;SPAN class="Constant" style="color: #00cd00;"&gt;.TXT"&lt;/SPAN&gt;, froot, i); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Comment" style="color: #ee0000;"&gt;/*&lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt; create/delete files &lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt;*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;if&lt;/SPAN&gt; (oper) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; f = fopen(filename, &lt;SPAN class="Constant" style="color: #00cd00;"&gt;"w+"&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; write(f, filename, strlen(filename));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; fclose(f);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; } &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;else&lt;/SPAN&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Comment" style="color: #ee0000;"&gt;/*&lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt; delete files &lt;/SPAN&gt;&lt;SPAN class="Comment" style="color: #ee0000;"&gt;*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; _io_ioctl(mfs_fd_ptr, IO_IOCTL_DELETE_FILE, (&lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;uint32_t&lt;/SPAN&gt; *) filename);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; _time_delay(&lt;SPAN class="Constant" style="color: #00cd00;"&gt;10&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Statement" style="color: #0000ff; font-weight: bold;"&gt;return&lt;/SPAN&gt; &lt;SPAN class="Constant" style="color: #00cd00;"&gt;0&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN class="Type" style="color: #0000ff; font-weight: bold;"&gt;const&lt;/SPAN&gt; SHELL_COMMAND_STRUCT Shell_commands[] = {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090; font-family: 'courier new', courier;"&gt;&lt;EM&gt; /*** other commands ommited ***/&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;&amp;nbsp; { &lt;SPAN class="Constant"&gt;"fakef"&lt;/SPAN&gt;, cmd_fake_files },&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; { &lt;SPAN class="Constant" style="color: #00cd00;"&gt;NULL&lt;/SPAN&gt;,&amp;nbsp; &lt;SPAN class="Constant" style="color: #00cd00;"&gt;NULL&lt;/SPAN&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in order to reproduce the problem I create a TMP directory, call the command to create 128 pseudorandom name files in this dir and try to read their content (yes, I know the code is ugly - I just didn't want to spend a lot of time in order to prove my point). Here is the sequence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #c6c6c6; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;&lt;STRONG&gt;Sequence of commands to reach the error&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;&lt;P&gt;shell&amp;gt; mkdir TMP&lt;/P&gt;&lt;P&gt;shell&amp;gt; fakef create 128 TMP &lt;STRONG&gt;(create 128 files in the /TMP directory)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;shell&amp;gt; cd TMP&lt;/P&gt;&lt;P&gt;shell&amp;gt; dir&lt;/P&gt;&lt;P&gt;.... (121 files omitted here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JKL121.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:27:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A JKL121.TXT&lt;/P&gt;&lt;P&gt;GHI122.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:27:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A GHI122.TXT&lt;/P&gt;&lt;P&gt;DEF123.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:27:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A DEF123.TXT&lt;/P&gt;&lt;P&gt;ABC124.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:27:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A ABC124.TXT&lt;/P&gt;&lt;P&gt;JKL125.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:27:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A JKL125.TXT&lt;/P&gt;&lt;P&gt;DEF126.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:26:14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A DEF126.TXT&lt;/P&gt;&lt;P&gt;JKL127.TXT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 07-28-2015 16:27:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A JKL127.TXT&lt;/P&gt;&lt;P&gt;shell&amp;gt; type JKL125.TXT&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;&lt;STRONG&gt;a:/TMP/JKL125.TXT &lt;SPAN style="color: #303030;"&gt;(file content correctly shown)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;shell&amp;gt; type DEF126.TXT&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;Error, unable to open file DEF126.TXT.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;shell&amp;gt; type JKL127.TXT&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;Error, unable to open file JKL127.TXT.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;shell&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I can open and see the content of the first 126 files - however from the 127th file on the system fails opening the file! It is useless to delete any of the other files or to restart the system. This example also proves that the filename has no influence over the problem that I can have a maximum of 126 files in the same directory =(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filesystem works perfectly in a Windows system, however. Any idea of what I'm doing wrong or if the system has a bug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 16:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450741#M15084</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2015-07-28T16:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450742#M15085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there anything I can supply to make it easier to test this condition so I may have an answer from freescale?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty convinced it may be a serious problem in MFS (not being allowed to write to a file in a directory with more than 127 files).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Luiz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 16:59:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450742#M15085</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2015-08-06T16:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450743#M15086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Luiz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also encountered similar problem in MFS of MQX 4.2. There's a lot changed in MFS from 4.1 to 4.2, and I have discovered a lot bugs in it. It seems this issue usually occurs when the SD card is larger than 1GB. The problem may be solved when you reformat the SD card with larger cluster size. You may set the table in mfs_format.c. However, I think it's better to use MFS of MQX 4.1 for now since there're still potential problem existed in the new version. I have tested to use MQX 4.2 with MFS 4.1, and it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 13:28:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450743#M15086</guid>
      <dc:creator>josephchen</dc:creator>
      <dc:date>2015-08-21T13:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450744#M15087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joseph.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's kind of disappointing to know that! Freescale advertised that it has improved the MFS system and has solved a lot of bugs. I didn't expect it to be that unstable!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to integrate MFS from MQX 4.1 on my 4.2 compilation without success - it was a couple weeks ago and I don't remember what happened, but as you were successfull doing it I think it is worth a new try!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your reply, I was hopeless about this question already.&lt;/P&gt;&lt;P&gt;Luiz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 13:52:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450744#M15087</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2015-08-21T13:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450745#M15088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May you show the error message so I can see if I can help you. Also, please note that when you do file search in MFS from MQX 4.1, there's one more variable in the LFN structure that needs to be set, which is different from MQX 4.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2015 03:38:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450745#M15088</guid>
      <dc:creator>josephchen</dc:creator>
      <dc:date>2015-08-22T03:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450746#M15089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/357738"&gt;TWRK64 MQX 4_2 MFS SD-CARD demo Volume and LFN long file name collision&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Here's some discussion about MQX 4.2 MFS including some fixed MFS files. However, I haven't tried it yet. I guess it's still better to wait for the next official release or patch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2015 03:43:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450746#M15089</guid>
      <dc:creator>josephchen</dc:creator>
      <dc:date>2015-08-22T03:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450747#M15090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've moved on in my project limiting the number of logs in the same directory to 100, so I've no time right now to check if I can use MQX 4.1 filesystem - but I'll do in the coming weeks and if I need help I'll let you know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem the guys are talking about in this TWRK64 topic is the same as the on I've experienced - I'll let them know of this alternative way to reproduce the issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Luiz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 12:51:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450747#M15090</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2015-09-01T12:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: MFS on MQX 4.2 problem when multiple files with common name root in same directory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450748#M15091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Luiz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have tested those fixed MFS files for MQX 4.2, and it does solve the issue I have encountered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 14:47:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-on-MQX-4-2-problem-when-multiple-files-with-common-name-root/m-p/450748#M15091</guid>
      <dc:creator>josephchen</dc:creator>
      <dc:date>2015-09-01T14:47:14Z</dc:date>
    </item>
  </channel>
</rss>

