summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-12-29 04:46:21 +0000
committerpeter <peter@FreeBSD.org>1999-12-29 04:46:21 +0000
commit15b9bcb121e1f3735a2c98a11afdb52a03301d7e (patch)
treee999c95eb5db56737efc17feeb385a77941021bb /sys/cam
parent9ed7cb48bf4a00a23e7489706b0effe1c516cb5b (diff)
downloadFreeBSD-src-15b9bcb121e1f3735a2c98a11afdb52a03301d7e.zip
FreeBSD-src-15b9bcb121e1f3735a2c98a11afdb52a03301d7e.tar.gz
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_all.c20
-rw-r--r--sys/cam/scsi/scsi_all.h10
-rw-r--r--sys/cam/scsi/scsi_sa.c8
-rw-r--r--sys/cam/scsi/scsi_targetio.h2
4 files changed, 20 insertions, 20 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index f6c997a..bd614cf 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -31,7 +31,7 @@
#include <sys/param.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <opt_scsi.h>
#include <sys/systm.h>
@@ -46,7 +46,7 @@
#include <cam/cam_xpt.h>
#include <cam/cam_xpt_periph.h>
#include <cam/scsi/scsi_all.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <camlib.h>
#ifndef FALSE
@@ -57,7 +57,7 @@
#endif /* TRUE */
#define ERESTART -1 /* restart syscall */
#define EJUSTRETURN -2 /* don't modify regs, just return */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
const char *scsi_sense_key_text[] =
{
@@ -715,7 +715,7 @@ scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data)
* If we're in the kernel, 'quantum' is already defined in cam_xpt.c.
* Otherwise, we need to define it.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
extern const char quantum[];
#else
static const char quantum[] = "QUANTUM";
@@ -1622,7 +1622,7 @@ scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len)
* Because scsi_sense_print() utilizes transport layer functions, it will
* only work in the kernel.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
void
scsi_sense_print(struct ccb_scsiio *csio)
@@ -1793,7 +1793,7 @@ scsi_sense_print(struct ccb_scsiio *csio)
printf("\n");
}
-#else /* !KERNEL */
+#else /* !_KERNEL */
char *
@@ -2102,9 +2102,9 @@ scsi_sense_print(struct cam_device *device, struct ccb_scsiio *csio,
fprintf(ofile, "%s", scsi_sense_string(device, csio, str, 2048));
}
-#endif /* KERNEL/!KERNEL */
+#endif /* _KERNEL/!_KERNEL */
-#ifdef KERNEL
+#ifdef _KERNEL
int
scsi_interpret_sense(union ccb *ccb, u_int32_t sense_flags,
u_int32_t *relsim_flags, u_int32_t *openings,
@@ -2128,7 +2128,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
sense = &csio->sense_data;
scsi_extract_sense(sense, &error_code, &sense_key, &asc, &ascq);
-#ifdef KERNEL
+#ifdef _KERNEL
if (bootverbose) {
sense_flags |= SF_PRINT_ALWAYS;
print_sense = TRUE;
@@ -2280,7 +2280,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
}
if (print_sense) {
-#ifdef KERNEL
+#ifdef _KERNEL
scsi_sense_print(csio);
#else
scsi_sense_print(device, csio, stdout);
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index d6d802b..e32c236 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include "opt_scsi.h"
/*
* This is the number of seconds we wait for devices to settle after a SCSI
@@ -51,7 +51,7 @@
#if (SCSI_DELAY < 100)
#error "SCSI_DELAY is in milliseconds, not seconds! Please use a larger value"
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* SCSI command format
@@ -701,7 +701,7 @@ struct scsi_op_quirk_entry {
struct ccb_scsiio;
struct cam_periph;
union ccb;
-#ifndef KERNEL
+#ifndef _KERNEL
struct cam_device;
#endif
@@ -712,7 +712,7 @@ const char * scsi_sense_desc(int asc, int ascq,
struct scsi_inquiry_data *inq_data);
scsi_sense_action scsi_error_action(int asc, int ascq,
struct scsi_inquiry_data *inq_data);
-#ifdef KERNEL
+#ifdef _KERNEL
void scsi_sense_print(struct ccb_scsiio *csio);
int scsi_interpret_sense(union ccb *ccb,
u_int32_t sense_flags,
@@ -733,7 +733,7 @@ int scsi_interpret_sense(struct cam_device *device,
u_int32_t *reduction,
u_int32_t *timeout,
scsi_sense_action error_action);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#define SF_RETRY_UA 0x01
#define SF_NO_PRINT 0x02
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index 85aa2d3..10f0884 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -36,7 +36,7 @@
#include <sys/param.h>
#include <sys/queue.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/kernel.h>
#endif
@@ -49,7 +49,7 @@
#include <sys/devicestat.h>
#include <machine/limits.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <stdio.h>
#include <string.h>
#endif
@@ -65,7 +65,7 @@
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_sa.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <opt_sa.h>
@@ -3210,7 +3210,7 @@ saerase(struct cam_periph *periph, int longerase)
return (error);
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Read tape block limits command.
diff --git a/sys/cam/scsi/scsi_targetio.h b/sys/cam/scsi/scsi_targetio.h
index d20c9b0..f628d94 100644
--- a/sys/cam/scsi/scsi_targetio.h
+++ b/sys/cam/scsi/scsi_targetio.h
@@ -30,7 +30,7 @@
#ifndef _CAM_SCSI_SCSI_TARGETIO_H_
#define _CAM_SCSI_SCSI_TARGETIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
OpenPOWER on IntegriCloud