storage::Device Class Reference

#include <Device.h>

Inheritance diagram for storage::Device:

storage::Container storage::Volume storage::BtrfsCo storage::Disk storage::LoopCo storage::MdCo storage::MdPartCo storage::NfsCo storage::PeContainer storage::TmpfsCo storage::Btrfs storage::Dm storage::Loop storage::Md storage::MdPart storage::Nfs storage::Partition storage::Tmpfs

List of all members.

Public Member Functions

 Device (const string &nm, const string &dev)
 Device (const string &nm, const string &dev, SystemInfo &systeminfo)
 Device (const xmlNode *node)
 Device (const Device &)
virtual ~Device ()
void saveData (xmlNode *node) const
const string & name () const
const string & device () const
void setNameDevice (const string &nm, const string &dev)
bool created () const
bool deleted () const
void setCreated (bool val=true)
void setDeleted (bool val=true)
bool isSilent () const
void setSilent (bool val=true)
unsigned long long sizeK () const
string sizeString () const
bool getMajorMinor ()
unsigned long majorNr () const
unsigned long minorNr () const
const std::list< string > & altNames () const
void setAltNames (std::list< string > &li)
bool sameDevice (const string &device) const
virtual string udevPath () const
virtual list< string > udevId () const
virtual string procName () const
virtual string sysfsPath () const
void clearUsedBy ()
void setUsedBy (UsedByType type, const string &device)
void addUsedBy (UsedByType type, const string &device)
void removeUsedBy (UsedByType type, const string &device)
bool isUsedBy () const
bool isUsedBy (UsedByType type) const
const list< UsedBy > & getUsedBy () const
virtual list< string > getUsing () const
void logDifference (std::ostream &log, const Device &rhs) const

Protected Attributes

string nm
string dev
bool create
bool del
bool silent
unsigned long long size_k
unsigned long mjr
unsigned long mnr
list< UsedByuby
list< string > alt_names

Private Member Functions

Deviceoperator= (const Device &)

Friends

std::ostream & operator<< (std::ostream &s, const Device &d)


Constructor & Destructor Documentation

storage::Device::Device ( const string &  nm,
const string &  dev 
)

References y2deb.

storage::Device::Device ( const string &  nm,
const string &  dev,
SystemInfo systeminfo 
)

References y2deb.

storage::Device::Device ( const xmlNode *  node  ) 

storage::Device::Device ( const Device d  ) 

References dev, and y2deb.

storage::Device::~Device (  )  [virtual]

References dev, and y2deb.


Member Function Documentation

void storage::Device::saveData ( xmlNode *  node  )  const

const string& storage::Device::name (  )  const [inline]

Referenced by storage::Disk::availablePartNumber(), storage::Btrfs::changeDeviceName(), storage::PeContainer::checkConsistency(), storage::MdPartCo::commitChanges(), storage::LvmVg::commitChanges(), storage::DmPartCo::commitChanges(), storage::Disk::commitChanges(), storage::Dasd::commitChanges(), storage::Container::commitChanges(), storage::BtrfsCo::commitChanges(), storage::MdCo::createMd(), storage::LvmVg::createText(), storage::MdPartCo::doCreate(), storage::MdCo::doCreate(), storage::LvmVg::doCreate(), storage::LoopCo::doCreate(), storage::DmPartCo::doCreate(), storage::Disk::doCreate(), storage::Container::doCreate(), storage::LvmVg::doCreateVg(), storage::LvmVg::doExtendVg(), storage::LvmVg::doReduceVg(), storage::NfsCo::doRemove(), storage::MdPartCo::doRemove(), storage::MdCo::doRemove(), storage::LvmVg::doRemove(), storage::LoopCo::doRemove(), storage::DmraidCo::doRemove(), storage::DmPartCo::doRemove(), storage::DmCo::doRemove(), storage::Disk::doRemove(), storage::Container::doRemove(), storage::LvmVg::doRemoveVg(), storage::MdPartCo::doResize(), storage::LvmVg::doResize(), storage::DmPartCo::doResize(), storage::Disk::doResize(), storage::Container::doResize(), storage::MdPartCo::doSetType(), storage::DmPartCo::doSetType(), storage::Disk::doSetType(), storage::LvmVg::extendText(), storage::Btrfs::extendText(), storage::LvmVg::extendVg(), storage::Btrfs::extendVolume(), storage::Dasd::getCommitActions(), storage::Disk::getDlabelCapabilities(), storage::Container::getInfo(), storage::LvmLv::getState(), storage::LvmLv::hasSnapshots(), storage::LvmVg::logData(), storage::LvmLv::LvmLv(), storage::MdPart::MdPart(), storage::LvmVg::normalizeDmDevices(), storage::operator<<(), storage::LvmVg::reduceText(), storage::Btrfs::reduceText(), storage::LvmVg::reduceVg(), storage::Storage::removeContainer(), storage::MdPartCo::removeText(), storage::LvmVg::removeText(), storage::DmraidCo::removeText(), storage::DmPartCo::removeText(), storage::MdCo::removeVolume(), storage::LvmVg::removeVolume(), storage::LoopCo::removeVolume(), storage::DmCo::removeVolume(), storage::Container::removeVolume(), storage::LvmVg::resizeVolume(), and storage::Btrfs::shrinkVolume().

const string& storage::Device::device (  )  const [inline]

Referenced by storage::LvmVg::addPv(), storage::DmraidCo::addPv(), storage::DmmultipathCo::addPv(), storage::Btrfs::Btrfs(), storage::Disk::callAddpart(), storage::Disk::callDelpart(), storage::Md::createCmd(), storage::LoopCo::createLoop(), storage::LvmVg::createLv(), storage::LvmVg::createLvSnapshot(), storage::MdPartCo::destroyPartitionTable(), storage::DmPartCo::destroyPartitionTable(), storage::Disk::destroyPartitionTable(), storage::FreeInfo::detectContentInfo(), storage::Dasd::detectPartitions(), storage::FreeInfo::detectResizeInfo(), storage::Storage::deviceByNumber(), storage::Dmmultipath::Dmmultipath(), storage::DmPart::DmPart(), storage::Dmraid::Dmraid(), storage::Disk::doCreate(), storage::MdPartCo::doCreateLabel(), storage::DmPartCo::doCreateLabel(), storage::Disk::doCreateLabel(), storage::LvmVg::doCreateVg(), storage::Dasd::doDasdfmt(), storage::Dasd::doFdasd(), storage::Volume::doFormatBtrfs(), storage::MdPartCo::doRemove(), storage::LvmVg::doRemove(), storage::Disk::doRemove(), storage::Disk::doResize(), storage::Disk::doSetType(), storage::Disk::enlargeGpt(), storage::BtrfsCo::eraseVolume(), storage::LvmVg::extendVg(), storage::BtrfsCo::getBtrfsData(), storage::Storage::getContVolInfo(), storage::PeContainer::getDeviceByNumber(), storage::DmCo::getDmData(), storage::Volume::getFsData(), storage::Volume::getFstabData(), storage::Container::getInfo(), storage::Volume::getLoopData(), storage::LoopCo::getLoopData(), storage::Volume::getMountData(), storage::Disk::getPartedSectors(), storage::Disk::getPartedValues(), storage::Storage::getRecursiveUsedByHelper(), storage::Partition::getUsing(), storage::MdPart::getUsing(), storage::LvmLv::getUsing(), storage::DmPart::getUsing(), storage::LvmVg::getVgData(), storage::Storage::getVolume(), storage::Storage::isUsedBySingleBtrfs(), storage::Md::Md(), storage::Storage::mountTmp(), storage::Partition::Partition(), storage::Disk::redetectGeometry(), storage::Storage::removeDm(), storage::Storage::removeDmTableTo(), storage::NfsCo::removeVolume(), storage::Volume::setNameDev(), storage::Dm::setPeMap(), storage::Volume::setUsedByUuid(), storage::Volume::Volume(), and storage::Partition::zeroIfNeeded().

void storage::Device::setNameDevice ( const string &  nm,
const string &  dev 
)

bool storage::Device::created (  )  const [inline]

bool storage::Device::deleted (  )  const [inline]

References del.

Referenced by storage::LvmVg::addPv(), storage::DmraidCo::addPv(), storage::DmmultipathCo::addPv(), storage::MdPartCo::commitChanges(), storage::LvmVg::commitChanges(), storage::DmPartCo::commitChanges(), storage::Container::commitChanges(), storage::Storage::commitPair(), storage::Volume::doFstabUpdate(), storage::MdPartCo::doRemove(), storage::DmraidCo::doRemove(), storage::DmPartCo::doRemove(), storage::LvmVg::doRemoveVg(), storage::existingLog(), storage::existingNotLog(), storage::Volume::getCommitActions(), storage::MdPartCo::getCommitActions(), storage::LvmVg::getCommitActions(), storage::DmPartCo::getCommitActions(), storage::Dasd::getToCommit(), storage::Container::getToCommit(), storage::Volume::isDeleted(), storage::Dm::isDeleted(), storage::lvDeleted(), storage::lvNotDeletedCreated(), storage::Volume::notDeleted(), storage::Tmpfs::notDeleted(), storage::Partition::notDeleted(), storage::Nfs::notDeleted(), storage::MdPartCo::notDeleted(), storage::MdPart::notDeleted(), storage::Md::notDeleted(), storage::LvmLv::notDeleted(), storage::Loop::notDeleted(), storage::Dmraid::notDeleted(), storage::DmPart::notDeleted(), storage::Dmmultipath::notDeleted(), storage::Dm::notDeleted(), storage::Container::notDeleted(), storage::Btrfs::notDeleted(), storage::notDeletedExt(), storage::notDeletedLog(), storage::notDeletedNotLog(), storage::notDeletedPri(), storage::Container::stageDecrease(), storage::Partition::toChangeId(), storage::toChangeId(), storage::MdPartCo::updateDelDev(), and storage::DmPartCo::updateDelDev().

void storage::Device::setCreated ( bool  val = true  )  [inline]

void storage::Device::setDeleted ( bool  val = true  )  [inline]

bool storage::Device::isSilent (  )  const [inline]

References silent.

Referenced by storage::BtrfsCo::doRemove().

void storage::Device::setSilent ( bool  val = true  )  [inline]

unsigned long long storage::Device::sizeK (  )  const [inline]

string storage::Device::sizeString (  )  const

bool storage::Device::getMajorMinor (  ) 

unsigned long storage::Device::majorNr (  )  const [inline]

unsigned long storage::Device::minorNr (  )  const [inline]

const std::list<string>& storage::Device::altNames (  )  const [inline]

void storage::Device::setAltNames ( std::list< string > &  li  )  [inline]

bool storage::Device::sameDevice ( const string &  device  )  const

string storage::Device::udevPath (  )  const [virtual]

list< string > storage::Device::udevId (  )  const [virtual]

virtual string storage::Device::procName (  )  const [inline, virtual]

virtual string storage::Device::sysfsPath (  )  const [inline, virtual]

void storage::Device::clearUsedBy (  )  [inline]

References uby.

Referenced by storage::Storage::clearUsedBy().

void storage::Device::setUsedBy ( UsedByType  type,
const string &  device 
)

void storage::Device::addUsedBy ( UsedByType  type,
const string &  device 
)

References uby.

Referenced by storage::Storage::addUsedBy().

void storage::Device::removeUsedBy ( UsedByType  type,
const string &  device 
)

References uby.

Referenced by storage::Storage::removeUsedBy().

bool storage::Device::isUsedBy (  )  const [inline]

bool storage::Device::isUsedBy ( UsedByType  type  )  const

References uby.

const list<UsedBy>& storage::Device::getUsedBy (  )  const [inline]

virtual list<string> storage::Device::getUsing (  )  const [inline, virtual]

void storage::Device::logDifference ( std::ostream &  log,
const Device rhs 
) const

Device& storage::Device::operator= ( const Device  )  [private]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const Device d 
) [friend]


Member Data Documentation

string storage::Device::nm [protected]

string storage::Device::dev [protected]

Referenced by storage::Md::addDevice(), storage::LvmVg::addLv(), storage::MdPartCo::addNewDev(), storage::DmPartCo::addNewDev(), storage::Partition::addUdevData(), storage::Volume::allowedMountBy(), storage::Btrfs::Btrfs(), storage::BtrfsCo::BtrfsCo(), storage::Nfs::canonicalName(), storage::Btrfs::changeDeviceName(), storage::Volume::changeFstabOptions(), storage::Volume::changeMount(), storage::Partition::changeMount(), storage::Volume::changeMountBy(), storage::Partition::changeNumber(), storage::Dm::checkConsistency(), storage::Volume::checkDevice(), storage::Dasd::checkFdasdOutput(), storage::Disk::checkPartedOutput(), storage::Disk::checkPartitionsValid(), storage::Dasd::checkPartitionsValid(), storage::Container::Container(), storage::MdPartCo::createDisk(), storage::DmPartCo::createDisk(), storage::LvmVg::createLv(), storage::LvmVg::createLvSnapshot(), storage::Btrfs::createSubvolText(), storage::Volume::createText(), storage::Partition::createText(), storage::Md::createText(), storage::LvmLv::createText(), storage::Loop::createText(), storage::Dmraid::createText(), storage::Dmmultipath::createText(), storage::Container::createText(), storage::Volume::crsetupText(), storage::Dasd::Dasd(), storage::Dasd::dasdfmtText(), storage::Volume::defaultMountBy(), storage::Btrfs::deleteSubvolText(), storage::Volume::detectEncryption(), storage::Disk::detectGeometry(), storage::Disk::detectPartitions(), Device(), storage::Disk::Disk(), storage::Dm::Dm(), storage::Dmmultipath::Dmmultipath(), storage::DmmultipathCo::DmmultipathCo(), storage::DmPart::DmPart(), storage::DmPartCo::DmPartCo(), storage::Dmraid::Dmraid(), storage::DmraidCo::DmraidCo(), storage::Volume::doCryptsetup(), storage::Volume::doFormat(), storage::Volume::doFstabUpdate(), storage::Volume::doLosetup(), storage::Volume::doMount(), storage::Volume::doSetLabel(), storage::Volume::equalContent(), storage::Container::equalContent(), storage::MdCo::extendMd(), storage::Dasd::fdasdText(), storage::Volume::formatText(), storage::Partition::formatText(), storage::Md::formatText(), storage::LvmLv::formatText(), storage::Loop::formatText(), storage::Dmraid::formatText(), storage::Dmmultipath::formatText(), storage::Dm::formatText(), storage::Volume::getCryptsetupCmd(), storage::Volume::getDmcryptName(), storage::DmCo::getDmData(), storage::Volume::getFstabDentry(), storage::Volume::getFstabDevice(), storage::Volume::getInfo(), getMajorMinor(), storage::Volume::getMountByString(), storage::MdPartCo::getPartDevice(), storage::DmPartCo::getPartDevice(), storage::Disk::getPartDevice(), storage::Disk::getPartName(), storage::MdPartCo::getPartNum(), storage::Disk::getSysfsInfo(), storage::Dm::getTableInfo(), storage::Dm::init(), storage::MdPartCo::initMd(), storage::Volume::labelText(), logDifference(), storage::Loop::Loop(), storage::LoopCo::LoopCo(), storage::Volume::losetupText(), storage::LvmLv::LvmLv(), storage::LvmVg::LvmVg(), storage::Md::Md(), storage::MdCo::MdCo(), storage::Md::mdDevice(), storage::MdPart::MdPart(), storage::MdPartCo::MdPartCo(), storage::Volume::mount(), storage::Volume::mountDevice(), storage::Volume::mountText(), storage::Nfs::Nfs(), storage::NfsCo::NfsCo(), storage::LvmVg::normalizeDmDevices(), storage::operator<<(), storage::Partition::Partition(), storage::Disk::partitionsKernelKnowns(), storage::PeContainer::PeContainer(), storage::Volume::prepareRemove(), storage::Volume::removeText(), storage::Partition::removeText(), storage::Nfs::removeText(), storage::Md::removeText(), storage::LvmLv::removeText(), storage::Loop::removeText(), storage::Dmraid::removeText(), storage::Dmmultipath::removeText(), storage::Dm::removeText(), storage::Container::removeText(), storage::Volume::replaceAltName(), storage::Volume::resizeText(), storage::Partition::resizeText(), storage::LvmLv::resizeText(), storage::Dmraid::resizeText(), storage::Dmmultipath::resizeText(), sameDevice(), saveData(), storage::Disk::setDiskLabelText(), storage::Volume::setDmcryptDev(), storage::Loop::setDmcryptDev(), storage::Volume::setDmcryptDevEnc(), storage::Loop::setEncryption(), storage::Volume::setFormat(), storage::Partition::setFormat(), storage::Btrfs::setFormat(), storage::Volume::setNameDev(), setNameDevice(), storage::Partition::setTypeText(), storage::MdPart::setTypeText(), storage::Dmraid::setTypeText(), storage::DmPart::setTypeText(), storage::Dmmultipath::setTypeText(), storage::MdPartCo::setUdevData(), storage::Md::setUdevData(), storage::Disk::sysfsPath(), storage::TmpfsCo::TmpfsCo(), storage::Volume::umount(), storage::MdPartCo::updateEntry(), storage::Md::updateEntry(), storage::Dm::updateMajorMinor(), storage::Volume::Volume(), storage::Btrfs::~Btrfs(), storage::BtrfsCo::~BtrfsCo(), storage::Container::~Container(), storage::Dasd::~Dasd(), ~Device(), storage::Disk::~Disk(), storage::Dm::~Dm(), storage::Dmmultipath::~Dmmultipath(), storage::DmmultipathCo::~DmmultipathCo(), storage::DmPart::~DmPart(), storage::DmPartCo::~DmPartCo(), storage::Dmraid::~Dmraid(), storage::DmraidCo::~DmraidCo(), storage::Loop::~Loop(), storage::LoopCo::~LoopCo(), storage::LvmLv::~LvmLv(), storage::LvmVg::~LvmVg(), storage::Md::~Md(), storage::MdCo::~MdCo(), storage::MdPart::~MdPart(), storage::MdPartCo::~MdPartCo(), storage::Nfs::~Nfs(), storage::NfsCo::~NfsCo(), storage::Partition::~Partition(), storage::PeContainer::~PeContainer(), storage::TmpfsCo::~TmpfsCo(), and storage::Volume::~Volume().

bool storage::Device::create [protected]

bool storage::Device::del [protected]

bool storage::Device::silent [protected]

Referenced by storage::MdPartCo::doCreate(), storage::MdCo::doCreate(), storage::LvmVg::doCreate(), storage::LoopCo::doCreate(), storage::DmPartCo::doCreate(), storage::Disk::doCreate(), storage::MdPartCo::doCreateLabel(), storage::DmPartCo::doCreateLabel(), storage::Disk::doCreateLabel(), storage::Btrfs::doCreateSubvol(), storage::LvmVg::doCreateVg(), storage::Volume::doCryptsetup(), storage::Dasd::doDasdfmt(), storage::Btrfs::doDeleteSubvol(), storage::Btrfs::doExtend(), storage::LvmVg::doExtendVg(), storage::Dasd::doFdasd(), storage::Volume::doFormat(), storage::Volume::doFstabUpdate(), storage::Volume::doLosetup(), storage::Volume::doMount(), storage::Btrfs::doReduce(), storage::LvmVg::doReduceVg(), storage::TmpfsCo::doRemove(), storage::NfsCo::doRemove(), storage::MdPartCo::doRemove(), storage::MdCo::doRemove(), storage::LvmVg::doRemove(), storage::LoopCo::doRemove(), storage::DmraidCo::doRemove(), storage::DmPartCo::doRemove(), storage::DmCo::doRemove(), storage::Disk::doRemove(), storage::LvmVg::doRemoveVg(), storage::MdPartCo::doResize(), storage::LvmVg::doResize(), storage::DmPartCo::doResize(), storage::Disk::doResize(), storage::Volume::doSetLabel(), storage::MdPartCo::doSetType(), storage::DmPartCo::doSetType(), storage::Disk::doSetType(), storage::Volume::equalContent(), storage::Container::equalContent(), isSilent(), storage::Container::logDifference(), storage::operator<<(), storage::MdPartCo::removePresentPartitions(), storage::DmPartCo::removePresentPartitions(), storage::Disk::removePresentPartitions(), and setSilent().

unsigned long long storage::Device::size_k [protected]

unsigned long storage::Device::mjr [protected]

unsigned long storage::Device::mnr [protected]

list<UsedBy> storage::Device::uby [protected]

list<string> storage::Device::alt_names [protected]


The documentation for this class was generated from the following files:

Generated on Mon Feb 6 10:42:57 2012 for yast2-storage by  doxygen 1.5.6