diff options
-rw-r--r-- | usr.sbin/sesd/Makefile.inc | 17 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/chpmon.c | 3 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/eltsub.c | 6 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/getencstat.c | 3 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/getnobj.c | 4 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/getobjmap.c | 3 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/getobjstat.c | 4 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/inienc.c | 4 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/sesd.c | 6 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/setencstat.c | 4 | ||||
-rw-r--r-- | usr.sbin/sesd/srcs/setobjstat.c | 4 |
11 files changed, 35 insertions, 23 deletions
diff --git a/usr.sbin/sesd/Makefile.inc b/usr.sbin/sesd/Makefile.inc index 197b0d5706a..796d99dce47 100644 --- a/usr.sbin/sesd/Makefile.inc +++ b/usr.sbin/sesd/Makefile.inc @@ -1,6 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2000/02/21 08:10:21 mjacob Exp $ -# $OpenBSD: Makefile.inc,v 1.1 2000/02/21 08:45:14 mjacob Exp $ -# $FreeBSD: $ +# $OpenBSD: Makefile.inc,v 1.2 2000/02/22 06:21:35 mjacob Exp $ # # Copyright (c) 2000 by Matthew Jacob # All rights reserved. @@ -34,17 +32,12 @@ # mjacob@feral.com # -SYS != uname -s - -.if ${SYS} == OpenBSD -COPTS += -I/usr/include/scsi -DSESINC="<ses.h>" -.elif ${SYS} == NetBSD -COPTS += -I/usr/include/dev/scsipi -DSESINC="<ses.h>" -.else -COPTS += -I/usr/include/cam/scsi -DSESINC="<scsi_ses.h>" +.if exists(${.CURDIR}/../../Makefile.inc) +.include "${.CURDIR}/../../Makefile.inc" .endif + +COPTS += -DSESINC="<scsi/ses.h>" # Inherit BINDIR from one level up. -.include "../Makefile.inc" BINDIR ?= ${DESTDIR}/usr/sbin .PATH: ${.CURDIR}/../srcs diff --git a/usr.sbin/sesd/srcs/chpmon.c b/usr.sbin/sesd/srcs/chpmon.c index 52483c44f6a..fff8331d970 100644 --- a/usr.sbin/sesd/srcs/chpmon.c +++ b/usr.sbin/sesd/srcs/chpmon.c @@ -47,6 +47,9 @@ */ #define BADSTAT \ (SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL) + +int main __P((int, char **)); + int main(a, v) int a; diff --git a/usr.sbin/sesd/srcs/eltsub.c b/usr.sbin/sesd/srcs/eltsub.c index 3a0ff3aaf67..63150361069 100644 --- a/usr.sbin/sesd/srcs/eltsub.c +++ b/usr.sbin/sesd/srcs/eltsub.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: eltsub.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: eltsub.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -40,6 +40,10 @@ #include <sys/ioctl.h> #include SESINC +char *geteltnm __P((int)); +static char *scode2ascii __P((u_char)); +char *stat2ascii __P((int, u_char *)); + char * geteltnm(type) int type; diff --git a/usr.sbin/sesd/srcs/getencstat.c b/usr.sbin/sesd/srcs/getencstat.c index a5e3f7a923b..3dbbbfb5aa9 100644 --- a/usr.sbin/sesd/srcs/getencstat.c +++ b/usr.sbin/sesd/srcs/getencstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getencstat.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: getencstat.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -43,6 +43,7 @@ extern char *geteltnm __P((int)); extern char *stat2ascii __P((int, u_char *)); +int main __P((int, char **)); int main(a, v) diff --git a/usr.sbin/sesd/srcs/getnobj.c b/usr.sbin/sesd/srcs/getnobj.c index 164fc0f9e6e..e9bc0d3b402 100644 --- a/usr.sbin/sesd/srcs/getnobj.c +++ b/usr.sbin/sesd/srcs/getnobj.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getnobj.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: getnobj.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -42,6 +42,8 @@ #include <sys/ioctl.h> #include SESINC +int main __P((int, char **)); + int main(argc, argv) int argc; diff --git a/usr.sbin/sesd/srcs/getobjmap.c b/usr.sbin/sesd/srcs/getobjmap.c index 8f54ad6906a..3bc0c863ba5 100644 --- a/usr.sbin/sesd/srcs/getobjmap.c +++ b/usr.sbin/sesd/srcs/getobjmap.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getobjmap.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: getobjmap.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,6 +41,7 @@ #include <sys/ioctl.h> #include SESINC +int main __P((int, char **)); extern char *geteltnm __P((int)); int diff --git a/usr.sbin/sesd/srcs/getobjstat.c b/usr.sbin/sesd/srcs/getobjstat.c index e3c77009077..57b81bce140 100644 --- a/usr.sbin/sesd/srcs/getobjstat.c +++ b/usr.sbin/sesd/srcs/getobjstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getobjstat.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: getobjstat.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -40,6 +40,8 @@ #include <sys/ioctl.h> #include SESINC +int main __P((int, char **)); + int main(a, v) int a; diff --git a/usr.sbin/sesd/srcs/inienc.c b/usr.sbin/sesd/srcs/inienc.c index 5a30fa5fdfb..519201284d8 100644 --- a/usr.sbin/sesd/srcs/inienc.c +++ b/usr.sbin/sesd/srcs/inienc.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: inienc.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: inienc.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,6 +41,8 @@ #include <sys/ioctl.h> #include SESINC +int __P((int, char **)); + int main(a, v) int a; diff --git a/usr.sbin/sesd/srcs/sesd.c b/usr.sbin/sesd/srcs/sesd.c index 148ae7f9ae5..237746bb7c0 100644 --- a/usr.sbin/sesd/srcs/sesd.c +++ b/usr.sbin/sesd/srcs/sesd.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: sesd.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: sesd.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -45,6 +45,7 @@ #define ALLSTAT (SES_ENCSTAT_UNRECOV | SES_ENCSTAT_CRITICAL | \ SES_ENCSTAT_NONCRITICAL | SES_ENCSTAT_INFO) +int main __P((int, char **)); /* * Monitor named SES devices and note (via syslog) any changes in status. @@ -57,7 +58,7 @@ main(a, v) { static char *usage = "usage: %s [ -d ] [ -t pollinterval ] device [ device ]\n"; - int fd, polltime, dev, devbase, nodaemon, bpri; + int fd, polltime, dev, devbase, nodaemon; ses_encstat stat, *carray; if (a < 2) { @@ -117,7 +118,6 @@ main(a, v) for (;;) { for (dev = devbase; dev < a; dev++) { - char buf[128]; fd = open(v[dev], O_RDWR); if (fd < 0) { syslog(LOG_ERR, "%s: %m", v[dev]); diff --git a/usr.sbin/sesd/srcs/setencstat.c b/usr.sbin/sesd/srcs/setencstat.c index e00b181777d..fc85b8fded6 100644 --- a/usr.sbin/sesd/srcs/setencstat.c +++ b/usr.sbin/sesd/srcs/setencstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: setencstat.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: setencstat.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,6 +41,8 @@ #include <sys/ioctl.h> #include SESINC +int main __P((int, char **)); + int main(a, v) int a; diff --git a/usr.sbin/sesd/srcs/setobjstat.c b/usr.sbin/sesd/srcs/setobjstat.c index 69a5e7c7ee4..f094dff61c7 100644 --- a/usr.sbin/sesd/srcs/setobjstat.c +++ b/usr.sbin/sesd/srcs/setobjstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: setobjstat.c,v 1.1 2000/02/21 08:45:15 mjacob Exp $ */ +/* $OpenBSD: setobjstat.c,v 1.2 2000/02/22 06:21:36 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,6 +41,8 @@ #include <sys/ioctl.h> #include SESINC +int main __P((int, char **)); + int main(a, v) int a; |