You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2023/01/14 00:29:30 UTC

[mesos] branch master updated: Expose setmntent error reason in MountTable::read.

This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 8856d6fba Expose setmntent error reason in MountTable::read.
8856d6fba is described below

commit 8856d6fba11281df898fd65b0cafa1e20eb90fe8
Author: Benjamin Mahler <bm...@apache.org>
AuthorDate: Fri Jan 13 16:00:06 2023 -0500

    Expose setmntent error reason in MountTable::read.
    
    This function is documented to set errno when it fails, but we're
    not exposing it.
---
 src/linux/fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/linux/fs.cpp b/src/linux/fs.cpp
index 2e36d3fa7..27536aab3 100644
--- a/src/linux/fs.cpp
+++ b/src/linux/fs.cpp
@@ -424,7 +424,7 @@ Try<MountTable> MountTable::read(const string& path)
 
   FILE* file = ::setmntent(path.c_str(), "r");
   if (file == nullptr) {
-    return Error("Failed to open '" + path + "'");
+    return ErrnoError("Failed to open '" + path + "'");
   }
 
   while (true) {