From owner-freebsd-current Fri Apr 26 09:16:59 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA16637 for current-outgoing; Fri, 26 Apr 1996 09:16:59 -0700 (PDT) Received: from bacall.lodgenet.com (bacall.lodgenet.com [205.138.147.242]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA16632 for ; Fri, 26 Apr 1996 09:16:55 -0700 (PDT) Received: (from mail@localhost) by bacall.lodgenet.com (8.6.12/8.6.12) id LAA29959 for ; Fri, 26 Apr 1996 11:14:42 -0500 Received: from garbo.lodgenet.com(204.124.123.250) by bacall via smap (V1.3) id sma029957; Fri Apr 26 11:14:20 1996 Received: from jake.lodgenet.com (jake.lodgenet.com [204.124.120.30]) by garbo.lodgenet.com (8.6.12/8.6.9) with ESMTP id LAA21718 for ; Fri, 26 Apr 1996 11:18:32 -0500 Received: from localhost (localhost [127.0.0.1]) by jake.lodgenet.com (8.7.5/8.6.12) with SMTP id LAA00651 for ; Fri, 26 Apr 1996 11:19:07 -0500 (CDT) Message-Id: <199604261619.LAA00651@jake.lodgenet.com> X-Authentication-Warning: jake.lodgenet.com: Host localhost [127.0.0.1] didn't use HELO protocol X-Mailer: exmh version 1.6.2 7/18/95 To: current@freebsd.org Subject: patch for modload Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 26 Apr 1996 11:19:06 -0500 From: "Eric L. Hernes" Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I ran across a little problem w/ modload. it seems that modload can't load a module with a . in it's path, you get an error like: (ttyp0@jake)$ sudo /sbin/modload -o linux_mod -elinux_mod ./linux_mod.o modload: module object must end in .o I changed a strchr() to a strrchr() and now it works. Does this break anything? Here's the trivial patch. --- modload.c.orig Fri Apr 26 11:03:12 1996 +++ modload.c Fri Apr 26 11:03:19 1996 @@ -225,7 +225,7 @@ 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"); eric. -- erich@lodgenet.com http://rrnet.com/~erich erich@rrnet.com