From ee47f6e44f1a33146e26c7410ade10a98f78ead1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 17 Jun 2009 18:46:06 +0200 Subject: 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 Signed-off-by: Denys Vlasenko --- modutils/modutils.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modutils/modutils.h') 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 * internally for the maximum alias name length, which can be quite long */ #define MODULE_NAME_LEN 256 -const char *moderror(int err) FAST_FUNC; void replace(char *s, char what, char with) FAST_FUNC; char *replace_underscores(char *s) FAST_FUNC; int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC; @@ -52,8 +51,19 @@ enum { #endif }; +/* Return: + * 0 on success, + * -errno on open/read error, + * errno on init_module() error + */ int FAST_FUNC bb_init_module(const char *module, const char *options); +/* Return: + * 0 on success, + * errno on init_module() error + */ int FAST_FUNC bb_delete_module(const char *module, unsigned int flags); +/* Translates error return to a string */ +const char *moderror(int err) FAST_FUNC; #if ENABLE_FEATURE_2_4_MODULES int FAST_FUNC bb_init_module_24(const char *module, const char *options); -- cgit v1.2.3