summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-03-27 20:07:29 +0000
committerbde <bde@FreeBSD.org>1996-03-27 20:07:29 +0000
commit1e44bb87f6ceca4e4ee106149314b43f0f5b6a6d (patch)
tree138f1a4ebb2677e50b5fb5b3059f982f94237daf
parentc8f7ae16bfb95052dbb07726f863b09798ca2967 (diff)
downloadFreeBSD-src-1e44bb87f6ceca4e4ee106149314b43f0f5b6a6d.zip
FreeBSD-src-1e44bb87f6ceca4e4ee106149314b43f0f5b6a6d.tar.gz
Fixed name of pt device (it has a unit number). devfs still only creates
one. Added control device.
-rw-r--r--sys/scsi/pt.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c
index b8d3d55..de05408 100644
--- a/sys/scsi/pt.c
+++ b/sys/scsi/pt.c
@@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pt.c,v 1.14 1996/03/10 07:13:06 gibbs Exp $
+ * $Id: pt.c,v 1.15 1996/03/10 18:17:54 davidg Exp $
*/
/*
@@ -274,18 +274,25 @@ static pt_devsw_installed = 0;
static void pt_drvinit(void *unused)
{
dev_t dev;
+#ifdef DEVFS
+ int unit;
+#endif
if( ! pt_devsw_installed ) {
dev = makedev(CDEV_MAJOR, 0);
cdevsw_add(&dev,&pt_cdevsw, NULL);
pt_devsw_installed = 1;
#ifdef DEVFS
- {
- void *x;
-/* default for a simple device with no probe routine (usually delete this) */
- x=devfs_add_devsw(
-/* path name devsw minor type uid gid perm*/
- "/", "pt", &pt_cdevsw, 0, DV_CHR, 0, 0, 0600);
+ /* XXX only 1 unit. */
+ for (unit = 0; unit < 1; unit++) {
+ /* XXX not saving tokens yet. */
+ devfs_add_devswf(&pt_cdevsw, unit, DV_CHR,
+ UID_ROOT, GID_WHEEL, 0600,
+ "pt%d", unit);
+ devfs_add_devswf(&pt_cdevsw, unit | SCSI_CONTROL_MASK,
+ DV_CHR,
+ UID_ROOT, GID_WHEEL, 0600,
+ "pt%d.ctl", unit);
}
#endif
}
OpenPOWER on IntegriCloud