diff options
author | Michal Soltys <soltys@ziu.info> | 2010-12-09 08:55:55 +0100 |
---|---|---|
committer | Michal Soltys <soltys@ziu.info> | 2010-12-09 08:55:55 +0100 |
commit | cf340c9990b25663c71bf58b7c4c5c719132661a (patch) | |
tree | 91eb99c0b125c5aa8d58b106146ce915f117ca16 /com32/lib | |
parent | b8e9b0f9bc9148e681862927c5e2393dc1c6e92b (diff) | |
parent | a6f3691938a78833fc1643a5dd6db66dbef81644 (diff) | |
download | syslinux-cf340c9990b25663c71bf58b7c4c5c719132661a.tar.gz |
Merge branch 'master' into chaindev
Diffstat (limited to 'com32/lib')
-rw-r--r-- | com32/lib/sys/open.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/com32/lib/sys/open.c b/com32/lib/sys/open.c index cb7c1b4d..3e7bb6cf 100644 --- a/com32/lib/sys/open.c +++ b/com32/lib/sys/open.c @@ -56,15 +56,17 @@ int open(const char *pathname, int flags, ...) struct file_info *fp; fd = opendev(&__file_dev, NULL, flags); - if (fd < 0) return -1; fp = &__file_info[fd]; handle = __com32.cs_pm->open_file(pathname, &fp->i.fd); - if (handle < 0) + if (handle < 0) { + close(fd); + errno = ENOENT; return -1; + } fp->i.offset = 0; fp->i.nbytes = 0; |