[BusyBox-cvs] CVS update of busybox/modutils (rmmod.c)

Robert Griebl sandman at codepoet.org
Tue Jul 20 18:36:53 UTC 2004


    Date: Tuesday, July 20, 2004 @ 12:36:52
  Author: sandman
    Path: /var/cvs/busybox/modutils

Modified: rmmod.c (1.30 -> 1.31)

Patch from Mike Snitzer <snitzer at gmail.com>:
Please see the attached patch for the following crash with busybox'
2.6 rmmod support


Index: busybox/modutils/rmmod.c
diff -u busybox/modutils/rmmod.c:1.30 busybox/modutils/rmmod.c:1.31
--- busybox/modutils/rmmod.c:1.30	Tue Jul 20 04:05:13 2004
+++ busybox/modutils/rmmod.c	Tue Jul 20 12:36:51 2004
@@ -106,13 +106,13 @@
 		bb_show_usage();
 
 	{
+		for (n = optind; n < argc; n++) {
 #ifdef CONFIG_FEATURE_2_6_MODULES
-		char module_name[strlen(argv[n]) + 1];
-		filename2modname(module_name, argv[n]);
+			char module_name[strlen(argv[n]) + 1];
+			filename2modname(module_name, argv[n]);
 #else
 #define module_name		argv[n]
 #endif
-		for (n = optind; n < argc; n++) {
 			if (syscall(__NR_delete_module, module_name, flags) < 0) {
 				bb_perror_msg("%s", argv[n]);
 				ret = EXIT_FAILURE;



More information about the busybox-cvs mailing list