summaryrefslogtreecommitdiffstats
path: root/sys/fs/specfs
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-07-04 22:30:26 +0000
committerjulian <julian@FreeBSD.org>1998-07-04 22:30:26 +0000
commit0262543b5f83779b740399f4b8e107618d149997 (patch)
tree089ad4ebaec66b188dddc6918932d35b7dc8cb70 /sys/fs/specfs
parent29cbc265b1c33cbb4deb6416d04fc45ac6d03869 (diff)
downloadFreeBSD-src-0262543b5f83779b740399f4b8e107618d149997.zip
FreeBSD-src-0262543b5f83779b740399f4b8e107618d149997.tar.gz
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.
Diffstat (limited to 'sys/fs/specfs')
-rw-r--r--sys/fs/specfs/spec_vnops.c7
1 files changed, 3 insertions, 4 deletions
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 <sys/param.h>
@@ -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
OpenPOWER on IntegriCloud