<br>
<div class="gmail_quote">On Fri, Apr 1, 2011 at 3:32 PM, Sengottuvelan S <span dir="ltr"><<a href="mailto:sengottuvelan.s@gmail.com">sengottuvelan.s@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi All,</div>
<div> </div>
<div>I am trying to access /dev/mem in my user process. I could not access because not a p<font size="3"><font face="Calibri">rivileged access. I tried to use iopl(3) call in linux 2.6, but i am getting unresolved symbol for this. Is any other way to get access in user process. I am not sure how to solve this. Can you someone throw some light on this.</font></font></div>
<div> </div>
<div> if(iopl(3)){<br> fprintf(stderr, "Cannot get I/O permissions (being root helps)");<br> return -1;<br> }<br><br clear="all"> if ((fd = open("/dev/mem", O_RDWR | O_SYNC)) < 0) {<br>
fprintf(stderr, "Failed to open /dev/mem");<br> return -1;<br> }<br><br>-- <br>Regards,<br>S. Sengottuvelan.<br></div></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>S. Sengottuvelan.<br>