]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Add basic operator<< to MonCaps
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 9 Mar 2010 22:13:38 +0000 (14:13 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 10 Mar 2010 21:22:02 +0000 (13:22 -0800)
src/mon/MonCaps.h

index ffe919d09a184e917de28db2ffe8a2f520709ed3..d2efdd1bf1264c8dfe8222b0269263698c66e9cb 100644 (file)
@@ -45,11 +45,14 @@ struct MonCaps {
   __u64 auid;
 public:
   MonCaps() : default_action(0), allow_all(false) {}
-  const string& get_str() { return text; }
+  const string& get_str() const { return text; }
   bool parse(bufferlist::iterator& iter);
   rwx_t get_caps(int service);
   void set_allow_all(bool allow) { allow_all = allow; }
   void set_auid(__u64 uid) { auid = uid; }
 };
 
+inline ostream& operator<<(ostream& out, const MonCaps& m) {
+  return out << m.get_str();
+}
 #endif