Here is the macro
Now this driver is at 2.6.18 kernel. I have to upgrade it to 3.8.3.
As I have said
"current" in kernel is a global macro, that always point to the "struct task_struct * " of the currently executing task (for details on task_struct, ref Robert Love, pg 24-27).
Now if you look at thse two lines-
current->fsuid = 0; \
current->fsgid = 0
Now task struct does not contain fsuid and fsgid, instead you have
struct cred containing fsuid and fsgid.
So normal method is
struct cred *new1;
new1 =prepare_creds();
//make changes to any member of this structure
commit_creds(new1);
new1 =prepare_creds();
//make changes to any member of this structure
commit_creds(new1);
Now this above action I need to perform through a macro, in order to bring minimal changes to the driver.
Now, I have told everything. Can someone suggest something that might work.
Regards,
Saket Sinha
On Mon, Jul 15, 2013 at 5:07 PM, Mandeep Sandhu <mandeepsandhu.chd@xxxxxxxxx> wrote:
On Mon, Jul 15, 2013 at 4:50 PM, Saket Sinha <saket.sinha89@xxxxxxxxx> wrote:
Mandip:Error is expected error or declaration at the end of inputWithout looking at the code, it's difficult to comment further.Can you attach a small compilable example which exhibits the error?
-mandeepAnish:that '\' should not be there first of all and even if I put it same error
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies