From 0262543b5f83779b740399f4b8e107618d149997 Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 4 Jul 1998 22:30:26 +0000 Subject: There is no such thing any more as "struct bdevsw". There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind. --- sys/fs/specfs/spec_vnops.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/fs/specfs') diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index a49a106..cb457d1 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.63 1998/06/07 17:11:59 dfr Exp $ + * $Id: spec_vnops.c,v 1.64 1998/07/04 20:45:33 julian Exp $ */ #include @@ -183,9 +183,8 @@ spec_open(ap) * opens for writing of any disk character devices. */ if (securelevel >= 2 - && cdevsw[maj]->d_bdev - && (cdevsw[maj]->d_bdev->d_flags & D_TYPEMASK) == - D_DISK) + && cdevsw[maj]->d_bmaj != -1 + && (cdevsw[maj]->d_flags & D_TYPEMASK) == D_DISK) return (EPERM); /* * When running in secure mode, do not allow opens -- cgit v1.1