summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-11-18 10:56:41 +0000
committerbde <bde@FreeBSD.org>1997-11-18 10:56:41 +0000
commit5ca06c22203e8ddbb4a50b7c5b1b74637ecce1fc (patch)
treee0b7c214b2fdb2b2fd4f72707efb582ee66b6f12 /sys
parenta9d75411eeb1b15c3230c85d97fb5d2b4d0e3d4e (diff)
downloadFreeBSD-src-5ca06c22203e8ddbb4a50b7c5b1b74637ecce1fc.zip
FreeBSD-src-5ca06c22203e8ddbb4a50b7c5b1b74637ecce1fc.tar.gz
Removed code for the !KERNEL case. It hasn't been maintained for 4
years and gives a "laugh"able number of compile-time errors (see the comment). main() just printed the struct sizes. This can be done better by compiling with -g and reading off the sizes from the stabs. Sorted #includes. Fixed an unsigned vs signed comparison.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/isa/aha1542.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/sys/i386/isa/aha1542.c b/sys/i386/isa/aha1542.c
index 4bed980..5c9b64b 100644
--- a/sys/i386/isa/aha1542.c
+++ b/sys/i386/isa/aha1542.c
@@ -12,37 +12,31 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: aha1542.c,v 1.70 1997/07/20 14:09:49 bde Exp $
+ * $Id: aha1542.c,v 1.71 1997/09/21 21:40:49 gibbs Exp $
*/
/*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*/
-#ifdef KERNEL /* don't laugh.. look for main() */
#include "aha.h"
#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
#include <sys/buf.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/systm.h>
#include <machine/clock.h>
#include <machine/stdarg.h>
+#include <scsi/scsiconf.h>
+#include <scsi/scsi_debug.h>
+
#include <vm/vm.h>
#include <vm/pmap.h>
#include <i386/isa/isa_device.h>
-#endif /* KERNEL */
-#include <scsi/scsiconf.h>
-#include <scsi/scsi_debug.h>
-
-#ifdef KERNEL
-#include <sys/kernel.h>
-#else /*KERNEL */
-#define NAHA 1
-#endif /*KERNEL */
#include "ioconf.h"
@@ -345,7 +339,6 @@ static char *board_rev __P((struct aha_data *aha, int type));
static int physcontig __P((int kv, int len));
static void put_host_stat __P((int host_stat));
-#ifdef KERNEL
static struct scsi_adapter aha_switch =
{
aha_scsi_cmd,
@@ -376,8 +369,6 @@ struct isa_driver ahadriver =
"aha"
};
-#endif /* KERNEL */
-
static int ahaunit = 0;
#define aha_abortmbx(mbx) \
@@ -389,16 +380,6 @@ static int ahaunit = 0;
#define AHA_RESET_TIMEOUT 2000 /* time to wait for reset (mSec) */
-#ifndef KERNEL
-main()
-{
- printf("size of aha_data is %d\n", sizeof(struct aha_data));
- printf("size of aha_ccb is %d\n", sizeof(struct aha_ccb));
- printf("size of aha_mbx is %d\n", sizeof(struct aha_mbx));
-}
-
-#else /*KERNEL */
-
/*
* aha_cmd(struct aha_data *aha,icnt, ocnt,wait, retval, opcode, ...)
* Activate Adapter command
@@ -855,7 +836,7 @@ put_host_stat(int host_stat)
{ AHA_ABORTED, "Software abort" },
};
- for (i = 0; i < sizeof(tab) / sizeof(tab[0]); i++) {
+ for (i = 0; i < (int)(sizeof(tab) / sizeof(tab[0])); i++) {
if (tab[i].host_stat == host_stat) {
printf("%s\n", tab[i].text);
return;
@@ -1869,4 +1850,3 @@ aha_timeout(void *arg1)
ccb->flags = CCB_ABORTED;
} splx(s);
}
-#endif /* KERNEL */
OpenPOWER on IntegriCloud