Browse Source

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@
OPENBSD_5_0
jsing 13 years ago
parent
commit
4a0a502bf4
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      src/lib/libutil/opendev.c

+ 1
- 4
src/lib/libutil/opendev.c View File

@ -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) {


Loading…
Cancel
Save