Hidden commands have no help string. Make this consistent: the m_help
entry is always there, but may be empty.
Signed-off-by: Sage Weil <sage@inktank.com>
ldout(m_cct, 5) << "register_command " << command << " hook " << hook << dendl;
m_hooks[command] = hook;
m_descs[command] = cmddesc;
- if (help.length())
- m_help[command] = help;
+ m_help[command] = help;
ret = 0;
}
m_lock.Unlock();
for (map<string,string>::iterator p = m_as->m_help.begin();
p != m_as->m_help.end();
++p) {
- f->dump_string(p->first.c_str(), p->second);
+ if (p->second.length())
+ f->dump_string(p->first.c_str(), p->second);
}
f->close_section();
ostringstream ss;