|
yast2-storage
|
#include <LoopCo.h>
Classes | |
| struct | LoopCPI |
| struct | LoopPI |
Public Member Functions | |
| LoopCo (Storage *const s) | |
| LoopCo (Storage *const s, SystemInfo &systeminfo) | |
| LoopCo (const LoopCo &c) | |
| virtual | ~LoopCo () |
| int | createLoop (const string &file, bool reuseExisting, unsigned long long sizeK, bool dmcr, string &device) |
| int | updateLoop (const string &device, const string &file, bool reuseExisting, unsigned long long sizeK) |
| int | removeLoop (const string &file, bool removeFile=false) |
| list< unsigned > | usedNumbers () const |
| int | removeVolume (Volume *v) |
| bool | equalContent (const Container &rhs) const |
| virtual void | logDifferenceWithVolumes (std::ostream &log, const Container &rhs) const |
Static Public Member Functions | |
| static storage::CType | staticType () |
Protected Types | |
| typedef CastIterator< VIter, Loop * > | LoopInter |
| typedef CastIterator< CVIter, const Loop * > | LoopCInter |
| typedef CheckFnc< const Loop > | CheckFncLoop |
| typedef CheckerIterator < CheckFncLoop, LoopPI < CheckFncLoop >::type, LoopInter, Loop > | LoopPIterator |
| typedef CheckerIterator < CheckFncLoop, LoopCPI < CheckFncLoop >::type, LoopCInter, const Loop > | LoopCPIterator |
| typedef DerefIterator < LoopPIterator, Loop > | LoopIter |
| typedef DerefIterator < LoopCPIterator, const Loop > | ConstLoopIter |
| typedef IterPair< LoopIter > | LoopPair |
| typedef IterPair< ConstLoopIter > | ConstLoopPair |
Protected Member Functions | |
| LoopPair | loopPair (bool(*Check)(const Loop &)=NULL) |
| LoopIter | loopBegin (bool(*Check)(const Loop &)=NULL) |
| LoopIter | loopEnd (bool(*Check)(const Loop &)=NULL) |
| ConstLoopPair | loopPair (bool(*Check)(const Loop &)=NULL) const |
| ConstLoopIter | loopBegin (bool(*Check)(const Loop &)=NULL) const |
| ConstLoopIter | loopEnd (bool(*Check)(const Loop &)=NULL) const |
| void | getLoopData (SystemInfo &systeminfo) |
| bool | findLoop (unsigned num, LoopIter &i) |
| bool | findLoop (unsigned num) |
| bool | findLoop (const string &file, LoopIter &i) |
| bool | findLoop (const string &file) |
| bool | findLoopDev (const string &dev, LoopIter &i) |
| void | addLoop (Loop *m) |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| int | doCreate (Volume *v) |
| int | doRemove (Volume *v) |
Private Member Functions | |
| LoopCo & | operator= (const LoopCo &) |
Friends | |
| class | Storage |
| std::ostream & | operator<< (std::ostream &, const LoopCo &) |
typedef CheckFnc<const Loop> storage::LoopCo::CheckFncLoop [protected] |
typedef DerefIterator<LoopCPIterator,const Loop> storage::LoopCo::ConstLoopIter [protected] |
typedef IterPair<ConstLoopIter> storage::LoopCo::ConstLoopPair [protected] |
typedef CastIterator<CVIter, const Loop *> storage::LoopCo::LoopCInter [protected] |
typedef CheckerIterator< CheckFncLoop, LoopCPI<CheckFncLoop>::type, LoopCInter, const Loop > storage::LoopCo::LoopCPIterator [protected] |
typedef CastIterator<VIter, Loop *> storage::LoopCo::LoopInter [protected] |
typedef DerefIterator<LoopPIterator,Loop> storage::LoopCo::LoopIter [protected] |
typedef IterPair<LoopIter> storage::LoopCo::LoopPair [protected] |
typedef CheckerIterator< CheckFncLoop, LoopPI<CheckFncLoop>::type, LoopInter, Loop > storage::LoopCo::LoopPIterator [protected] |
| storage::LoopCo::LoopCo | ( | Storage *const | s, |
| SystemInfo & | systeminfo | ||
| ) |
References y2deb.
| storage::LoopCo::LoopCo | ( | const LoopCo & | c | ) |
| storage::LoopCo::~LoopCo | ( | ) | [virtual] |
References y2deb.
| void storage::LoopCo::addLoop | ( | Loop * | m | ) | [protected] |
| int storage::LoopCo::createLoop | ( | const string & | file, |
| bool | reuseExisting, | ||
| unsigned long long | sizeK, | ||
| bool | dmcr, | ||
| string & | device | ||
| ) |
References storage::Device::device(), storage::LOOP_CHANGE_READONLY, storage::LOOP_DUPLICATE_FILE, storage::Device::setCreated(), and y2mil.
Referenced by storage::Storage::createFileLoop().
| int storage::LoopCo::doCreate | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References storage::LOOP_CREATE_INVALID_VOLUME, storage::LOOP_FILE_CREATE_FAILED, storage::Device::name(), and y2mil.
| int storage::LoopCo::doRemove | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References storage::LOOP_NOT_IN_LIST, storage::LOOP_REMOVE_FILE_FAILED, storage::LOOP_REMOVE_INVALID_VOLUME, storage::Device::name(), storage::Volume::prepareRemove(), and y2mil.
| bool storage::LoopCo::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::equalContent(), and loopPair().
| bool storage::LoopCo::findLoop | ( | unsigned | num | ) | [protected] |
| bool storage::LoopCo::findLoop | ( | const string & | file, |
| LoopIter & | i | ||
| ) | [protected] |
| bool storage::LoopCo::findLoop | ( | const string & | file | ) | [protected] |
| bool storage::LoopCo::findLoop | ( | unsigned | num, |
| LoopIter & | i | ||
| ) | [protected] |
| bool storage::LoopCo::findLoopDev | ( | const string & | dev, |
| LoopIter & | i | ||
| ) | [protected] |
| virtual Container* storage::LoopCo::getCopy | ( | ) | const [inline, protected, virtual] |
Implements storage::Container.
References LoopCo().
| void storage::LoopCo::getLoopData | ( | SystemInfo & | systeminfo | ) | [protected] |
References storage::ProcMounts::allMounts(), storage::IterPair< Iter >::begin(), storage::checkNormalFile(), storage::Device::device(), storage::IterPair< Iter >::end(), storage::FSUNKNOWN, storage::EtcFstab::getFileBasedLoops(), storage::SystemInfo::getProcMounts(), storage::Volume::loopInUse(), LOSETUPBIN, storage::Loop::notDeleted(), storage::Loop::setEncryption(), storage::Volume::setFs(), storage::Device::sizeK(), storage::toValueWithFallback(), y2mil, and y2war.
| void storage::LoopCo::logDifferenceWithVolumes | ( | std::ostream & | log, |
| const Container & | rhs | ||
| ) | const [virtual] |
Implements storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::logVolumesDifference(), and loopPair().
References storage::Container::begin(), and storage::Container::end().
Referenced by loopPair().
| ConstLoopIter storage::LoopCo::loopBegin | ( | bool(*)(const Loop &) | Check = NULL | ) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| ConstLoopIter storage::LoopCo::loopEnd | ( | bool(*)(const Loop &) | Check = NULL | ) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
References storage::Container::begin(), and storage::Container::end().
Referenced by loopPair().
References loopBegin(), and loopEnd().
Referenced by equalContent(), logDifferenceWithVolumes(), and LoopCo().
| ConstLoopPair storage::LoopCo::loopPair | ( | bool(*)(const Loop &) | Check = NULL | ) | const [inline, protected] |
References loopBegin(), and loopEnd().
| virtual void storage::LoopCo::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
| int storage::LoopCo::removeLoop | ( | const string & | file, |
| bool | removeFile = false |
||
| ) |
References storage::LOOP_CHANGE_READONLY, storage::LOOP_REMOVE_CREATE_NOT_FOUND, storage::LOOP_REMOVE_USED_BY, storage::LOOP_UNKNOWN_FILE, and y2mil.
Referenced by storage::Storage::removeFileLoop().
| int storage::LoopCo::removeVolume | ( | Volume * | v | ) | [virtual] |
Reimplemented from storage::Container.
References storage::LOOP_REMOVE_INVALID_VOLUME, storage::Device::name(), and y2mil.
| static storage::CType storage::LoopCo::staticType | ( | ) | [inline, static] |
Reimplemented from storage::Container.
References storage::LOOP.
| int storage::LoopCo::updateLoop | ( | const string & | device, |
| const string & | file, | ||
| bool | reuseExisting, | ||
| unsigned long long | sizeK | ||
| ) |
References storage::LOOP_CHANGE_READONLY, storage::LOOP_MODIFY_EXISTING, storage::LOOP_UNKNOWN_FILE, and y2mil.
Referenced by storage::Storage::modifyFileLoop().
| list< unsigned > storage::LoopCo::usedNumbers | ( | ) | const |
| std::ostream& operator<< | ( | std::ostream & | s, |
| const LoopCo & | d | ||
| ) | [friend] |
friend class Storage [friend] |
Reimplemented from storage::Container.
1.7.3