From 96f3f45d08bea93b82ac7d8c4dc339218f070415 Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 3 Feb 1998 09:18:03 +0000 Subject: [PATCH] When loading a VFS LKM, use vfs_getopsbyname() to check if the file system already exists. --- sys/kern/kern_lkm.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index 321dd64a5c5e..8e92dc3f9450 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lkm.c,v 1.39 1997/07/21 05:43:36 mrg Exp $ */ +/* $NetBSD: kern_lkm.c,v 1.40 1998/02/03 09:18:03 thorpej Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -636,12 +636,8 @@ _lkm_vfs(lkmtp, cmd) return (EEXIST); /* make sure there's no VFS in the table with this name */ - for (i = 0; i < nvfssw; i++) - if (vfssw[i] != (struct vfsops *)0 && - strncmp(vfssw[i]->vfs_name, - args->lkm_vfsops->vfs_name, - MFSNAMELEN) == 0) - return (EEXIST); + if (vfs_getopsbyname(args->lkm_vfsops->vfs_name) != NULL) + return (EEXIST); /* pick the last available empty slot */ for (i = nvfssw - 1; i >= 0; i--)