<div dir="ltr">Here is the macro<div><a href="https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/hepunion.h#L393">https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/hepunion.h#L393</a><br></div><div>
<br></div><div>Now this driver is at 2.6.18 kernel. I have to upgrade it to 3.8.3.</div><div>As I have said</div><div><span style="font-family:arial,sans-serif;font-size:13px">&quot;current&quot; in kernel is a global macro, that always point to the &quot;struct task_struct * &quot; of the currently executing task (for details on task_struct, ref Robert Love, pg 24-27).</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><a href="https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/hepunion.h#L397">https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/hepunion.h#L397</a><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><br></div><div>Now if you look at thse two lines-</div><div><div><br></div><div>current-&gt;fsuid = 0;<span class="" style="white-space:pre">        </span>\</div><div>current-&gt;fsgid = 0</div></div><div><br>
</div><div>Now task struct does not contain fsuid and fsgid, instead you have </div><div>struct cred containing fsuid and fsgid.</div><div><a href="http://lxr.free-electrons.com/source/include/linux/cred.h#L102">http://lxr.free-electrons.com/source/include/linux/cred.h#L102</a><br>
</div><div><br></div><div>So normal method is </div><div><span style="font-family:arial,sans-serif;font-size:13px">struct cred *new1;</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">new1 =prepare_creds();</span><br style="font-family:arial,sans-serif;font-size:13px">
<font face="arial, sans-serif">//make changes to any member of this structure </font><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">commit_creds(new1);</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Now this above action I need to perform through a macro, in order to bring minimal changes to the driver.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">Now, I have told everything. Can someone suggest something that might work.</font></div><div><font face="arial, sans-serif"><br>
</font></div><div><font face="arial, sans-serif">Regards,</font></div><div><font face="arial, sans-serif">Saket Sinha</font></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 15, 2013 at 5:07 PM, Mandeep Sandhu <span dir="ltr">&lt;<a href="mailto:mandeepsandhu.chd@gmail.com" target="_blank">mandeepsandhu.chd@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><div class="im">On Mon, Jul 15, 2013 at 4:50 PM, Saket Sinha <span dir="ltr">&lt;<a href="mailto:saket.sinha89@gmail.com" target="_blank">saket.sinha89@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Mandip:</div><div style="font-family:arial,sans-serif;font-size:13px">

Error is expected error or declaration at the end of input</div></div></blockquote><div><br></div></div><div>Without looking at the code, it&#39;s difficult to comment further.<br><br></div><div>Can you attach a small compilable example which exhibits the error?<span class="HOEnZb"><font color="#888888"><br>

<br></font></span></div><span class="HOEnZb"><font color="#888888"><div>-mandeep<br><br></div></font></span><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-family:arial,sans-serif;font-size:13px">Anish:</div><div style="font-family:arial,sans-serif;font-size:13px">that &#39;\&#39; should not be there first of all and even if I put it same error</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div></div>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div>