From 4a0a502bf48e4ce6888d353104deab521e93563f Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 30 Jun 2011 15:04:58 +0000 Subject: [PATCH] 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@ --- src/lib/libutil/opendev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/libutil/opendev.c b/src/lib/libutil/opendev.c index f82d5fa9..0be447d1 100644 --- a/src/lib/libutil/opendev.c +++ b/src/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) {