patch00149 by Julian Elischer <julian@jules.dialix.oz.au> & Rodney Grimes.

When an error was encountered, the sd/cd drivers printed blockno&ff0000
rather that blockno.
This commit is contained in:
deraadt 1993-05-25 07:27:31 +00:00
parent 8ae65d6e54
commit ee59868966
6 changed files with 94 additions and 88 deletions

View File

@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: cd.c,v 1.9 1993/05/20 22:48:57 deraadt Exp $
* $Id: cd.c,v 1.10 1993/05/25 07:27:31 deraadt Exp $
*/
#define SPLCD splbio
@ -1519,9 +1519,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1538,9 +1538,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1570,9 +1570,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1586,9 +1586,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1614,9 +1614,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1634,9 +1634,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1663,8 +1663,8 @@ struct scsi_xfer *xs;
sense->error_code);
if(sense->valid)
if(!silent)printf("block no. %d (decimal)\n",
(sense->ext.unextended.blockhi <<16),
+ (sense->ext.unextended.blockmed <<8),
(sense->ext.unextended.blockhi <<16)
+ (sense->ext.unextended.blockmed <<8)
+ (sense->ext.unextended.blocklow ));
}
return(EIO);

View File

@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: scsiconf.c,v 1.7 1993/05/20 03:46:36 cgd Exp $
* $Id: scsiconf.c,v 1.8 1993/05/25 07:27:35 deraadt Exp $
*/
#include "sys/types.h"
@ -79,13 +79,16 @@ struct scsidevs knowndevs[] = {
{
SC_TCD, T_READONLY, T_REMOV, "SONY ", "CD-ROM CDU-8012 ", "3.1a",
cdattach, "cd", SC_ONE_LU
}, {
SC_TCD, T_READONLY, T_REMOV, "PIONEER ", "CD-ROM DRM-600 ", "any",
cdattach, "cd", SC_MORE_LUS
},
#endif NCD
#if NCALS > 0
{
-1, T_PROCESSOR, T_FIXED, "standard" , "any" ,"any",
calsattach, "cals", SC_MORE_LUS
},
}
#endif NCALS
#if NCH > 0
{

View File

@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: sd.c,v 1.11 1993/05/21 12:20:30 davidb Exp $
* $Id: sd.c,v 1.12 1993/05/25 07:27:37 deraadt Exp $
*/
#include "sd.h"
@ -1148,9 +1148,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: soft error(corrected) ", unit);
if(sense->valid) {
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1165,9 +1165,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: medium error ", unit);
if(sense->valid) {
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1198,9 +1198,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: attempted protection violation ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1211,9 +1211,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: block wrong state (worm)\n ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1236,9 +1236,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: search returned\n ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1253,9 +1253,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: verify miscompare\n ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1279,8 +1279,8 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
if(sense->valid)
if(!silent)
printf("block no. %d (decimal)\n",
(sense->ext.unextended.blockhi <<16),
+ (sense->ext.unextended.blockmed <<8),
(sense->ext.unextended.blockhi <<16)
+ (sense->ext.unextended.blockmed <<8)
+ (sense->ext.unextended.blocklow ));
return EIO;
}

View File

@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: cd.c,v 1.9 1993/05/20 22:48:57 deraadt Exp $
* $Id: cd.c,v 1.10 1993/05/25 07:27:31 deraadt Exp $
*/
#define SPLCD splbio
@ -1519,9 +1519,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1538,9 +1538,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1570,9 +1570,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1586,9 +1586,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1614,9 +1614,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1634,9 +1634,9 @@ struct scsi_xfer *xs;
if(sense->valid)
{
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1663,8 +1663,8 @@ struct scsi_xfer *xs;
sense->error_code);
if(sense->valid)
if(!silent)printf("block no. %d (decimal)\n",
(sense->ext.unextended.blockhi <<16),
+ (sense->ext.unextended.blockmed <<8),
(sense->ext.unextended.blockhi <<16)
+ (sense->ext.unextended.blockmed <<8)
+ (sense->ext.unextended.blocklow ));
}
return(EIO);

View File

@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: scsiconf.c,v 1.7 1993/05/20 03:46:36 cgd Exp $
* $Id: scsiconf.c,v 1.8 1993/05/25 07:27:35 deraadt Exp $
*/
#include "sys/types.h"
@ -79,13 +79,16 @@ struct scsidevs knowndevs[] = {
{
SC_TCD, T_READONLY, T_REMOV, "SONY ", "CD-ROM CDU-8012 ", "3.1a",
cdattach, "cd", SC_ONE_LU
}, {
SC_TCD, T_READONLY, T_REMOV, "PIONEER ", "CD-ROM DRM-600 ", "any",
cdattach, "cd", SC_MORE_LUS
},
#endif NCD
#if NCALS > 0
{
-1, T_PROCESSOR, T_FIXED, "standard" , "any" ,"any",
calsattach, "cals", SC_MORE_LUS
},
}
#endif NCALS
#if NCH > 0
{

View File

@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: sd.c,v 1.11 1993/05/21 12:20:30 davidb Exp $
* $Id: sd.c,v 1.12 1993/05/25 07:27:37 deraadt Exp $
*/
#include "sd.h"
@ -1148,9 +1148,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: soft error(corrected) ", unit);
if(sense->valid) {
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1165,9 +1165,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: medium error ", unit);
if(sense->valid) {
printf("block no. %d (decimal)",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1198,9 +1198,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: attempted protection violation ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1211,9 +1211,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: block wrong state (worm)\n ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1236,9 +1236,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: search returned\n ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1253,9 +1253,9 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
printf("sd%d: verify miscompare\n ", unit);
if(sense->valid) {
printf("block no. %d (decimal)\n",
(sense->ext.extended.info[0] <<24),
(sense->ext.extended.info[1] <<16),
(sense->ext.extended.info[2] <<8),
(sense->ext.extended.info[0] <<24) |
(sense->ext.extended.info[1] <<16) |
(sense->ext.extended.info[2] <<8) |
(sense->ext.extended.info[3] ));
}
printf("\n");
@ -1279,8 +1279,8 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
if(sense->valid)
if(!silent)
printf("block no. %d (decimal)\n",
(sense->ext.unextended.blockhi <<16),
+ (sense->ext.unextended.blockmed <<8),
(sense->ext.unextended.blockhi <<16)
+ (sense->ext.unextended.blockmed <<8)
+ (sense->ext.unextended.blocklow ));
return EIO;
}