aboutsummaryrefslogtreecommitdiff
path: root/modutils/modutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/modutils.h')
-rw-r--r--modutils/modutils.h41
1 files changed, 18 insertions, 23 deletions
diff --git a/modutils/modutils.h b/modutils/modutils.h
index 131a5087b..d46870ca6 100644
--- a/modutils/modutils.h
+++ b/modutils/modutils.h
@@ -23,32 +23,27 @@ int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC;
char *filename2modname(const char *filename, char *modname) FAST_FUNC;
char *parse_cmdline_module_options(char **argv) FAST_FUNC;
+/* insmod for 2.4 and modprobe's options (insmod 2.6 has no options at all): */
#define INSMOD_OPTS \
- "vq" \
- IF_FEATURE_2_4_MODULES("sLo:fkx") \
- IF_FEATURE_INSMOD_LOAD_MAP("m")
-
-#define INSMOD_ARGS IF_FEATURE_2_4_MODULES(, NULL)
+ "vqs" \
+ IF_FEATURE_2_4_MODULES("Lfkx" IF_FEATURE_INSMOD_LOAD_MAP("m"))
+#define INSMOD_ARGS /* (was meant to support -o NAME) , NULL */
enum {
- INSMOD_OPT_VERBOSE = 0x0001,
- INSMOD_OPT_SILENT = 0x0002,
- INSMOD_OPT_SYSLOG = 0x0004 * ENABLE_FEATURE_2_4_MODULES,
- INSMOD_OPT_LOCK = 0x0008 * ENABLE_FEATURE_2_4_MODULES,
- INSMOD_OPT_OUTPUTNAME = 0x0010 * ENABLE_FEATURE_2_4_MODULES,
- INSMOD_OPT_FORCE = 0x0020 * ENABLE_FEATURE_2_4_MODULES,
- INSMOD_OPT_KERNELD = 0x0040 * ENABLE_FEATURE_2_4_MODULES,
- INSMOD_OPT_NO_EXPORT = 0x0080 * ENABLE_FEATURE_2_4_MODULES,
- INSMOD_OPT_PRINT_MAP = 0x0100 * ENABLE_FEATURE_INSMOD_LOAD_MAP,
-#if ENABLE_FEATURE_2_4_MODULES
-# if ENABLE_FEATURE_INSMOD_LOAD_MAP
- INSMOD_OPT_UNUSED = 0x0200,
-# else
- INSMOD_OPT_UNUSED = 0x0100,
-# endif
-#else
- INSMOD_OPT_UNUSED = 0x0004,
-#endif
+ INSMOD_OPT_VERBOSE = (1 << 0),
+ INSMOD_OPT_SILENT = (1 << 1),
+ INSMOD_OPT_SYSLOG = (1 << 2),
+ //INSMOD_OPT_OUTPUTNAME = (1 << x) - not supported yet
+ INSMOD_OPT_LOCK = (1 << 3) * ENABLE_FEATURE_2_4_MODULES,
+ INSMOD_OPT_FORCE = (1 << 4) * ENABLE_FEATURE_2_4_MODULES,
+ INSMOD_OPT_KERNELD = (1 << 5) * ENABLE_FEATURE_2_4_MODULES,
+ INSMOD_OPT_NO_EXPORT = (1 << 6) * ENABLE_FEATURE_2_4_MODULES,
+ INSMOD_OPT_PRINT_MAP = (1 << 7) * ENABLE_FEATURE_INSMOD_LOAD_MAP,
+ INSMOD_OPT_UNUSED =
+ (INSMOD_OPT_PRINT_MAP ? INSMOD_OPT_PRINT_MAP
+ : INSMOD_OPT_NO_EXPORT ? INSMOD_OPT_NO_EXPORT
+ : INSMOD_OPT_SYSLOG
+ ) << 1
};
#if ENABLE_FEATURE_INSMOD_TRY_MMAP