<div>Hi Ed,</div>
<div> </div>
<div>I just checked too I got this suggestion and tried, it is also not working :(</div>
<div> </div>
<div>I am very amazed why it is not working? So i am trying following now--<br> </div>
<div>#include<stdio.h><br>>><br>>> void main()<br>>> {<br>>> FILE *Gfile;<br>>> if ((Gfile = fopen("/media/mmc1/test.txt", "<font color="#3366ff">w+"))</font> == NULL)<br>
>> {<br>>> printf("Error in file creation");<br>>> }<br>>><br>>> if(Gfile)<br>>> fprintf(Gfile,"%02x",0x10);<br>>> fclose(Gfile);<br>
>> }<br> </div>
<div>Regards,</div>
<div>Nisha<br> </div>
<div><span class="gmail_quote">On 7/5/08, <b class="gmail_sendername"><a href="mailto:ed@okerson.com">ed@okerson.com</a></b> <<a href="mailto:ed@okerson.com">ed@okerson.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Nisha,<br><br>Try changing the mode flags to "w+", I don't think "wt+" is valid. If you<br>
do a `man fopen` on a linux machine you will see there is no "t" option<br>for mode flags.<br><br>Ed Okerson<br><br>> Hi All,<br>><br>> I checked permission issue I also tried locking/ unlocaking the memory<br>
> card<br>> but program below is not working..<br>><br>> I have permission of writing but it is not generating a simple text file<br>> from the following c program which works<br>><br>> perfectly fine into maemo ARMEL enviornment so called N800 replica.. What<br>
> could be the issue?<br>><br>> Any inputs will be highly appreciated.......<br>><br>> Regards,<br>> Nisha<br>><br>><br>> On 7/5/08, nisha jain <<a href="mailto:jain61@gmail.com">jain61@gmail.com</a>> wrote:<br>
>><br>>> Hi All,<br>>><br>>> I just checked in N800 the following program for writing into a file<br>>> which<br>>><br>>> doesn't work.... Any clues what is going wrong? I neither get any error<br>
>> not<br>>> it is<br>>><br>>> creating a file and writing into it.........<br>>><br>>> #include<stdio.h><br>>><br>>> void main()<br>>> {<br>>> FILE *Gfile;<br>
>> if ((Gfile = fopen("/media/mmc1/test.txt", "wt+")) == NULL)<br>>> {<br>>> printf("Error in file creation");<br>>> }<br>>><br>>> if(Gfile)<br>
>> fprintf(Gfile,"%02x",0x10);<br>>> fclose(Gfile);<br>>> }<br>>><br>>> Regards,<br>>> Nisha<br>>><br>>> On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <<a href="mailto:jain61@gmail.com">jain61@gmail.com</a>> wrote:<br>
>><br>>>> Hi Gray,<br>>>><br>>>> I checked the file pointer if it is NULL I am printing error message<br>>>> and<br>>>> returning too.<br>>>><br>>>> Also i am checking while writing into a file that file pointer is not<br>
>>> NULL.<br>>>><br>>>> I have tested it on mameo (ARMEL) enviornment and it is working<br>>>> absolutely<br>>>> fine<br>>>><br>>>> I am not able to understand while after porting to N800 it doesn't show<br>
>>> up<br>>>> any file created on flash<br>>>><br>>>> at least it should create an empty file......Does there is some<br>>>> restriciton in writing into flash?<br>>>><br>
>>> Regards,<br>>>> Nisha<br>>>><br>>>><br>>>> On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <<a href="mailto:liquid@gmail.com">liquid@gmail.com</a>> wrote:<br>>>><br>
>>>> nisha,<br>>>>><br>>>>> check you have included appended the filename on the end of the path<br>>>>> in<br>>>>> your adjusted program.<br>>>>> Check the return values of all functions called and do not assume<br>
>>>> success<br>>>>> for anything.<br>>>>> Most importantly, put printf("fn msg/n"); calls around your program<br>>>>> at<br>>>>> relevant points.<br>
>>>> The printfs will help you debug by showing you where your software got<br>>>>> to<br>>>>> and optionally whatever additional information you want to display.<br>>>>><br>
>>>> Gary (lcuk on maemo)<br>>>>><br>>>>> On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <<a href="mailto:jain61@gmail.com">jain61@gmail.com</a>> wrote:<br>>>>><br>>>>><br>
>>>>> hi All,<br>>>>>><br>>>>>> I wrote a program which is collecting some data and creating text<br>>>>>> file<br>>>>>> to write into.<br>>>>>><br>
>>>>> I am successfully able to run and execute it in the VmWare maemo<br>>>>>> enviornment without any problem.<br>>>>>><br>>>>>> When i deployed it into N800 I am getting segmentation fault this<br>
>>>>> application I checked in ARMEL compiled<br>>>>>><br>>>>>> mode on VmWare... I am not sure how to debug it as it is working fine<br>>>>>> in<br>>>>>> the Maemo enviornment but crashes<br>
>>>>><br>>>>>> on the actual N800 device... Only change is the file created in<br>>>>>><br>>>>>> using like fopen ("filename", "wt");<br>>>>>><br>
>>>>> in the Maemo and in case of N800 fope("/media/mmc1", "wt")<br>>>>>><br>>>>>> I tired checking if file gets created to /media/mmc1 or not but it<br>>>>>> doesn't get created their at all.................<br>
>>>>><br>>>>>> Let me know if some one has idea?<br>>>>>><br>>>>>> Regards,<br>>>>>> Nisha<br>>>>>><br>>>>>><br>>>>>> _______________________________________________<br>
>>>>> maemo-developers mailing list<br>>>>>> <a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>>>>>> <a href="https://lists.maemo.org/mailman/listinfo/maemo-developers">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
>>>>><br>>>>>><br>>>>><br>>>><br>>>><br>>><br>>><br>> _______________________________________________<br>> maemo-developers mailing list<br>> <a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
> <a href="https://lists.maemo.org/mailman/listinfo/maemo-developers">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>><br><br><br></blockquote></div><br>