aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Dufault <dufault@FreeBSD.org>1995-03-15 22:42:25 +0000
committerPeter Dufault <dufault@FreeBSD.org>1995-03-15 22:42:25 +0000
commit66b0ec7d868ebe13b9c46fe8b8a74660879912fe (patch)
tree7b844c461a5582e97a466b0ba91694c7fa3fefe5 /sys
parentd93cc1a933c4f08c8df70b653ff1b56c2664f3bd (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/scsi_sense.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/scsi/scsi_sense.c b/sys/scsi/scsi_sense.c
index a6cc359bedd21..a21496afce867 100644
--- a/sys/scsi/scsi_sense.c
+++ b/sys/scsi/scsi_sense.c
@@ -1,4 +1,11 @@
#include <sys/types.h>
+
+/* XXX There should be a way for a type driver to have its own
+ * private senses and add them when it is added.
+ */
+
+#if !defined(NO_SCSI_SENSE)
+
#include "sd.h"
#include "st.h"
#define NSPRINT 0
@@ -16,7 +23,6 @@ static struct
u_char ascq;
char *desc;
} tab[] = {
-#if !defined(NO_SCSI_SENSE)
#if (NCH > 0)
{0x28, 0x01, "Import or export element accessed" },
{0x21, 0x01, "Invalid element address" },
@@ -272,8 +278,6 @@ static struct
{0x3f, 0x00, "Target operating conditions have changed" },
{0x26, 0x03, "Threshold parameters not supported" },
{0x46, 0x00, "Unsuccessful soft reset" },
-#endif /* NO_SCSI_SENSE */
- {0xff, 0xff, 0 },
};
char *scsi_sense_desc(int asc, int ascq)
@@ -283,5 +287,12 @@ char *scsi_sense_desc(int asc, int ascq)
if (tab[i].asc == asc && tab[i].ascq == ascq)
return tab[i].desc;
- return "no available sense description";
+ return "";
}
+
+#else /* NO_SCSI_SENSE */
+char *scsi_sense_desc(int asc, int ascq)
+{
+ return "";
+}
+#endif