<div>Hi All,</div>
<div>&nbsp;</div>
<div>I checked permission issue I also tried locking/ unlocaking the memory card but program below is not working..</div>
<div>&nbsp;</div>
<div>I have permission of writing but it is not generating a simple text file from the following c program which works </div>
<div>&nbsp;</div>
<div>perfectly fine into maemo ARMEL enviornment so called N800 replica.. What could be the issue?</div>
<div>&nbsp;</div>
<div>Any inputs will be highly appreciated.......</div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>Nisha<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 7/5/08, <b class="gmail_sendername">nisha jain</b> &lt;<a href="mailto:jain61@gmail.com">jain61@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi All,<br><br>I just checked in N800 the following program for writing into a file which <br><br>doesn&#39;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&lt;stdio.h&gt;<br><br>void main()<br>{<br>&nbsp;&nbsp;&nbsp; FILE *Gfile;<br>&nbsp;&nbsp;&nbsp; if ((Gfile = fopen(&quot;/media/mmc1/test.txt&quot;, &quot;wt+&quot;)) == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; printf(&quot;Error in file creation&quot;);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; if(Gfile)<br>&nbsp;&nbsp;&nbsp; fprintf(Gfile,&quot;%02x&quot;,0x10);<br>&nbsp;&nbsp;&nbsp; fclose(Gfile);<br>}<br><br>Regards,<br><span class="sg">Nisha</span> 
<div><span class="e" id="q_11af50f50e24d680_2"><br><br>
<div class="gmail_quote">On Sat, Jul 5, 2008 at 5:34 PM, nisha jain &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jain61@gmail.com" target="_blank">jain61@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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&#39;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><br><br>
<div class="gmail_quote">On Sat, Jul 5, 2008 at 2:29 PM, gary liquid &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:liquid@gmail.com" target="_blank">liquid@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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(&quot;fn msg/n&quot;);&nbsp; 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 &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jain61@gmail.com" target="_blank">jain61@gmail.com</a>&gt; wrote:<br>&nbsp;</div></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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 (&quot;filename&quot;, &quot;wt&quot;);<br>
<br>in the Maemo and in case of N800 fope(&quot;/media/mmc1&quot;, &quot;wt&quot;)<br><br>I tired checking if file gets created to /media/mmc1 or not but it doesn&#39;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>&nbsp;</div></div>_______________________________________________<br>maemo-developers mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:maemo-developers@maemo.org" target="_blank">maemo-developers@maemo.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" 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>&nbsp;</div></div></blockquote></div><br></span></div></blockquote></div><br>