Hi Rusty,
It seems we cannot unload modules if they have a '-' in their name.
filename2modname() in rmmod.c converts a '-' in the filename
to '_'. Why? Are dashes not allowed as part of module names?
For eg: (kernel 2.5.52/module-init-tools 0.9.3)
Module Size Used by
probe-test 943 0
probe-test 943 0
module-init-tools version 0.9.3
ERROR: Module probe_test does not exist in /proc/modules
^note this
Editing filename2modname() to remove this special test for
'-' seems to fix it. But, this is done explicitly, so
I wonder if there is a deeper meaning to this. Can you
please take a look and explain?
Thanks,
Vamsi.
--
Vamsi Krishna S.
Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: +91 80 5044959
--
--- rmmod-old.c 2002-12-13 21:11:57.000000000 +0530
else
afterslash++;
- /* stop at first . */
+ /* Convert to underscores, stop at first . */
for (i = 0; afterslash[i] && afterslash[i] != '.'; i++) {
- modname[i] = afterslash[i];
+ if (afterslash[i] == '-')
+ modname[i] = '_';
+ else
+ modname[i] = afterslash[i];
}
modname[i] = '\0';
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/