summaryrefslogtreecommitdiffstats
path: root/sys/fs
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
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')
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c4
-rw-r--r--sys/fs/specfs/spec_vnops.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index 84a6f20..b0bfca2 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95
- * $Id: cd9660_vfsops.c,v 1.39 1998/05/06 05:29:30 msmith Exp $
+ * $Id: cd9660_vfsops.c,v 1.40 1998/06/07 17:11:29 dfr Exp $
*/
#include <sys/param.h>
@@ -114,7 +114,7 @@ iso_get_ssector(dev, p)
struct ioc_toc_header h;
struct ioc_read_toc_single_entry t;
int i;
- struct bdevsw *bd;
+ struct cdevsw *bd;
d_ioctl_t *ioctlp;
bd = bdevsw[major(dev)];
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