summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-26 18:10:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-26 18:10:50 +0000
commit675e3c917c863730439607de09b659ca558222af (patch)
tree71ccc21ff209b0d47e922f414525fa630c3facd2
parentf19c1a4fea645cb229b7c4786d84b0e869e67230 (diff)
extract errno from rmt operation, assuming other machine has same errno values; gibbs@narnia.plutotech.com
-rw-r--r--sbin/dump/dumprmt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c
index 915af493132..f8291d0b46b 100644
--- a/sbin/dump/dumprmt.c
+++ b/sbin/dump/dumprmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dumprmt.c,v 1.8 1997/07/05 05:35:55 millert Exp $ */
+/* $OpenBSD: dumprmt.c,v 1.9 1998/04/26 18:10:49 deraadt Exp $ */
/* $NetBSD: dumprmt.c,v 1.17 1997/06/05 16:10:47 mrg Exp $ */
/*-
@@ -63,6 +63,7 @@ static char rcsid[] = "$NetBSD: dumprmt.c,v 1.10 1996/03/15 22:39:26 scottr Exp
#include <ctype.h>
#include <err.h>
#include <netdb.h>
+#include <errno.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
@@ -334,10 +335,9 @@ rmtreply(cmd)
if (*code == 'E' || *code == 'F') {
rmtgets(emsg, sizeof(emsg));
msg("%s: %s", cmd, emsg);
- if (*code == 'F') {
+ errno = atoi(&code[1]);
+ if (*code == 'F')
rmtstate = TS_CLOSED;
- return (-1);
- }
return (-1);
}
if (*code != 'A') {