Avoid problems with make_dev.

This commit is contained in:
Scott Long 2007-04-19 18:14:33 +00:00
parent 1fd42e91ee
commit 58b0b144e8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168872
2 changed files with 4 additions and 0 deletions

View file

@ -303,9 +303,11 @@ ptctor(struct cam_periph *periph, void *arg)
SID_TYPE(&cgd->inq_data) | DEVSTAT_TYPE_IF_SCSI,
DEVSTAT_PRIORITY_OTHER);
cam_periph_unlock(periph);
softc->dev = make_dev(&pt_cdevsw, periph->unit_number, UID_ROOT,
GID_OPERATOR, 0600, "%s%d", periph->periph_name,
periph->unit_number);
cam_periph_lock(periph);
softc->dev->si_drv1 = periph;
/*

View file

@ -1521,6 +1521,7 @@ saregister(struct cam_periph *periph, void *arg)
DEVSTAT_BS_UNAVAILABLE, SID_TYPE(&cgd->inq_data) |
DEVSTAT_TYPE_IF_SCSI, DEVSTAT_PRIORITY_TAPE);
cam_periph_unlock(periph);
softc->devs.ctl_dev = make_dev(&sa_cdevsw, SAMINOR(SA_CTLDEV,
periph->unit_number, 0, SA_ATYPE_R), UID_ROOT, GID_OPERATOR,
0660, "%s%d.ctl", periph->periph_name, periph->unit_number);
@ -1563,6 +1564,7 @@ saregister(struct cam_periph *periph, void *arg)
alias->si_drv1 = periph;
}
}
cam_periph_lock(periph);
/*
* Add an async callback so that we get