[libglnx] dirfd: Add filename to glnx_opendirat()



commit 23f7df15006f14ddc3bc2ddee690f7f8604c3ebe
Author: Colin Walters <walters verbum org>
Date:   Wed Jul 19 09:30:13 2017 -0400

    dirfd: Add filename to glnx_opendirat()
    
    This showed up in https://github.com/projectatomic/rpm-ostree/issues/883
    
    We'll have to audit callers to be sure to avoid double-prefixing.

 glnx-dirfd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/glnx-dirfd.c b/glnx-dirfd.c
index bb73b01..667a18d 100644
--- a/glnx-dirfd.c
+++ b/glnx-dirfd.c
@@ -67,9 +67,7 @@ glnx_opendirat (int             dfd,
 {
   int ret = glnx_opendirat_with_errno (dfd, path, follow);
   if (ret == -1)
-    {
-      return glnx_throw_errno_prefix (error, "openat");
-    }
+    return glnx_throw_errno_prefix (error, "opendir(%s)", path);
   *out_fd = ret;
   return TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]