Patch from Mike Snitzer <snitzer@gmail.com>:

Please see the attached patch for the following crash with busybox'
2.6 rmmod support
This commit is contained in:
Robert Griebl 2004-07-20 18:36:51 +00:00
parent 809387fe9e
commit bd8dd1e763

View File

@ -106,13 +106,13 @@ extern int rmmod_main(int argc, char **argv)
bb_show_usage(); bb_show_usage();
{ {
for (n = optind; n < argc; n++) {
#ifdef CONFIG_FEATURE_2_6_MODULES #ifdef CONFIG_FEATURE_2_6_MODULES
char module_name[strlen(argv[n]) + 1]; char module_name[strlen(argv[n]) + 1];
filename2modname(module_name, argv[n]); filename2modname(module_name, argv[n]);
#else #else
#define module_name argv[n] #define module_name argv[n]
#endif #endif
for (n = optind; n < argc; n++) {
if (syscall(__NR_delete_module, module_name, flags) < 0) { if (syscall(__NR_delete_module, module_name, flags) < 0) {
bb_perror_msg("%s", argv[n]); bb_perror_msg("%s", argv[n]);
ret = EXIT_FAILURE; ret = EXIT_FAILURE;