summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-21 16:16:27 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-21 16:16:27 +0000
commit81bf262cce2981c90ccec7a148519a54d9f78bda (patch)
tree624e3432ad589bcf29739f62ff19616e63a11eff
parentae56e1b2dcb5b46688524346a1d7321f1834501b (diff)
Fix signal handlers to take an int arg even though it is not used.
This allows us to use real prototypes for rmtconnaborted and alarmcatch without causing a warning.
-rw-r--r--sbin/dump/dumprmt.c17
-rw-r--r--sbin/dump/optr.c11
2 files changed, 15 insertions, 13 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c
index d6a28e32bb5..000d6fb5ca8 100644
--- a/sbin/dump/dumprmt.c
+++ b/sbin/dump/dumprmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dumprmt.c,v 1.17 2002/02/19 19:39:38 millert Exp $ */
+/* $OpenBSD: dumprmt.c,v 1.18 2002/02/21 16:16:26 millert Exp $ */
/* $NetBSD: dumprmt.c,v 1.17 1997/06/05 16:10:47 mrg Exp $ */
/*-
@@ -83,7 +83,7 @@ static char *rmtpeer;
static int okname(char *);
static int rmtcall(char *, char *);
-static void rmtconnaborted(/* int, int */);
+static void rmtconnaborted(int);
static int rmtgetb(void);
static void rmtgetconn(void);
static void rmtgets(char *, int);
@@ -109,7 +109,8 @@ rmthost(host)
}
static void
-rmtconnaborted()
+rmtconnaborted(signo)
+ int signo;
{
/* XXX signal race */
errx(X_ABORT, "Lost connection to remote host.");
@@ -223,7 +224,7 @@ rmtread(buf, count)
for (i = 0; i < n; i += cc) {
cc = read(rmtape, buf+i, n - i);
if (cc <= 0) {
- rmtconnaborted();
+ rmtconnaborted(0);
}
}
return (n);
@@ -312,7 +313,7 @@ rmtcall(cmd, buf)
{
if (write(rmtape, buf, strlen(buf)) != strlen(buf))
- rmtconnaborted();
+ rmtconnaborted(0);
return (rmtreply(cmd));
}
@@ -340,7 +341,7 @@ rmtreply(cmd)
msg("Protocol to remote tape server botched (code \"%s\").\n",
code);
- rmtconnaborted();
+ rmtconnaborted(0);
}
return (atoi(code + 1));
}
@@ -351,7 +352,7 @@ rmtgetb()
char c;
if (read(rmtape, &c, 1) != 1)
- rmtconnaborted();
+ rmtconnaborted(0);
return (c);
}
@@ -375,5 +376,5 @@ rmtgets(line, len)
*cp = '\0';
msg("Protocol to remote tape server botched.\n");
msg("(rmtgets got \"%s\").\n", line);
- rmtconnaborted();
+ rmtconnaborted(0);
}
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 1324ea8f829..8ee003231da 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optr.c,v 1.21 2002/02/19 19:39:38 millert Exp $ */
+/* $OpenBSD: optr.c,v 1.22 2002/02/21 16:16:26 millert Exp $ */
/* $NetBSD: optr.c,v 1.11 1997/05/27 08:34:36 mrg Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94";
#else
-static char rcsid[] = "$OpenBSD: optr.c,v 1.21 2002/02/19 19:39:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: optr.c,v 1.22 2002/02/21 16:16:26 millert Exp $";
#endif
#endif /* not lint */
@@ -61,7 +61,7 @@ static char rcsid[] = "$OpenBSD: optr.c,v 1.21 2002/02/19 19:39:38 millert Exp $
#include "dump.h"
#include "pathnames.h"
-void alarmcatch(/* int, int */);
+void alarmcatch(int);
int datesort(const void *, const void *);
/*
@@ -93,7 +93,7 @@ query(question)
quit("fopen on %s fails: %s\n", _PATH_TTY, strerror(errno));
attnmessage = question;
timeout = 0;
- alarmcatch();
+ alarmcatch(0);
back = -1;
errcount = 0;
do {
@@ -138,7 +138,8 @@ char lastmsg[BUFSIZ];
* XXX not safe
*/
void
-alarmcatch()
+alarmcatch(signo)
+ int signo;
{
int save_errno = errno;