From dc15674f9ff9b6b02cd99367f67bb1062b08c7bb Mon Sep 17 00:00:00 2001 From: erich Date: Fri, 26 Apr 1996 18:39:48 +0000 Subject: [PATCH] changed a strchr to a strrchr so that modules with a `.' in the path can be loaded (e.g. ./mymod.o) --- sbin/modload/modload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c index c8f737f32196..9f37f9c88f3e 100644 --- a/sbin/modload/modload.c +++ b/sbin/modload/modload.c @@ -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 @@ -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");