1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Correct usage of unit to t->lun. This fixes the DEVFS case and the

"buggy Zip" message.
Suggested by:	Pedro A M Vazquez <vazquez@IQM.Unicamp.BR>
This commit is contained in:
Mike Smith 1998-01-29 06:42:12 +00:00
parent 48cf2a7958
commit 4a8aee409f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32865
2 changed files with 10 additions and 10 deletions

View File

@ -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.2 1998/01/16 22:43:33 pst Exp $
* $Id: wfd.c,v 1.3 1998/01/27 16:49:35 msmith Exp $
*/
/*
@ -246,7 +246,7 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
*/
if (!strcmp(ap->model, "IOMEGA ZIP 100 ATAPI")) {
printf("wfd%d: buggy Zip drive, 64-block transfer limit set\n",
unit);
t->lun);
t->maxblks = 64;
} else {
t->maxblks = 0; /* no limit */
@ -255,13 +255,13 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
#ifdef DEVFS
mynor = dkmakeminor(unit, WHOLE_DISK_SLICE, RAW_PART);
mynor = dkmakeminor(t->lun, WHOLE_DISK_SLICE, RAW_PART);
t->bdevs = devfs_add_devswf(&wfd_bdevsw, mynor,
DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"wfd%d", unit);
"wfd%d", t->lun);
t->cdevs = devfs_add_devswf(&wfd_cdevsw, mynor,
DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"rwfd%d", unit);
"rwfd%d", t->lun);
#endif /* DEVFS */
return (1);
}

View File

@ -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.2 1998/01/16 22:43:33 pst Exp $
* $Id: wfd.c,v 1.3 1998/01/27 16:49:35 msmith Exp $
*/
/*
@ -246,7 +246,7 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
*/
if (!strcmp(ap->model, "IOMEGA ZIP 100 ATAPI")) {
printf("wfd%d: buggy Zip drive, 64-block transfer limit set\n",
unit);
t->lun);
t->maxblks = 64;
} else {
t->maxblks = 0; /* no limit */
@ -255,13 +255,13 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
#ifdef DEVFS
mynor = dkmakeminor(unit, WHOLE_DISK_SLICE, RAW_PART);
mynor = dkmakeminor(t->lun, WHOLE_DISK_SLICE, RAW_PART);
t->bdevs = devfs_add_devswf(&wfd_bdevsw, mynor,
DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"wfd%d", unit);
"wfd%d", t->lun);
t->cdevs = devfs_add_devswf(&wfd_cdevsw, mynor,
DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"rwfd%d", unit);
"rwfd%d", t->lun);
#endif /* DEVFS */
return (1);
}