<?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>MQX Software SolutionsのトピックMFS_NOT_A_DOS_DISK</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-NOT-A-DOS-DISK/m-p/354656#M11565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run up in to a problem of MFS giving me error MFS_NOT_A_DOS_DISK.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since all the function calls like - io_usb_mfs_install, io_mfs_install, fopen return MQX_OK(no error), I cant find the source of code that changes ERROR element of FS_FS_PTR sturcture.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me find out. The code is attached with this post.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339153"&gt;mfs_install.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Oct 2014 18:12:49 GMT</pubDate>
    <dc:creator>nitinkothari</dc:creator>
    <dc:date>2014-10-27T18:12:49Z</dc:date>
    <item>
      <title>MFS_NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-NOT-A-DOS-DISK/m-p/354656#M11565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run up in to a problem of MFS giving me error MFS_NOT_A_DOS_DISK.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since all the function calls like - io_usb_mfs_install, io_mfs_install, fopen return MQX_OK(no error), I cant find the source of code that changes ERROR element of FS_FS_PTR sturcture.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me find out. The code is attached with this post.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339153"&gt;mfs_install.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 18:12:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-NOT-A-DOS-DISK/m-p/354656#M11565</guid>
      <dc:creator>nitinkothari</dc:creator>
      <dc:date>2014-10-27T18:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: MFS_NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-NOT-A-DOS-DISK/m-p/354657#M11566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;According with the Freescale MQX RTOS MFS User’s Guide:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-size: 15.0pt; font-family: 'Helvetica-Bold','sans-serif';"&gt;_io_mfs_install&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Install MFS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Synopsis&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;uint32_t _io_mfs_install(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/*[IN] the device on which to install MFS */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;FILE_PTR &lt;/SPAN&gt;&lt;EM style="font-family: 'Times New Roman','serif';"&gt;dev_fd&lt;/EM&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/*[IN] Name to be given to MFS (e.g. "C:", "MFS1:") */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/* The name must end in a colon ":" */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;char * &lt;/SPAN&gt;&lt;EM style="font-family: 'Times New Roman','serif';"&gt;identifier&lt;/EM&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/*[IN] Partition number to install MFS on. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/* 0 for no partitions */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;uint32_t &lt;/SPAN&gt;&lt;EM style="font-family: 'Times New Roman','serif';"&gt;partition_num&lt;/EM&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;The function initializes MFS and allocates memory for all of the internal MFS data structures. It also reads some required drive information from the disk, on which it is installed. MFS supports FAT12, FAT16, and FAT32 file systems. If the disk has a different file system or if it is unformatted, you can use MFS to format it to one of the supported file systems.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;If the application uses a partitioned disk, you must install MFS on a partition manager device driver. The partition manager device driver can create partitions on the disk if there are none. It can also remove partitions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Usage of &lt;EM&gt;partition_num &lt;/EM&gt;parameter is deprecated - &lt;EM&gt;_io_mfs_install &lt;/EM&gt;should obtain handle to partition manager associated with particular partition as &lt;EM&gt;dev_fd&lt;/EM&gt;. &lt;EM&gt;partition_num &lt;/EM&gt;parameter should be set to 0 which instructs MFS to simply use the &lt;EM&gt;dev_fd &lt;/EM&gt;as underlying device.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Return Codes&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Returns a &lt;STRONG&gt;uint32_t &lt;/STRONG&gt;error code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;IO_EOF&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The &lt;STRONG&gt;FILE_PTR &lt;/STRONG&gt;passed into &lt;STRONG&gt;_io_mfs_install() &lt;/STRONG&gt;was NULL. The error is returned by the input/output subsystem of the MQX Real-Time Operating System.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_ERROR_UNKNOWN_FS_VERSION&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— MFS was installed on a disk using the FAT32 file system, and the FAT32 version is incompatible with the MFS FAT32 version (version zero).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_INSUFFICIENT_MEMORY&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— MFS could not allocate memory for required structures.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_NO_ERROR&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The function call was successful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_NOT_A_DOS_DISK&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The device, on which MFS is being installed is not a valid DOS device. The device must be formatted (by an input/output control command).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_NOT_INITIALIZED&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The MFS device name did not end with colon (&lt;/SPAN&gt;&lt;EM style="font-size: 9.0pt; font-family: 'LucidaSans-TypewriterOblique','sans-serif';"&gt;:&lt;/EM&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_READ_FAULT&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The lower-level device driver could not read from the disk. The error is returned from the device, over which MFS is installed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;MFS_SECTOR_NOT_FOUND&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The error is returned from the device, over which, MFS is installed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;• &lt;EM&gt;PGMR_INVALID_PARTITION&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;— The partition number specified was that of an invalid partition. The partition does not exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Example&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Install MFS on a RAM disk with no partitions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/* Install the memory device: */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;error_code = _io_mem_install("mfsram:",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;NULL, MFS_format.BYTES_PER_SECTOR * RAMDISK_LENGTH1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;if ( error_code != MQX_OK ) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;printf("Error installing device.\nError: %d\n", error_code);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;_mqx_exit(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/* Open the device on which MFS will be installed: */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;dev_handle1 = fopen("mfsram:", 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;if ( dev_handle1 == NULL ) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;printf("\nUnable to open RAM disk device");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;_task_block();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/* Install MFS: */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;error_code = _io_mfs_install(dev_handle1, "MFS1:", 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="ES-MX" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;if ((error_code != MFS_NO_ERROR) &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="ES-MX" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;(error_code != MFS_NOT_A_DOS_DISK)) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;printf("FATAL error while initializing: \n");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;_mqx_exit(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;printf("Initialized MFS1%s\n");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 22:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-NOT-A-DOS-DISK/m-p/354657#M11566</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-10-27T22:52:32Z</dc:date>
    </item>
  </channel>
</rss>

