changed a strchr to a strrchr so that modules with a `.' in the path

can be loaded (e.g. ./mymod.o)
This commit is contained in:
erich 1996-04-26 18:39:48 +00:00
parent 05f1ff2434
commit dc15674f9f

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: modload.c,v 1.9 1995/10/28 13:06:11 peter Exp $
* $Id: modload.c,v 1.10 1995/10/28 17:06:05 peter Exp $
*/
#include <stdio.h>
@ -225,7 +225,7 @@ main(argc, argv)
err(3, _PATH_LKM);
fileopen |= DEV_OPEN;
p = strchr(modobj, '.');
p = strrchr(modobj, '.');
if (!p || strcmp(p, ".o"))
errx(2, "module object must end in .o");