scsierrs.c
上传用户:xiejiait
上传日期:2007-01-06
资源大小:881k
文件大小:27k
- /* @(#)scsierrs.c 2.21 99/05/13 Copyright 1987-1996 J. Schilling */
- #ifndef lint
- static char sccsid[] =
- "@(#)scsierrs.c 2.21 99/05/13 Copyright 1987-1996 J. Schilling";
- #endif
- /*
- * Error printing for scsitransp.c
- *
- * Copyright (c) 1987-1996 J. Schilling
- */
- /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- */
- #include <mconfig.h>
- #include <stdio.h>
- #include <standard.h>
- #include <scg/scsireg.h>
- #include <scg/scsidefs.h>
- #include <scg/scgcmd.h> /*XXX JS wird eigentlich nicht benoetigt!! */
- /*XXX JS kommt weg, wenn struct sense und status */
- /*XXX JS von scgio.h nach scsireg.h kommen */
- #include <scg/scsitransp.h>
- #define CTYPE_CCS 0
- #define CTYPE_MD21 1
- #define CTYPE_ACB4000 2
- #define CTYPE_SMO_C501 3
- #define SMO_C501
- EXPORT const char *scsisensemsg __PR((int, int, int,
- const char **, char *));
- EXPORT void scsierrmsg __PR((SCSI *scgp, struct scsi_sense *,
- struct scsi_status *,
- int, const char **));
- /*
- * Map old non extended sense to sense key.
- */
- static u_char sd_adaptec_keys[] = {
- 0, 4, 4, 4, 2, 2, 4, 4, /* 0x00-0x07 */
- 4, 4, 4, 4, 4, 4, 4, 4, /* 0x08-0x0f */
- 4, 3, 3, 3, 3, 4, 3, 1, /* 0x10-0x17 */
- 1, 1, 3, 4, 3, 4, 3, 3, /* 0x18-0x1f */
- 5, 5, 5, 5, 5, 5, 5, 7, /* 0x20-0x27 */
- 6, 6, 6, 5, 4,11,11,11 /* 0x28-0x2f */
- };
- #define MAX_ADAPTEC_KEYS (sizeof (sd_adaptec_keys))
- /*
- * Deviations to CCS found on old pre CCS devices
- */
- static const char *sd_adaptec_error_str[] = {
- "