mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-12-03 21:26:55 +07:00
missing: Don't call syscall() with syscallno == -1
Reported-by: Jean-Francis Roy <jeanfrancis@funtoo.org> Reported-by: Jan Luebbe <jlu@pengutronix.de>
This commit is contained in:
parent
1114e781ad
commit
38829712e5
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
@ -15,13 +16,14 @@
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user