summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
committerphk <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
commit663cbe4fc26065f7af7d10faaee492a626156145 (patch)
tree32e619fadb473bfb85ff8e06044176f2ff323cce /sys/pc98
parent2a5ff1f726f814a9e4717afe3f14250f8030cace (diff)
downloadFreeBSD-src-663cbe4fc26065f7af7d10faaee492a626156145.zip
FreeBSD-src-663cbe4fc26065f7af7d10faaee492a626156145.tar.gz
Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/pc98/wd_cd.c32
-rw-r--r--sys/pc98/pc98/wfd.c23
-rw-r--r--sys/pc98/pc98/wst.c15
3 files changed, 14 insertions, 56 deletions
diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c
index 0613e7e..865f82b 100644
--- a/sys/pc98/pc98/wd_cd.c
+++ b/sys/pc98/pc98/wd_cd.c
@@ -25,12 +25,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-cd.c,v 1.19 1999/05/30 16:52:08 phk Exp $
+ * $Id: atapi-cd.c,v 1.20 1999/05/31 11:25:51 phk Exp $
*/
#include "wdc.h"
#include "wcd.h"
-#include "opt_devfs.h"
#if NWCD > 0 && NWDC > 0
@@ -47,9 +46,6 @@
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/stat.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <i386/isa/atapi.h>
#include <i386/isa/atapi-cd.h>
@@ -144,24 +140,14 @@ acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun,
}
else
ptr->device_stats = device_stats;
-#ifdef DEVFS
- ptr->ra_devfs_token =
- devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rwcd%da", lun);
- ptr->rc_devfs_token =
- devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rwcd%dc", lun);
- ptr->a_devfs_token =
- devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "wcd%da", lun);
- ptr->c_devfs_token =
- devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "wcd%dc", lun);
-#endif
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "rwcd%da", lun);
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "rwcd%dc", lun);
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "wcd%da", lun);
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "wcd%dc", lun);
return ptr;
}
diff --git a/sys/pc98/pc98/wfd.c b/sys/pc98/pc98/wfd.c
index 9cf0684..a089527 100644
--- a/sys/pc98/pc98/wfd.c
+++ b/sys/pc98/pc98/wfd.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: wfd.c,v 1.26 1999/06/24 03:09:11 msmith Exp $
+ * $Id: wfd.c,v 1.27 1999/08/14 11:40:41 phk Exp $
*/
/*
@@ -46,9 +46,6 @@
#include <sys/disklabel.h>
#include <sys/diskslice.h>
#include <sys/cdio.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <i386/isa/atapi.h>
@@ -146,10 +143,6 @@ struct wfd {
struct atapi_params *param; /* Drive parameters table */
struct cappage cap; /* Capabilities page info */
char description[80]; /* Device description */
-#ifdef DEVFS
- void *cdevs;
- void *bdevs;
-#endif
struct diskslices *dk_slices; /* virtual drives */
struct devstat device_stats;
@@ -188,9 +181,6 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
struct atapires result;
int lun, i;
-#ifdef DEVFS
- int mynor;
-#endif
if (wfdnlun >= NUNIT) {
printf ("wfd: too many units\n");
return (0);
@@ -262,15 +252,8 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
-#ifdef DEVFS
- mynor = dkmakeminor(t->lun, WHOLE_DISK_SLICE, RAW_PART);
- t->bdevs = devfs_add_devswf(&wfd_cdevsw, mynor,
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "wfd%d", t->lun);
- t->cdevs = devfs_add_devswf(&wfd_cdevsw, mynor,
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rwfd%d", t->lun);
-#endif /* DEVFS */
+ make_dev(&wfd_cdevsw, dkmakeminor(t->lun, WHOLE_DISK_SLICE, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "rwfd%d", t->lun);
/*
* Export the drive to the devstat interface.
diff --git a/sys/pc98/pc98/wst.c b/sys/pc98/pc98/wst.c
index 94d4146..7337796 100644
--- a/sys/pc98/pc98/wst.c
+++ b/sys/pc98/pc98/wst.c
@@ -25,13 +25,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: wst.c,v 1.22 1999/05/30 16:52:30 phk Exp $
+ * $Id: wst.c,v 1.23 1999/05/31 11:26:39 phk Exp $
*/
#include "wdc.h"
#include "wst.h"
#include "opt_ddb.h"
-#include "opt_devfs.h"
#if NWST > 0 && NWDC > 0
@@ -42,9 +41,6 @@
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/mtio.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <machine/clock.h>
#include <i386/isa/atapi.h>
@@ -198,10 +194,6 @@ struct wst {
struct atapi_params *param; /* Drive parameters table */
struct wst_header header; /* MODE SENSE param header */
struct wst_cappage cap; /* Capabilities page info */
-#ifdef DEVFS
- void *cdevs;
- void *bdevs;
-#endif
};
static struct wst *wsttab[NUNIT]; /* Drive info by unit number */
@@ -274,10 +266,7 @@ wstattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
wst_describe(t);
wstnlun++;
-#ifdef DEVFS
- t->cdevs = devfs_add_devswf(&wst_cdevsw, 0, DV_CHR, UID_ROOT, GID_OPERATOR,
- 0640, "rwst%d", t->lun);
-#endif /* DEVFS */
+ make_dev(&wst_cdevsw, 0, UID_ROOT, GID_OPERATOR, 0640, "rwst%d", t->lun);
return(1);
}
OpenPOWER on IntegriCloud