summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/utilities.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-15 19:52:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-15 19:52:38 +0000
commit84f60feed4123b36d6f273cc6f9648b020d1597d (patch)
tree5cb5c2afa0e548860b5e2762b821fc94e073f192 /sbin/fsck_ffs/utilities.c
parent705058dc6492d3cd230ccdd5a30223b3be2c1824 (diff)
save_errno in signal handler
Diffstat (limited to 'sbin/fsck_ffs/utilities.c')
-rw-r--r--sbin/fsck_ffs/utilities.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c
index 8e13cd8b94a..5e2100ea702 100644
--- a/sbin/fsck_ffs/utilities.c
+++ b/sbin/fsck_ffs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.8 2000/09/30 16:06:34 aaron Exp $ */
+/* $OpenBSD: utilities.c,v 1.9 2001/01/15 19:52:37 deraadt Exp $ */
/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: utilities.c,v 1.8 2000/09/30 16:06:34 aaron Exp $";
+static char rcsid[] = "$OpenBSD: utilities.c,v 1.9 2001/01/15 19:52:37 deraadt Exp $";
#endif
#endif /* not lint */
@@ -54,6 +54,7 @@ static char rcsid[] = "$OpenBSD: utilities.c,v 1.8 2000/09/30 16:06:34 aaron Exp
#include <string.h>
#include <ctype.h>
#include <unistd.h>
+#include <errno.h>
#include <fcntl.h>
#include <paths.h>
@@ -563,6 +564,7 @@ void
catchinfo(n)
int n;
{
+ int save_errno = errno;
char buf[1024];
struct iovec iov[4];
int fd;
@@ -583,5 +585,6 @@ catchinfo(n)
close(fd);
}
}
+ errno = save_errno;
}