1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

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:
Eric L. Hernes 1996-04-26 18:39:48 +00:00
parent a2352fc148
commit 8a8fb1236d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15397

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");