Hi Vichy I found there are 2 errno.h we can include when coding. > #include <asm-generic/errno.h> and #include <linux/errno.h> > is there difference or rue I need to follow when I want to take > advantage of errno in kernel? >
Looking at my sources you should use linux/errno.h. When I look, I see the following: *linux/errno.h:* #ifndef _LINUX_ERRNO_H #define _LINUX_ERRNO_H #include <asm/errno.h> #endif *asm/errno.h:* #include <asm-generic/errno.h> *asm-generic/errno.h:* #ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENERIC_ERRNO_H #include <asm-generic/errno-base.h> #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ #define ENOSYS 38 /* Function not implemented */ ... So, it only makes sense to use linux/errno.h in my opinion. Hope this helps, Michael Michael F Clarke MEng Software Engineering PhD Candidate, Aberystwyth University Help fight cancer with your spare CPU time: http://www.grid.org/services/teams/team.htm?id=AD952B24-3A86-4C79-9EF8-F5C92F938018
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies