From eb4c669c94ca4f42ed3fd38dc5bb42dceae17d73 Mon Sep 17 00:00:00 2001 From: Sean Cunningham Date: Wed, 29 Feb 2012 15:21:42 -0500 Subject: [PATCH] Import rel-4_12. --- Changes | 1 + eio.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 4754fe5..2033932 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,7 @@ TODO: openbsd requires stdint.h for intptr_t - why posix? TODO: make mtouch/readdir maybe others cancellable in-request TODO: fadvise request TODO: fdopendir/utimensat +TODO: maybe work around 3.996gb barrier in pread/pwrite as well, maybe readahead etc.? 1.0 - fix a deadlock where a wakeup signal could be missed when a timeout occured at the same time. diff --git a/eio.c b/eio.c index ec7ac54..a269353 100644 --- a/eio.c +++ b/eio.c @@ -1489,7 +1489,7 @@ eio__realpath (struct tmpbuf *tmpbuf, eio_wd wd, const char *path) errno = ENAMETOOLONG; if (res + 1 + len + 1 >= tmp1) - return; + return -1; /* copy one component */ *res = '/'; @@ -1968,7 +1968,7 @@ eio__scandir (eio_req *req, etp_worker *self) { if (*name == '.') /* leading dots are likely directories, and, in any case, rare */ ent->score = 1; - else if (!strchr (name, '.')) /* absense of dots indicate likely dirs */ + else if (!strchr (name, '.')) /* absence of dots indicate likely dirs */ ent->score = len <= 2 ? 4 - len : len <= 4 ? 4 : len <= 7 ? 5 : 6; /* shorter == more likely dir, but avoid too many classes */ } else if (ent->type == EIO_DT_DIR)