Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sesd Make it so this will build with -DWARN. It's a...



details:   https://anonhg.NetBSD.org/src/rev/199bcf493ab1
branches:  trunk
changeset: 482797:199bcf493ab1
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Tue Feb 22 06:06:06 2000 +0000

description:
Make it so this will build with -DWARN. It's a pity that
erh can't be bothered to contact the author first. Typical
NetBSD bullshit.

diffstat:

 usr.sbin/sesd/Makefile.inc      |  13 +------------
 usr.sbin/sesd/srcs/chpmon.c     |   5 ++++-
 usr.sbin/sesd/srcs/eltsub.c     |   6 +++++-
 usr.sbin/sesd/srcs/getencstat.c |   3 ++-
 usr.sbin/sesd/srcs/getnobj.c    |   4 +++-
 usr.sbin/sesd/srcs/getobjmap.c  |   3 ++-
 usr.sbin/sesd/srcs/getobjstat.c |   4 +++-
 usr.sbin/sesd/srcs/inienc.c     |   4 +++-
 usr.sbin/sesd/srcs/sesd.c       |   6 +++---
 usr.sbin/sesd/srcs/setencstat.c |   4 +++-
 usr.sbin/sesd/srcs/setobjstat.c |   4 +++-
 11 files changed, 32 insertions(+), 24 deletions(-)

diffs (225 lines):

diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/Makefile.inc
--- a/usr.sbin/sesd/Makefile.inc        Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/Makefile.inc        Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.5 2000/02/22 05:26:55 erh Exp $
+# $NetBSD: Makefile.inc,v 1.6 2000/02/22 06:06:06 mjacob Exp $
 # $OpenBSD: $
 # $FreeBSD: $
 #
@@ -34,18 +34,7 @@
 # mjacob%feral.com@localhost
 #
 
-SYS    !=      uname -s
-
-.if ${SYS} == OpenBSD
-#COPTS +=      -I${DESTDIR}/usr/include/scsi -DSESINC="<ses.h>"
-COPTS  +=      -DSESINC"<scsi/ses.h>"
-.elif  ${SYS} == NetBSD
-#COPTS +=      -I${DESTDIR}/usr/include/dev/scsipi -DSESINC="<ses.h>"
 COPTS  +=      -DSESINC="<dev/scsipi/ses.h>"
-.else
-#COPTS +=      -I${DESTDIR}/usr/include/cam/scsi -DSESINC="<scsi_ses.h>"
-COPTS  +=      -DSESINC="<cam/scsi/scsi_ses.h>"
-.endif
 
 .if exists(${.CURDIR}/../../Makefile.inc)
 .include "${.CURDIR}/../../Makefile.inc"
diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/chpmon.c
--- a/usr.sbin/sesd/srcs/chpmon.c       Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/chpmon.c       Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chpmon.c,v 1.1 2000/02/21 08:10:27 mjacob Exp $ */
+/* $NetBSD: chpmon.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
 /* $FreeBSD: src/share/examples/ses/chpmon.c,v 1.1 2000/01/15 22:47:16 mjacob Exp $ */
 /*
  * Copyright (c) 2000 by Matthew Jacob
@@ -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 -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/eltsub.c
--- a/usr.sbin/sesd/srcs/eltsub.c       Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/eltsub.c       Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eltsub.c,v 1.1 2000/02/21 08:10:27 mjacob Exp $ */
+/* $NetBSD: eltsub.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -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 -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/getencstat.c
--- a/usr.sbin/sesd/srcs/getencstat.c   Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/getencstat.c   Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getencstat.c,v 1.1 2000/02/21 08:10:28 mjacob Exp $ */ 
+/* $NetBSD: getencstat.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -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 -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/getnobj.c
--- a/usr.sbin/sesd/srcs/getnobj.c      Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/getnobj.c      Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getnobj.c,v 1.1 2000/02/21 08:10:28 mjacob Exp $ */ 
+/* $NetBSD: getnobj.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -42,6 +42,8 @@
 #include <sys/ioctl.h>
 #include SESINC
 
+int main __P((int, char **));
+
 int
 main(argc, argv)
        int argc;
diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/getobjmap.c
--- a/usr.sbin/sesd/srcs/getobjmap.c    Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/getobjmap.c    Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getobjmap.c,v 1.1 2000/02/21 08:10:28 mjacob Exp $ */ 
+/* $NetBSD: getobjmap.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -41,6 +41,7 @@
 #include <sys/ioctl.h>
 #include SESINC
 
+int main __P((int, char **));
 extern char *geteltnm __P((int));
 
 int
diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/getobjstat.c
--- a/usr.sbin/sesd/srcs/getobjstat.c   Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/getobjstat.c   Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getobjstat.c,v 1.1 2000/02/21 08:10:29 mjacob Exp $ */ 
+/* $NetBSD: getobjstat.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -40,6 +40,8 @@
 #include <sys/ioctl.h>
 #include SESINC
 
+int main __P((int, char **));
+
 int
 main(a, v)
        int a;
diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/inienc.c
--- a/usr.sbin/sesd/srcs/inienc.c       Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/inienc.c       Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inienc.c,v 1.1 2000/02/21 08:10:29 mjacob Exp $ */ 
+/* $NetBSD: inienc.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -41,6 +41,8 @@
 #include <sys/ioctl.h>
 #include SESINC
 
+int __P((int, char **));
+
 int
 main(a, v)
        int a;
diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/sesd.c
--- a/usr.sbin/sesd/srcs/sesd.c Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/sesd.c Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sesd.c,v 1.1 2000/02/21 08:10:30 mjacob Exp $ */
+/* $NetBSD: sesd.c,v 1.2 2000/02/22 06:06:08 mjacob Exp $ */
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -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 @@
 {
        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 @@
 
        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 -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/setencstat.c
--- a/usr.sbin/sesd/srcs/setencstat.c   Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/setencstat.c   Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setencstat.c,v 1.1 2000/02/21 08:10:30 mjacob Exp $ */ 
+/* $NetBSD: setencstat.c,v 1.2 2000/02/22 06:06:09 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -41,6 +41,8 @@
 #include <sys/ioctl.h>
 #include SESINC
 
+int main __P((int, char **));
+
 int
 main(a, v)
        int a;
diff -r b32487a5c600 -r 199bcf493ab1 usr.sbin/sesd/srcs/setobjstat.c
--- a/usr.sbin/sesd/srcs/setobjstat.c   Tue Feb 22 05:47:15 2000 +0000
+++ b/usr.sbin/sesd/srcs/setobjstat.c   Tue Feb 22 06:06:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setobjstat.c,v 1.1 2000/02/21 08:10:30 mjacob Exp $ */ 
+/* $NetBSD: setobjstat.c,v 1.2 2000/02/22 06:06:10 mjacob Exp $ */ 
 /* $FreeBSD: $ */
 /* $OpenBSD: $ */
 /*
@@ -41,6 +41,8 @@
 #include <sys/ioctl.h>
 #include SESINC
 
+int main __P((int, char **));
+
 int
 main(a, v)
        int a;



Home | Main Index | Thread Index | Old Index