auth: clean up cap parse error messages

Consistent formatted.  Drop newline.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-08-12 13:20:13 -05:00
parent 35820f4b88
commit e0b59e91d1
3 changed files with 9 additions and 7 deletions

View File

@ -335,8 +335,9 @@ bool MDSAuthCaps::parse(CephContext *c, std::string_view str, ostream *err)
grants.clear();
if (err)
*err << "MDSAuthCaps parse failed, stopped at '" << std::string(iter, end)
<< "' of '" << str << "'\n";
*err << "mds capability parse failed, stopped at '"
<< std::string(iter, end)
<< "' of '" << str << "'";
return false;
}
}

View File

@ -613,10 +613,11 @@ bool MonCap::parse(const string& str, ostream *err)
if (err) {
if (iter != end)
*err << "moncap parse failed, stopped at '" << std::string(iter, end)
<< "' of '" << str << "'\n";
*err << "mon capability parse failed, stopped at '"
<< std::string(iter, end)
<< "' of '" << str << "'";
else
*err << "moncap parse failed, stopped at end of '" << str << "'\n";
*err << "mon capability parse failed, stopped at end of '" << str << "'";
}
return false;

View File

@ -535,8 +535,8 @@ bool OSDCap::parse(const string& str, ostream *err)
grants.clear();
if (err)
*err << "osdcap parse failed, stopped at '" << std::string(iter, end)
<< "' of '" << str << "'\n";
*err << "osd capability parse failed, stopped at '" << std::string(iter, end)
<< "' of '" << str << "'";
return false;
}