On Fri, 2007-02-09 at 22:12 +0000, David Woodhouse wrote: > > We could _also_ do with a way to warn about unimplemented syscalls on > any given architecture. I'm thinking about something along the lines > of > a kernel/syscalls.c containing nothing but... > > #include <asm/unistd.h> > > #ifndef __NR_sys_foo > #warning The sys_foo system call is not implemented on this > architecture > #endif > > Ideally, that wants to be auto-generated from the union of all > <asm-*/unistd.h> files, but in practice I suspect we could do it just > from <asm-i386/unistd.h>. Even I usually manage to add new syscalls on > i386 after I've done PowerPC.
Realistically speaking, I'm not going to have time to do anything useful with this before I disappear for a week starting tomorrow. But in case it helps, I'll throw this in to see if it inspires anyone... ( echo -e "#include <asm/unistd.h>\n#include <asm-generic/optional-syscalls.h>" ; sed -n '/^#define/s/[^_]*__NR_ \([^[:space:]]*\).*/#if !defined (__NR_\1) \&\& !defined (__IGNORE_ \1)\n#warning System call \1 is not implemented\n#endif/p' include/asm-i386/unistd.h ) > kernel/syscalls.c Coupled with an include/optional-syscalls.h which defines __IGNORE_vm86, __IGNORE_vm86old and then on 64-bit machines a bunch more __IGNORE_stat64 et al., that should mostly do the trick... -- dwmw2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/