Commit 100f08f5 authored by Eric Cano's avatar Eric Cano
Browse files

Added sorting of the output of cta drive ls.

parent 91d83785
......@@ -1825,6 +1825,8 @@ std::string XrdCtaFile::xCom_drive() {
std::vector<std::vector<std::string>> responseTable;
std::vector<std::string> headers = {"drive", "host", "library", "mountType", "status", "desiredUp", "vid", "tapepool","session id","since","files","bytes","latest speed", "last updated"};
responseTable.push_back(headers);
typedef decltype(*driveStates.begin()) dStateVal;
driveStates.sort([](const dStateVal & a, const dStateVal & b){ return a.driveName < b.driveName; });
for (auto ds: driveStates) {
if (singleDrive && m_requestTokens.at(3) != ds.driveName) continue;
driveFound = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment