summaryrefslogtreecommitdiff
path: root/modutils/modutils.h
diff options
context:
space:
mode:
authorPascal Bellard2010-06-07 01:16:45 +0200
committerDenys Vlasenko2010-06-07 01:18:53 +0200
commitb82b34e06d0f8b91a1a30a847e0b1dd80ed0a046 (patch)
tree17527de763a7e688023cb72a8ead602293b3b7b9 /modutils/modutils.h
parente3657dcdd655ec96fc6bf38c40dd6a6f015a83de (diff)
downloadbusybox-b82b34e06d0f8b91a1a30a847e0b1dd80ed0a046.zip
busybox-b82b34e06d0f8b91a1a30a847e0b1dd80ed0a046.tar.gz
modprobe: add support for -l and -s. Remove some unsupported options
Fixed some goofs in help text function old new delta modprobe_main 494 653 +159 packed_usage 27129 27145 +16 insmod_main 98 95 -3 Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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 131a508..d46870c 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