#include <EtcRaidtab.h>
Public Member Functions | |
| EtcRaidtab (const string &prefix="") | |
| ~EtcRaidtab () | |
| void | updateEntry (unsigned num, const std::list< string > &entries, const string &, const std::list< string > &devs) |
| void | removeEntry (unsigned num) |
Protected Member Functions | |
| void | updateMdadmFile () |
| void | buildMdadmMap () |
Protected Attributes | |
| Regex * | whitespace |
| Regex * | comment |
| string | mdadmname |
| int | mdadm_dev_line |
| std::map< unsigned, entry > | mtab |
| AsciiFile * | mdadm |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const entry &v) |
Classes | |
| struct | entry |
| EtcRaidtab::EtcRaidtab | ( | const string & | prefix = "" |
) |
References buildMdadmMap(), comment, mdadm, mdadm_dev_line, mdadmname, and whitespace.
| EtcRaidtab::~EtcRaidtab | ( | ) |
References comment, mdadm, and whitespace.
| void storage::EtcRaidtab::updateEntry | ( | unsigned | num, | |
| const std::list< string > & | entries, | |||
| const string & | , | |||
| const std::list< string > & | devs | |||
| ) |
Referenced by storage::MdCo::updateEntry().
| void EtcRaidtab::removeEntry | ( | unsigned | num | ) |
References mdadm, mtab, storage::AsciiFile::remove(), and updateMdadmFile().
Referenced by storage::MdCo::doRemove().
| void EtcRaidtab::updateMdadmFile | ( | ) | [protected] |
References buildMdadmMap(), storage::AsciiFile::loadFile(), mdadm, mdadmname, mtab, and storage::AsciiFile::updateFile().
Referenced by removeEntry().
| void EtcRaidtab::buildMdadmMap | ( | ) | [protected] |
References storage::extractNthWord(), storage::EtcRaidtab::entry::first, storage::EtcRaidtab::entry::last, mdadm, mdadm_dev_line, storage::Md::mdStringNum(), and mtab.
Referenced by EtcRaidtab(), and updateMdadmFile().
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const entry & | v | |||
| ) | [friend] |
Regex* storage::EtcRaidtab::whitespace [protected] |
Referenced by EtcRaidtab(), and ~EtcRaidtab().
Regex* storage::EtcRaidtab::comment [protected] |
Referenced by EtcRaidtab(), and ~EtcRaidtab().
string storage::EtcRaidtab::mdadmname [protected] |
Referenced by EtcRaidtab(), and updateMdadmFile().
int storage::EtcRaidtab::mdadm_dev_line [protected] |
Referenced by buildMdadmMap(), and EtcRaidtab().
std::map<unsigned,entry> storage::EtcRaidtab::mtab [protected] |
Referenced by buildMdadmMap(), removeEntry(), and updateMdadmFile().
AsciiFile* storage::EtcRaidtab::mdadm [protected] |
Referenced by buildMdadmMap(), EtcRaidtab(), removeEntry(), updateMdadmFile(), and ~EtcRaidtab().
1.5.5