summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2011-06-30 15:04:59 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2011-06-30 15:04:59 +0000
commitfe304ff81ef10f2b1a409ac3ba2da119131392a6 (patch)
tree119dc1cd202e984aee65fb11b356a152c4f863fe
parent0bbef3ac8e35d3e021e993f55a344fc8d019b501 (diff)
Do not mask errno if we fail to open /dev/diskmap. Also, fall through
rather than returning so that realname still gets assigned. ok millert@ deraadt@ thib@
-rw-r--r--lib/libutil/opendev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libutil/opendev.c b/lib/libutil/opendev.c
index f82d5fa9a9e..0be447d1323 100644
--- a/lib/libutil/opendev.c
+++ b/lib/libutil/opendev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opendev.c,v 1.14 2010/12/22 17:24:32 millert Exp $ */
+/* $OpenBSD: opendev.c,v 1.15 2011/06/30 15:04:58 jsing Exp $ */
/*
* Copyright (c) 2000, Todd C. Miller. All rights reserved.
@@ -81,9 +81,6 @@ opendev(const char *path, int oflags, int dflags, char **realpath)
fd = -1;
errno = ENOENT;
}
- } else if (errno != ENOENT) {
- errno = ENXIO;
- return -1;
}
}
if (!slash && fd == -1 && errno == ENOENT) {