From: Lucas De Marchi Date: Sat, 11 May 2013 03:50:32 +0000 (-0300) Subject: Revert "missing: Don't call syscall() with syscallno == -1" X-Git-Tag: v14~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03f7dfb868b33ee73f2b1e36ab4a1bfa440dcd2c;p=platform%2Fupstream%2Fkmod.git Revert "missing: Don't call syscall() with syscallno == -1" This reverts commit 38829712e5c411bc250aeae142fc6bf06e794d58. It fixes the problem, but it breaks the testsuite for those who don't have __NR_finit_module. The testsuite would have to make the same check. Instead, I'm reverting this change and I'm going to apply another patch from Jan Luebbe who got this right from the beginning. --- diff --git a/libkmod/missing.h b/libkmod/missing.h index b31af84..edb88b9 100644 --- a/libkmod/missing.h +++ b/libkmod/missing.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include @@ -16,14 +15,13 @@ # define MODULE_INIT_IGNORE_VERMAGIC 2 #endif +#ifndef __NR_finit_module +# define __NR_finit_module -1 +#endif + #ifndef HAVE_FINIT_MODULE static inline int finit_module(int fd, const char *uargs, int flags) { -#ifndef __NR_finit_module - errno = ENOSYS; - return -1; -#else return syscall(__NR_finit_module, fd, uargs, flags); -#endif } #endif