Hello i wrote a kernel module
and when i compiled it using make
it gave this type of errors
where i am unable to comprehend why this storage class error is coming in
very simple functions

static int myfs_init(void)
{
.
.
.

}
static void myfs_exit(void)
{
.
.
.
}

module_init(myfs_init);
module_exit(myfs_exit);






 error: invalid storage class for function ‘myfs_exit’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:481: error: invalid
storage class for function ‘init_myfs_inodecache’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:493: error: invalid
storage class for function ‘myfs_init’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:507: error: invalid
storage class for function ‘__inittest’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:507: warning:
‘alias’ attribute ignored
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:508: error: invalid
storage class for function ‘__exittest’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:508: warning: ISO
C90 forbids mixed declarations and code
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:508: warning:
‘alias’ attribute ignored
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:510: warning: ISO
C90 forbids mixed declarations and code
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:512: error: expected
declaration or statement at end of input



can someone help in telling in which situation this error comes ?



-- 
Thanks & Regards
Nidhi Mittal Hada

Reply via email to