Browse Source

kmodloader: modprobe: return 0 for loaded modules

This is the default behaviour with modprobe from kmod package [1] unless
it is explicitly told that the module is to be loaded for --first-time

 [1] http://www.kernel.org/pub/linux/utils/kernel/kmod/

Fixes FS#433

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Yousong Zhou 7 years ago
parent
commit
21a4bd0406
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kmodloader.c

+ 1 - 1
kmodloader.c

@@ -837,7 +837,7 @@ static int main_modprobe(int argc, char **argv)
 	if (m && m->state == LOADED) {
 		if (!quiet)
 			ULOG_ERR("%s is already loaded\n", name);
-		return -1;
+		return 0;
 	} else if (!m) {
 		if (!quiet)
 			ULOG_ERR("failed to find a module named %s\n", name);