Hi All,<br><br>I just checked in N800 the following program for writing into a file which <br><br>doesn't work.... Any clues what is going wrong? I neither get any error not 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><div class="gmail_quote">On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <<a href="mailto:jain61@gmail.com">jain61@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Gray,<br><br>I checked the file pointer if it is NULL I am printing error message and returning too.<br>
<br>Also i am checking while writing into a file that file pointer is not NULL.<br><br>I have tested it on mameo (ARMEL) enviornment and it is working absolutely fine <br>
<br>I am not able to understand while after porting to N800 it doesn't show up any file created on flash<br><br>at least it should create an empty file......Does there is some restriciton in writing into flash?<br><br>
Regards,<br><font color="#888888">Nisha</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <<a href="mailto:liquid@gmail.com" target="_blank">liquid@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
nisha,<br><br>check you have included appended the filename on the end of the path in your adjusted program.<br>Check the return values of all functions called and do not assume success for anything.<br>Most importantly, put printf("fn msg/n"); calls around your program at relevant points.<br>
The printfs will help you debug by showing you where your software got to and optionally whatever additional information you want to display.<br><br>Gary (lcuk on maemo)<br><br><div class="gmail_quote"><div><div></div><div>
On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <<a href="mailto:jain61@gmail.com" target="_blank">jain61@gmail.com</a>> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>hi All,<br><br>I wrote a program which is collecting some data and creating text file to write into.<br>
<br>I am successfully able to run and execute it in the VmWare maemo enviornment without any problem.<br><br>When i deployed it into N800 I am getting segmentation fault this application I checked in ARMEL compiled <br>
<br>mode on VmWare... I am not sure how to debug it as it is working fine in 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 doesn't get created their at all.................<br><br>Let me know if some one has idea?<br>
<br>Regards,<br><font color="#888888">Nisha<br>
</font><br></div></div>_______________________________________________<br>
maemo-developers mailing list<br>
<a href="mailto:maemo-developers@maemo.org" target="_blank">maemo-developers@maemo.org</a><br>
<a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
<br></blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>