#include <Loop.h>

Public Member Functions | |
| Loop (const LoopCo &d, const string &LoopDev, const string &LoopFile, bool dmcrypt, const string &dm_dev, SystemInfo &systeminfo, SystemCmd &losetup) | |
| Loop (const LoopCo &d, const string &file, bool reuseExisting, unsigned long long sizeK, bool dmcr) | |
| Loop (const LoopCo &c, const Loop &v) | |
| virtual | ~Loop () |
| const string & | loopFile () const |
| void | setLoopFile (const string &file) |
| bool | getReuse () const |
| 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) |
| Text | removeText (bool doing) const |
| Text | createText (bool doing) const |
| Text | formatText (bool doing) const |
| void | getInfo (storage::LoopInfo &info) const |
| bool | equalContent (const Loop &rhs) const |
| void | logDifference (std::ostream &log, const Loop &rhs) const |
Static Public Member Functions | |
| static unsigned | loopMajor () |
| static string | loopDeviceName (unsigned num) |
| static bool | notDeleted (const Loop &l) |
Protected Member Functions | |
| void | checkReuse () |
Protected Attributes | |
| string | lfile |
| bool | reuseFile |
| bool | delFile |
| storage::LoopInfo | info |
Static Protected Attributes | |
| static unsigned | loop_major = 0 |
Private Member Functions | |
| Loop (const Loop &) | |
| Loop & | operator= (const Loop &) |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Loop &l) |
| storage::Loop::Loop | ( | const LoopCo & | d, | |
| const string & | LoopDev, | |||
| const string & | LoopFile, | |||
| bool | dmcrypt, | |||
| const string & | dm_dev, | |||
| SystemInfo & | systeminfo, | |||
| SystemCmd & | losetup | |||
| ) |
References storage::Device::alt_names, storage::Device::dev, storage::ENC_LUKS, storage::Volume::fstab_loop_dev, storage::Volume::getFreeLoop(), storage::Volume::getLoopData(), storage::Device::getMajorMinor(), storage::SystemInfo::getProcParts(), storage::ProcParts::getSize(), storage::Volume::initEncryption(), storage::Volume::is_loop, lfile, storage::LOOP, storage::Volume::loop_dev, storage::Volume::loopStringNum(), storage::Volume::num, storage::Volume::numeric, setDmcryptDev(), storage::Volume::setNameDev(), storage::Volume::setSize(), storage::Container::type(), storage::LoopCo::usedNumbers(), y2err, and y2mil.
| storage::Loop::Loop | ( | const LoopCo & | d, | |
| const string & | file, | |||
| bool | reuseExisting, | |||
| unsigned long long | sizeK, | |||
| bool | dmcr | |||
| ) |
References checkReuse(), storage::Device::dev, storage::Volume::dmcrypt_dev, storage::ENC_LUKS, storage::Volume::getDmcryptName(), storage::Volume::getFreeLoop(), storage::Device::getMajorMinor(), storage::Volume::initEncryption(), storage::Volume::is_loop, storage::LOOP, storage::Volume::loop_dev, storage::Volume::loopStringNum(), storage::Volume::num, storage::Volume::numeric, reuseFile, setDmcryptDev(), storage::Volume::setNameDev(), storage::Volume::setSize(), storage::Container::type(), y2err, and y2mil.
References storage::Device::dev, and y2deb.
| storage::Loop::~Loop | ( | ) | [virtual] |
References storage::Device::dev, and y2deb.
| storage::Loop::Loop | ( | const Loop & | ) | [private] |
| const string& storage::Loop::loopFile | ( | ) | const [inline] |
| void storage::Loop::setLoopFile | ( | const string & | file | ) |
References checkReuse(), and lfile.
| bool storage::Loop::getReuse | ( | ) | const [inline] |
References reuseFile.
| void storage::Loop::setReuse | ( | bool | reuseExisting | ) |
References checkReuse(), and reuseFile.
| void storage::Loop::setDelFile | ( | bool | val = true |
) | [inline] |
References delFile.
| bool storage::Loop::removeFile | ( | ) |
References delFile, and lfileRealPath().
| bool storage::Loop::createFile | ( | ) |
| string storage::Loop::lfileRealPath | ( | ) | const |
References storage::Volume::getStorage(), lfile, and storage::Storage::root().
Referenced by checkReuse(), createFile(), storage::Volume::getLosetupCmd(), and removeFile().
| void storage::Loop::setDmcryptDev | ( | const string & | dm_dev, | |
| bool | active = true | |||
| ) |
Reimplemented from storage::Volume.
References storage::decString(), storage::Device::dev, storage::Device::getMajorMinor(), storage::Device::mnr, storage::Device::nm, storage::Volume::replaceAltName(), storage::Volume::setDmcryptDev(), and y2mil.
Referenced by Loop(), and setEncryption().
| virtual void storage::Loop::print | ( | std::ostream & | s | ) | const [inline, virtual] |
Reimplemented from storage::Volume.
| int storage::Loop::setEncryption | ( | bool | val, | |
| storage::EncryptType | typ = storage::ENC_LUKS | |||
| ) | [virtual] |
Reimplemented from storage::Volume.
References storage::Device::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(), storage::toString(), and y2mil.
Referenced by storage::LoopCo::getLoopData().
| Text storage::Loop::removeText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Device::dev, storage::sformat(), and storage::Device::sizeString().
| Text storage::Loop::createText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Device::dev, storage::ENC_NONE, storage::Volume::encryption, storage::Volume::fsTypeString(), lfile, storage::Volume::mp, storage::sformat(), and storage::Device::sizeString().
| Text storage::Loop::formatText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Device::dev, storage::ENC_NONE, storage::Volume::encryption, storage::Volume::fsTypeString(), lfile, storage::Volume::mp, storage::sformat(), and storage::Device::sizeString().
| void storage::Loop::getInfo | ( | storage::LoopInfo & | info | ) | const |
| bool storage::Loop::equalContent | ( | const Loop & | rhs | ) | const |
References delFile, storage::Volume::equalContent(), lfile, and reuseFile.
| void storage::Loop::logDifference | ( | std::ostream & | log, | |
| const Loop & | rhs | |||
| ) | const |
References delFile, lfile, storage::logDiff(), storage::Volume::logDifference(), and reuseFile.
| unsigned storage::Loop::loopMajor | ( | ) | [static] |
References storage::getMajorDevices(), loop_major, and y2mil.
Referenced by storage::PeContainer::getDeviceByNumber().
| string storage::Loop::loopDeviceName | ( | unsigned | num | ) | [static] |
| static bool storage::Loop::notDeleted | ( | const Loop & | l | ) | [inline, static] |
| void storage::Loop::checkReuse | ( | ) | [protected] |
References lfileRealPath(), reuseFile, storage::Volume::setSize(), storage::Device::sizeK(), and y2mil.
Referenced by Loop(), setLoopFile(), and setReuse().
| 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<<(), and setLoopFile().
bool storage::Loop::reuseFile [protected] |
Referenced by checkReuse(), createFile(), equalContent(), getInfo(), getReuse(), logDifference(), Loop(), storage::operator<<(), and setReuse().
bool storage::Loop::delFile [protected] |
Referenced by equalContent(), logDifference(), storage::operator<<(), removeFile(), and setDelFile().
unsigned storage::Loop::loop_major = 0 [static, protected] |
Referenced by loopMajor().
storage::LoopInfo storage::Loop::info [mutable, protected] |
1.5.6