#include <Loop.h>

Public Member Functions | |
| Loop (const LoopCo &d, const string &LoopDev, const string &LoopFile, bool dmcrypt, const string &dm_dev, ProcPart &ppart, SystemCmd &losetup) | |
| Loop (const LoopCo &d, const string &file, bool reuseExisting, unsigned long long sizeK, bool dmcr) | |
| Loop (const LoopCo &d, const Loop &rhs) | |
| virtual | ~Loop () |
| const string & | loopFile () const |
| void | setLoopFile (const string &file) |
| bool | getReuse () |
| void | setReuse (bool reuseExisting) |
| void | setDelFile (bool val=true) |
| bool | removeFile () |
| bool | createFile () |
| string | lfileRealPath () const |
| void | setDmcryptDev (const string &dm_dev, bool active=true) |
| virtual void | print (std::ostream &s) const |
| virtual int | setEncryption (bool val, storage::EncryptType typ=storage::ENC_LUKS) |
| string | removeText (bool doing) const |
| string | createText (bool doing) const |
| string | formatText (bool doing) const |
| void | getInfo (storage::LoopInfo &info) const |
| bool | equalContent (const Loop &rhs) const |
| void | logDifference (const Loop &d) const |
Static Public Member Functions | |
| static unsigned | major () |
| static string | loopDeviceName (unsigned num) |
| static bool | notDeleted (const Loop &l) |
Protected Member Functions | |
| void | init () |
| void | checkReuse () |
| Loop & | operator= (const Loop &) |
Static Protected Member Functions | |
| static void | getLoopMajor () |
Protected Attributes | |
| string | lfile |
| bool | reuseFile |
| bool | delFile |
| storage::LoopInfo | info |
Static Protected Attributes | |
| static unsigned | loop_major = 0 |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Loop &l) |
| Loop::Loop | ( | const LoopCo & | d, | |
| const string & | LoopDev, | |||
| const string & | LoopFile, | |||
| bool | dmcrypt, | |||
| const string & | dm_dev, | |||
| ProcPart & | ppart, | |||
| SystemCmd & | losetup | |||
| ) |
References storage::Volume::alt_names, storage::Volume::dev, storage::ENC_LUKS, storage::Volume::fstab_loop_dev, storage::Volume::getFreeLoop(), storage::Volume::getLoopData(), storage::Volume::getMajorMinor(), storage::ProcPart::getSize(), init(), storage::Volume::is_loop, lfile, storage::LOOP, storage::Volume::loop_dev, storage::LoopCo::loopIds(), storage::Volume::loopStringNum(), storage::Volume::mjr, storage::Volume::mnr, storage::Volume::num, storage::Volume::numeric, setDmcryptDev(), setEncryption(), storage::Volume::setNameDev(), storage::Volume::setSize(), storage::Container::type(), y2error, and y2milestone.
| Loop::Loop | ( | const LoopCo & | d, | |
| const string & | file, | |||
| bool | reuseExisting, | |||
| unsigned long long | sizeK, | |||
| bool | dmcr | |||
| ) |
References checkReuse(), storage::Volume::dev, storage::Volume::dmcrypt_dev, storage::ENC_LUKS, storage::Volume::getDmcryptName(), storage::Volume::getFreeLoop(), storage::Volume::getMajorMinor(), init(), storage::Volume::is_loop, lfile, storage::LOOP, storage::Volume::loop_dev, storage::Volume::loopStringNum(), storage::Volume::mjr, storage::Volume::mnr, storage::Volume::num, storage::Volume::numeric, reuseFile, setDmcryptDev(), setEncryption(), storage::Volume::setNameDev(), storage::Volume::setSize(), storage::Container::type(), y2error, and y2milestone.
References storage::Volume::nm, and y2debug.
| Loop::~Loop | ( | ) | [virtual] |
References storage::Volume::dev, and y2debug.
| const string& storage::Loop::loopFile | ( | ) | const [inline] |
| void Loop::setLoopFile | ( | const string & | file | ) |
References checkReuse(), and lfile.
| bool storage::Loop::getReuse | ( | ) | [inline] |
References reuseFile.
| void Loop::setReuse | ( | bool | reuseExisting | ) |
References checkReuse(), and reuseFile.
| void storage::Loop::setDelFile | ( | bool | val = true |
) | [inline] |
References delFile.
| bool Loop::removeFile | ( | ) |
References delFile, and lfileRealPath().
| bool Loop::createFile | ( | ) |
| string Loop::lfileRealPath | ( | ) | const |
References storage::Volume::cont, storage::Container::getStorage(), lfile, and storage::Storage::root().
Referenced by checkReuse(), createFile(), storage::Volume::getLosetupCmd(), and removeFile().
| void Loop::setDmcryptDev | ( | const string & | dm_dev, | |
| bool | active = true | |||
| ) |
Reimplemented from storage::Volume.
References storage::decString(), storage::Volume::dev, storage::Volume::getMajorMinor(), storage::Volume::mjr, storage::Volume::mnr, storage::Volume::nm, storage::Volume::replaceAltName(), and storage::Volume::setDmcryptDev().
Referenced by Loop(), and setEncryption().
| virtual void storage::Loop::print | ( | std::ostream & | s | ) | const [inline, virtual] |
Reimplemented from storage::Volume.
| int Loop::setEncryption | ( | bool | val, | |
| storage::EncryptType | typ = storage::ENC_LUKS | |||
| ) | [virtual] |
Reimplemented from storage::Volume.
References storage::Volume::dev, storage::Volume::dmcrypt(), storage::Volume::dmcrypt_dev, storage::Volume::encryption, storage::Volume::getDmcryptName(), storage::Volume::loop_dev, storage::Volume::numeric, storage::Volume::orig_encryption, setDmcryptDev(), storage::Volume::setEncryption(), and y2mil.
Referenced by storage::LoopCo::getLoopData(), and Loop().
| string Loop::removeText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Volume::dev, storage::sformat(), and storage::Volume::sizeString().
| string Loop::createText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Volume::dev, storage::ENC_NONE, storage::Volume::encryption, storage::Volume::fsTypeString(), lfile, storage::Volume::mp, storage::sformat(), and storage::Volume::sizeString().
| string Loop::formatText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Volume::dev, storage::ENC_NONE, storage::Volume::encryption, storage::Volume::fsTypeString(), lfile, storage::Volume::mp, storage::sformat(), and storage::Volume::sizeString().
| void Loop::getInfo | ( | storage::LoopInfo & | info | ) | const |
| bool Loop::equalContent | ( | const Loop & | rhs | ) | const |
References delFile, storage::Volume::equalContent(), lfile, and reuseFile.
| void Loop::logDifference | ( | const Loop & | d | ) | const |
References delFile, lfile, storage::Volume::logDifference(), reuseFile, and y2milestone.
| unsigned Loop::major | ( | ) | [static] |
References getLoopMajor(), and loop_major.
Referenced by storage::Dm::getDevice(), and storage::LoopCo::init().
| string Loop::loopDeviceName | ( | unsigned | num | ) | [static] |
| static bool storage::Loop::notDeleted | ( | const Loop & | l | ) | [inline, static] |
| void Loop::init | ( | ) | [protected] |
| void Loop::checkReuse | ( | ) | [protected] |
References lfileRealPath(), reuseFile, storage::Volume::setSize(), storage::Volume::sizeK(), and y2mil.
Referenced by Loop(), setLoopFile(), and setReuse().
| void Loop::getLoopMajor | ( | ) | [static, protected] |
References delFile, lfile, storage::Volume::nm, reuseFile, and y2debug.
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const Loop & | l | |||
| ) | [friend] |
string storage::Loop::lfile [protected] |
Referenced by createText(), equalContent(), formatText(), getInfo(), lfileRealPath(), logDifference(), Loop(), loopFile(), storage::operator<<(), operator=(), and setLoopFile().
bool storage::Loop::reuseFile [protected] |
Referenced by checkReuse(), createFile(), equalContent(), getInfo(), getReuse(), init(), logDifference(), Loop(), storage::operator<<(), operator=(), and setReuse().
bool storage::Loop::delFile [protected] |
Referenced by equalContent(), init(), logDifference(), storage::operator<<(), operator=(), removeFile(), and setDelFile().
unsigned Loop::loop_major = 0 [static, protected] |
Referenced by getLoopMajor(), and major().
storage::LoopInfo storage::Loop::info [mutable, protected] |
1.5.5