hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bobhan...@apache.org
Subject hadoop git commit: HDFS-9792: libhdfs++: EACCES not setting errno correctly. Contributed by Bob Hansen.
Date Wed, 09 Mar 2016 19:33:52 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-8707 8da3bbd9e -> 6c19c78fa


HDFS-9792: libhdfs++: EACCES not setting errno correctly.  Contributed by Bob Hansen.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6c19c78f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6c19c78f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6c19c78f

Branch: refs/heads/HDFS-8707
Commit: 6c19c78fa32f6b97fa704ab1d0926fc56ca977b3
Parents: 8da3bbd
Author: Bob Hansen <bob@hp.com>
Authored: Wed Mar 9 13:54:58 2016 -0500
Committer: Bob Hansen <bob@hp.com>
Committed: Wed Mar 9 13:54:58 2016 -0500

----------------------------------------------------------------------
 .../src/main/native/libhdfspp/lib/bindings/c/hdfs.cc           | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6c19c78f/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc
index 85f29d8..03f3140 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc
@@ -134,10 +134,8 @@ static int Error(const Status &stat) {
       default_message = "Operation canceled";
       break;
     case Status::Code::kPermissionDenied:
-      if (!stat.ToString().empty())
-        ReportError(EACCES, stat.ToString().c_str());
-      else
-        ReportError(EACCES, "Permission denied");
+      errnum = EACCES;
+      default_message = "Permission denied";
       break;
     default:
       errnum = ENOSYS;


Mime
View raw message