<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; gulpreet.e2</title>
	<atom:link href="https://www.emblogic.com/blog/author/gulpreet-e2/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Read Write driver</title>
		<link>https://www.emblogic.com/blog/09/read-write-driver/</link>
		<comments>https://www.emblogic.com/blog/09/read-write-driver/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 13:02:48 +0000</pubDate>
		<dc:creator><![CDATA[gulpreet.e2]]></dc:creator>
		
		<guid isPermaLink="false">http://emblogic.org/blog/?p=129</guid>
		<description><![CDATA[Application program for read/write #include&#60;stdio.h&#62; #include&#60;fcntl.h&#62;       // For open() #include&#60;unistd.h&#62;      // For read() #include&#60;string.h&#62; int main(int charc, char * argv[]) { int fd; char wbuf[40]; char rbuf[40]; ssize_t rd,wr; strcpy(wbuf,&#8221;HELLO KERNEL!!\n&#8221;); strcpy(rbuf,&#8221;&#8221;); fd = open(argv[1], O_RDWR); printf(&#8220;File Descp. = %d\n&#8221;,fd); &#8230; <a href="https://www.emblogic.com/blog/09/read-write-driver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Application program for read/write</p>
<p>#include&lt;stdio.h&gt;<br />
#include&lt;fcntl.h&gt;       // For open()<br />
#include&lt;unistd.h&gt;      // For read()<br />
#include&lt;string.h&gt;</p>
<p>int main(int charc, char * argv[])<br />
{<br />
int fd;<br />
char wbuf[40];<br />
char rbuf[40];<br />
ssize_t rd,wr;</p>
<p>strcpy(wbuf,&#8221;HELLO KERNEL!!\n&#8221;);<br />
strcpy(rbuf,&#8221;&#8221;);<br />
fd = open(argv[1], O_RDWR);<br />
printf(&#8220;File Descp. = %d\n&#8221;,fd);</p>
<p>wr = write(fd, wbuf, sizeof (wbuf));<br />
printf(&#8220;\nData in file is: \n%s\n&#8221;,wbuf);</p>
<p>fd = open(argv[1], O_RDWR);<br />
printf(&#8220;File Descp. = %d\n&#8221;,fd);</p>
<p>rd = read(fd, rbuf, sizeof (rbuf));<br />
printf(&#8220;\nrd = %d \n&#8221;, rd);<br />
printf(&#8220;%s\n&#8221;, rbuf);</p>
<p>close(fd);<br />
printf(&#8220;File closed&#8221;);<br />
return 0;</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/read-write-driver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
