You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/07/07 18:20:06 UTC

[10/11] mesos git commit: Added equality(==) operator overload for `FileInfo`.

Added equality(==) operator overload for `FileInfo`.

Review: https://reviews.apache.org/r/49551/


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

Branch: refs/heads/master
Commit: d9739f1be0e25db281e77b275948136c767df1ea
Parents: 9430263
Author: Abhishek Dasgupta <a1...@linux.vnet.ibm.com>
Authored: Thu Jul 7 10:52:24 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Thu Jul 7 11:06:55 2016 -0700

----------------------------------------------------------------------
 include/mesos/v1/mesos.hpp |  1 +
 src/v1/mesos.cpp           | 12 ++++++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d9739f1b/include/mesos/v1/mesos.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.hpp b/include/mesos/v1/mesos.hpp
index d220966..936af77 100644
--- a/include/mesos/v1/mesos.hpp
+++ b/include/mesos/v1/mesos.hpp
@@ -49,6 +49,7 @@ bool operator==(const Credential& left, const Credential& right);
 bool operator==(const DiscoveryInfo& left, const DiscoveryInfo& right);
 bool operator==(const Environment& left, const Environment& right);
 bool operator==(const ExecutorInfo& left, const ExecutorInfo& right);
+bool operator==(const FileInfo& left, const FileInfo& right);
 bool operator==(const Label& left, const Label& right);
 bool operator==(const Labels& left, const Labels& right);
 bool operator==(const MasterInfo& left, const MasterInfo& right);

http://git-wip-us.apache.org/repos/asf/mesos/blob/d9739f1b/src/v1/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/v1/mesos.cpp b/src/v1/mesos.cpp
index 30788dc..c6a8799 100644
--- a/src/v1/mesos.cpp
+++ b/src/v1/mesos.cpp
@@ -318,6 +318,18 @@ bool operator==(const ExecutorInfo& left, const ExecutorInfo& right)
 }
 
 
+bool operator==(const FileInfo& left, const FileInfo& right)
+{
+  return left.path() == right.path() &&
+    left.nlink() == right.nlink() &&
+    left.size() == right.size() &&
+    left.mtime() == right.mtime() &&
+    left.mode() == right.mode() &&
+    left.uid() == right.uid() &&
+    left.gid() == right.gid();
+}
+
+
 bool operator==(const MasterInfo& left, const MasterInfo& right)
 {
   return left.id() == right.id() &&