summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/create_module.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-28 11:57:15 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-30 18:43:55 +0200
commit6884573b944c79b7d0049334eaa78dae2692b874 (patch)
treea13b633812fa6d4ce66c089ee7493fd9b711073f /libc/sysdeps/linux/common/create_module.c
parent15186b99774df74cf8ab02acd1a3f0ffd4c54ca1 (diff)
remove linux kernel 2.4 modules support
Diffstat (limited to 'libc/sysdeps/linux/common/create_module.c')
-rw-r--r--libc/sysdeps/linux/common/create_module.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/libc/sysdeps/linux/common/create_module.c b/libc/sysdeps/linux/common/create_module.c
deleted file mode 100644
index 5bded5636..000000000
--- a/libc/sysdeps/linux/common/create_module.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * create_module syscall for uClibc
- *
- * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <features.h>
-#define __need_size_t
-#include <stddef.h>
-#include <errno.h>
-#include <sys/syscall.h>
-
-#ifdef __NR_create_module
-
-unsigned long create_module(const char *name, size_t size);
-
-#if defined(__UCLIBC_BROKEN_CREATE_MODULE__)
-# define __NR___create_module __NR_create_module
-static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size)
-/* By checking the value of errno, we know if we have been fooled
- * by the syscall2 macro making a very high address look like a
- * negative, so we fix it up here. */
-unsigned long create_module(const char *name, size_t size)
-{
- long ret = __create_module(name, size);
-
- /* Jump through hoops to fixup error return codes */
- if (ret == -1 && errno > 125) {
- ret = -errno;
- __set_errno(0);
- }
- return ret;
-}
-#elif defined(__UCLIBC_SLIGHTLY_BROKEN_CREATE_MODULE__)
-# define __NR___create_module __NR_create_module
-/* Alpha doesn't have the same problem, exactly, but a bug in older
- kernels fails to clear the error flag. Clear it here explicitly. */
-static __inline__ _syscall4(unsigned long, __create_module, const char *, name,
- size_t, size, size_t, dummy, size_t, err)
-unsigned long create_module(const char *name, size_t size)
-{
- return __create_module(name, size, 0, 0);
-}
-#else
-/* Sparc, MIPS, etc don't mistake return values for errors. */
-_syscall2(unsigned long, create_module, const char *, name, size_t, size)
-#endif
-
-#endif