aboutsummaryrefslogtreecommitdiff
path: root/modutils/modutils.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-17 18:46:06 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-17 18:46:06 +0200
commitee47f6e44f1a33146e26c7410ade10a98f78ead1 (patch)
tree0d86e43e6c6162dbf64f9bf01374abaffec3179b /modutils/modutils.h
parenta5bdbe10877e2e53aaba051eddfd5d47520657f5 (diff)
downloadbusybox-w32-ee47f6e44f1a33146e26c7410ade10a98f78ead1.tar.gz
busybox-w32-ee47f6e44f1a33146e26c7410ade10a98f78ead1.tar.bz2
busybox-w32-ee47f6e44f1a33146e26c7410ade10a98f78ead1.zip
modprobe: correct exitcode handling and error messages with respect to -q
function old new delta do_modprobe 319 339 +20 bb_delete_module 10 26 +16 moderror 62 71 +9 bb_init_module 112 119 +7 modprobe_main 488 494 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 58/0) Total: 58 bytes Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils/modutils.h')
-rw-r--r--modutils/modutils.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/modutils/modutils.h b/modutils/modutils.h
index 8cca5ccfe..1cf4bba95 100644
--- a/modutils/modutils.h
+++ b/modutils/modutils.h
@@ -17,7 +17,6 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
17 * internally for the maximum alias name length, which can be quite long */ 17 * internally for the maximum alias name length, which can be quite long */
18#define MODULE_NAME_LEN 256 18#define MODULE_NAME_LEN 256
19 19
20const char *moderror(int err) FAST_FUNC;
21void replace(char *s, char what, char with) FAST_FUNC; 20void replace(char *s, char what, char with) FAST_FUNC;
22char *replace_underscores(char *s) FAST_FUNC; 21char *replace_underscores(char *s) FAST_FUNC;
23int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC; 22int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC;
@@ -52,8 +51,19 @@ enum {
52#endif 51#endif
53}; 52};
54 53
54/* Return:
55 * 0 on success,
56 * -errno on open/read error,
57 * errno on init_module() error
58 */
55int FAST_FUNC bb_init_module(const char *module, const char *options); 59int FAST_FUNC bb_init_module(const char *module, const char *options);
60/* Return:
61 * 0 on success,
62 * errno on init_module() error
63 */
56int FAST_FUNC bb_delete_module(const char *module, unsigned int flags); 64int FAST_FUNC bb_delete_module(const char *module, unsigned int flags);
65/* Translates error return to a string */
66const char *moderror(int err) FAST_FUNC;
57 67
58#if ENABLE_FEATURE_2_4_MODULES 68#if ENABLE_FEATURE_2_4_MODULES
59int FAST_FUNC bb_init_module_24(const char *module, const char *options); 69int FAST_FUNC bb_init_module_24(const char *module, const char *options);