1. manaila

    Thread Starter New Member

    Nov 19, 2010
    The embedded system that I am working on has a NAND flash memory which is divided into four MTD block partitions. in mtdblock2 there is a CRAMFS file system which comprises my source code. Now since cramfs is read-only, I want to permanently store some text files in mtdblock3 which is a YAFFS file system, allowing read and write. Then from the cramfs[mtdblock2] I want to access those files in [yaffs]mtdblock3 to perform read/write. For example I have the following C instruction, in my source code [mtdblock2], to open the file in mtdblock3:
    FILE*ft = fopen("/dev/mtdblock3/myfile.txt", "r+");
    So I get I get the error, that i am trying to access read-only system! If the file myfile.txt is in mtdblock3 yaffs partition, is its directory written as: /dev/mtdblock3/myfile.txt or what?