|
yast2-storage
|
#include <Disk.h>
Classes | |
| struct | label_info |
| struct | PartitionCPI |
| struct | PartitionPI |
| struct | SysfsInfo |
Public Types | |
| typedef DerefIterator < PartCPIterator, const Partition > | ConstPartIter |
| typedef IterPair< ConstPartIter > | ConstPartPair |
Public Member Functions | |
| Disk (Storage *s, const string &name, const string &device, unsigned long long Size, SystemInfo &systeminfo) | |
| Disk (Storage *s, const string &name, const string &device, unsigned num, unsigned long long Size, SystemInfo &systeminfo) | |
| Disk (Storage *s, const xmlNode *node) | |
| Disk (const Disk &c) | |
| virtual | ~Disk () |
| void | saveData (xmlNode *node) const |
| unsigned long | cylinders () const |
| unsigned | heads () const |
| unsigned | sectors () const |
| unsigned | sectorSize () const |
| const Geometry & | getGeometry () const |
| Region | usableCylRegion () const |
| unsigned long | numMinor () const |
| unsigned | maxPrimary () const |
| bool | extendedPossible () const |
| unsigned | maxLogical () const |
| const string & | labelName () const |
| virtual string | udevPath () const |
| virtual list< string > | udevId () const |
| void | setSlave (bool val=true) |
| void | setAddpart (bool val=true) |
| void | setNumMinor (unsigned long val) |
| virtual string | procName () const |
| virtual string | sysfsPath () const |
| Region | detectSysfsBlkRegion (bool log_error=true) const |
| unsigned | numPartitions () const |
| bool | isDasd () const |
| bool | isIScsi () const |
| bool | isLogical (unsigned nr) const |
| bool | detect (SystemInfo &systeminfo) |
| void | triggerUdevUpdate () const |
| void | setUdevData (const string &path, const list< string > &id) |
| virtual int | createPartition (storage::PartitionType type, long unsigned start, long unsigned len, string &device, bool checkRelaxed=false) |
| int | createPartition (long unsigned len, string &device, bool checkRelaxed=false) |
| int | createPartition (storage::PartitionType type, string &device) |
| virtual int | removePartition (unsigned nr) |
| virtual int | changePartitionId (unsigned nr, unsigned id) |
| virtual int | initializeDisk (bool) |
| bool | initializeDisk () const |
| void | resetInitDisk () |
| int | forgetChangePartitionId (unsigned nr) |
| int | changePartitionArea (unsigned nr, const Region &cylRegion, bool checkRelaxed=false) |
| int | nextFreePartition (storage::PartitionType type, unsigned &nr, string &device) const |
| int | destroyPartitionTable (const string &new_label) |
| unsigned | availablePartNumber (storage::PartitionType type=storage::PRIMARY) const |
| virtual void | getCommitActions (list< commitAction > &l) const |
| virtual void | getToCommit (storage::CommitStage stage, list< const Container * > &col, list< const Volume * > &vol) const |
| virtual int | commitChanges (storage::CommitStage stage) |
| int | commitChanges (storage::CommitStage stage, Volume *vol) |
| int | freeCylindersAroundPartition (const Partition *p, unsigned long &freeCylsBefore, unsigned long &freeCylsAfter) const |
| virtual int | resizePartition (Partition *p, unsigned long newCyl) |
| int | resizeVolume (Volume *v, unsigned long long newSize) |
| int | removeVolume (Volume *v) |
| void | getUnusedSpace (std::list< Region > &free, bool all=true, bool logical=false) const |
| unsigned int | numPrimary () const |
| bool | hasExtended () const |
| unsigned int | numLogical () const |
| Text | setDiskLabelText (bool doing) const |
| unsigned long long | cylinderToKb (unsigned long cylinder) const |
| unsigned long | kbToCylinder (unsigned long long kb) const |
| unsigned long long | sectorToKb (unsigned long long sector) const |
| unsigned long long | kbToSector (unsigned long long kb) const |
| string | getPartName (unsigned nr) const |
| string | getPartDevice (unsigned nr) const |
| void | getInfo (storage::DiskInfo &info) const |
| bool | equalContent (const Container &rhs) const |
| void | logDifference (std::ostream &log, const Disk &rhs) const |
| virtual void | logDifferenceWithVolumes (std::ostream &log, const Container &rhs) const |
| bool | FakeDisk () const |
| ConstPartPair | partPair (bool(*CheckPart)(const Partition &)=NULL) const |
| ConstPartIter | partBegin (bool(*CheckPart)(const Partition &)=NULL) const |
| ConstPartIter | partEnd (bool(*CheckPart)(const Partition &)=NULL) const |
Static Public Member Functions | |
| static string | sysfsPath (const string &device) |
| static bool | isIScsi (const Disk &d) |
| static storage::CType | staticType () |
| static bool | needP (const string &dev) |
| static string | partNaming (const string &disk) |
| static std::pair< string, unsigned > | getDiskPartition (const string &dev) |
| static bool | getDlabelCapabilities (const string &dlabel, storage::DlabelCapabilities &dlabelcapabilities) |
| static bool | getSysfsInfo (const string &sysfsdir, SysfsInfo &sysfsinfo) |
| static string | devToSysfs (const string &nm) |
| static string | sysfsToDev (const string &nm) |
Protected Types | |
| typedef CastIterator< VIter, Partition * > | PartInter |
| typedef CastIterator< CVIter, const Partition * > | PartCInter |
| typedef CheckFnc< const Partition > | CheckFncPartition |
| typedef CheckerIterator < CheckFncPartition, PartitionPI< CheckFncPartition > ::type, PartInter, Partition > | PartPIterator |
| typedef CheckerIterator < CheckFncPartition, PartitionCPI < CheckFncPartition >::type, PartCInter, const Partition > | PartCPIterator |
| typedef DerefIterator < PartPIterator, Partition > | PartIter |
| typedef IterPair< PartIter > | PartPair |
Protected Member Functions | |
| PartPair | partPair (bool(*CheckPart)(const Partition &)=NULL) |
| PartIter | partBegin (bool(*CheckPart)(const Partition &)=NULL) |
| PartIter | partEnd (bool(*CheckPart)(const Partition &)=NULL) |
| virtual bool | detectGeometry () |
| virtual bool | detectPartitions (SystemInfo &systeminfo) |
| bool | getSysfsInfo () |
| int | checkSystemError (const string &cmd_line, const SystemCmd &cmd) const |
| int | execCheckFailed (const string &cmd_line, bool stop_hald=true) |
| int | execCheckFailed (SystemCmd &cmd, const string &cmd_line, bool stop_hald=true) |
| bool | checkPartedOutput (SystemInfo &systeminfo) |
| list< string > | partitionsKernelKnowns (const ProcParts &parts) const |
| bool | checkPartedValid (SystemInfo &systeminfo, list< Partition * > &pl, unsigned long &rng) const |
| virtual bool | checkPartitionsValid (SystemInfo &systeminfo, const list< Partition * > &pl) const |
| bool | checkFakePartition (SystemInfo &systeminfo, const list< Partition * > &pl) const |
| bool | callDelpart (unsigned nr) const |
| bool | callAddpart (unsigned nr, const Region &blkRegion) const |
| bool | getPartedValues (Partition *p) const |
| bool | getPartedSectors (const Partition *p, unsigned long long &start, unsigned long long &end) const |
| const Partition * | getPartitionAfter (const Partition *p) const |
| void | addPartition (unsigned num, unsigned long long sz, SystemInfo &ppart) |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| virtual void | redetectGeometry () |
| void | changeNumbers (const PartIter &b, const PartIter &e, unsigned start, int incr) |
| int | createChecks (PartitionType &type, const Region &cylRegion, bool checkRelaxed) const |
| void | removePresentPartitions () |
| void | removeFromMemory () |
| void | enlargeGpt () |
| unsigned long long | procExtendedBlks () const |
| virtual int | doCreate (Volume *v) |
| virtual int | doRemove (Volume *v) |
| virtual int | doResize (Volume *v) |
| virtual int | doSetType (Volume *v) |
| virtual int | doCreateLabel () |
| virtual void | logData (const string &Dir) const |
| void | setLabelData (const string &) |
| virtual string | defaultLabel () const |
Protected Attributes | |
| Geometry | geometry |
| Geometry | new_geometry |
| string | label |
| string | udev_path |
| list< string > | udev_id |
| string | detected_label |
| string | logfile_name |
| unsigned | max_primary |
| bool | ext_possible |
| unsigned | max_logical |
| bool | init_disk |
| Transport | transport |
| bool | dmp_slave |
| bool | no_addpart |
| bool | gpt_enlarge |
| unsigned long | range |
| bool | del_ptable |
| bool | has_fake_partition |
| storage::DiskInfo | info |
Static Protected Attributes | |
| static const label_info | labels [] |
| static const string | p_disks [] |
Private Member Functions | |
| Disk & | operator= (const Disk &) |
Friends | |
| class | Storage |
| class | DmPartCo |
| class | MdPartCo |
| std::ostream & | operator<< (std::ostream &, const Disk &) |
typedef CheckFnc<const Partition> storage::Disk::CheckFncPartition [protected] |
| typedef DerefIterator<PartCPIterator,const Partition> storage::Disk::ConstPartIter |
typedef CastIterator<CVIter, const Partition *> storage::Disk::PartCInter [protected] |
typedef CheckerIterator< CheckFncPartition, PartitionCPI<CheckFncPartition>::type, PartCInter, const Partition > storage::Disk::PartCPIterator [protected] |
typedef CastIterator<VIter, Partition *> storage::Disk::PartInter [protected] |
typedef DerefIterator<PartPIterator,Partition> storage::Disk::PartIter [protected] |
typedef IterPair<PartIter> storage::Disk::PartPair [protected] |
typedef CheckerIterator< CheckFncPartition, PartitionPI<CheckFncPartition>::type, PartInter, Partition > storage::Disk::PartPIterator [protected] |
| storage::Disk::Disk | ( | Storage * | s, |
| const string & | name, | ||
| const string & | device, | ||
| unsigned long long | Size, | ||
| SystemInfo & | systeminfo | ||
| ) |
References storage::Lsscsi::getEntry(), storage::SystemInfo::getLsscsi(), storage::getMajorMinor(), storage::Lsscsi::Entry::transport, and y2deb.
Referenced by getCopy().
| storage::Disk::Disk | ( | Storage * | s, |
| const string & | name, | ||
| const string & | device, | ||
| unsigned | num, | ||
| unsigned long long | Size, | ||
| SystemInfo & | systeminfo | ||
| ) |
References storage::decString(), and y2mil.
| storage::Disk::Disk | ( | Storage * | s, |
| const xmlNode * | node | ||
| ) |
References storage::getChildNodes(), storage::getChildValue(), and y2deb.
| storage::Disk::Disk | ( | const Disk & | c | ) |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), partPair(), and y2deb.
| storage::Disk::~Disk | ( | ) | [virtual] |
| void storage::Disk::addPartition | ( | unsigned | num, |
| unsigned long long | sz, | ||
| SystemInfo & | ppart | ||
| ) | [protected] |
| unsigned storage::Disk::availablePartNumber | ( | storage::PartitionType | type = storage::PRIMARY | ) | const |
Referenced by storage::MdPartCo::nextFreePartition(), and storage::DmPartCo::nextFreePartition().
| bool storage::Disk::callAddpart | ( | unsigned | nr, |
| const Region & | blkRegion | ||
| ) | const [protected] |
| bool storage::Disk::callDelpart | ( | unsigned | nr | ) | const [protected] |
| void storage::Disk::changeNumbers | ( | const PartIter & | b, |
| const PartIter & | e, | ||
| unsigned | start, | ||
| int | incr | ||
| ) | [protected] |
Referenced by storage::Dasd::removePartition().
| int storage::Disk::changePartitionArea | ( | unsigned | nr, |
| const Region & | cylRegion, | ||
| bool | checkRelaxed = false |
||
| ) |
| int storage::Disk::changePartitionId | ( | unsigned | nr, |
| unsigned | id | ||
| ) | [virtual] |
Reimplemented in storage::Dasd.
Referenced by storage::Storage::changePartitionId(), storage::MdPartCo::changePartitionId(), and storage::DmPartCo::changePartitionId().
| bool storage::Disk::checkFakePartition | ( | SystemInfo & | systeminfo, |
| const list< Partition * > & | pl | ||
| ) | const [protected] |
References storage::Region::end(), storage::Region::start(), and y2mil.
| bool storage::Disk::checkPartedOutput | ( | SystemInfo & | systeminfo | ) | [protected] |
References storage::EXTENDED, and storage::ProcParts::getSize().
| bool storage::Disk::checkPartedValid | ( | SystemInfo & | systeminfo, |
| list< Partition * > & | pl, | ||
| unsigned long & | rng | ||
| ) | const [protected] |
| bool storage::Disk::checkPartitionsValid | ( | SystemInfo & | systeminfo, |
| const list< Partition * > & | pl | ||
| ) | const [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::Partition::detectSysfsBlkRegion(), storage::EXTENDED, storage::Parted::getEntry(), storage::Volume::nr(), storage::Parted::Entry::secRegion, storage::Partition::type(), and y2err.
| int storage::Disk::checkSystemError | ( | const string & | cmd_line, |
| const SystemCmd & | cmd | ||
| ) | const [protected] |
References y2err.
| int storage::Disk::commitChanges | ( | storage::CommitStage | stage | ) | [virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
| int storage::Disk::commitChanges | ( | storage::CommitStage | stage, |
| Volume * | vol | ||
| ) | [virtual] |
Reimplemented from storage::Container.
| int storage::Disk::createChecks | ( | PartitionType & | type, |
| const Region & | cylRegion, | ||
| bool | checkRelaxed | ||
| ) | const [protected] |
| int storage::Disk::createPartition | ( | long unsigned | len, |
| string & | device, | ||
| bool | checkRelaxed = false |
||
| ) |
| int storage::Disk::createPartition | ( | storage::PartitionType | type, |
| string & | device | ||
| ) |
| virtual int storage::Disk::createPartition | ( | storage::PartitionType | type, |
| long unsigned | start, | ||
| long unsigned | len, | ||
| string & | device, | ||
| bool | checkRelaxed = false |
||
| ) | [virtual] |
Reimplemented in storage::Dasd.
Referenced by storage::MdPartCo::createPartition(), and storage::DmPartCo::createPartition().
| unsigned long storage::Disk::cylinders | ( | ) | const [inline] |
References storage::Geometry::cylinders, and geometry.
| unsigned long long storage::Disk::cylinderToKb | ( | unsigned long | cylinder | ) | const [inline] |
References storage::Geometry::cylinderToKb(), and geometry.
Referenced by storage::Dasd::checkFdasdOutput(), storage::MdPartCo::cylinderToKb(), and storage::DmPartCo::cylinderToKb().
| string storage::Disk::defaultLabel | ( | ) | const [protected, virtual] |
Reimplemented in storage::Dasd.
| int storage::Disk::destroyPartitionTable | ( | const string & | new_label | ) |
| bool storage::Disk::detect | ( | SystemInfo & | systeminfo | ) |
Referenced by storage::MdPartCo::createDisk(), storage::DmPartCo::createDisk(), and storage::Storage::initDisk().
| bool storage::Disk::detectGeometry | ( | ) | [protected, virtual] |
| bool storage::Disk::detectPartitions | ( | SystemInfo & | systeminfo | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
| Region storage::Disk::detectSysfsBlkRegion | ( | bool | log_error = true | ) | const |
| string storage::Disk::devToSysfs | ( | const string & | nm | ) | [static] |
Referenced by storage::Partition::sysfsPath().
| int storage::Disk::doCreate | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::IterPair< Iter >::begin(), BLOCKDEVBIN, storage::classic(), storage::decString(), storage::DISK_CREATE_PARTITION_INVALID_TYPE, storage::DISK_CREATE_PARTITION_PARTED_FAILED, storage::DISK_PARTITION_NOT_FOUND, storage::IterPair< Iter >::empty(), storage::IterPair< Iter >::end(), storage::existingLog(), storage::existingNotLog(), storage::EXTENDED, storage::fuzz_cyl, storage::Partition::ID_APPLE_HFS, storage::Partition::ID_DOS16, storage::Partition::ID_DOS32, storage::Partition::ID_GPT_BOOT, storage::Partition::ID_LINUX, storage::Partition::ID_SWAP, storage::IterPair< Iter >::length(), storage::LOGICAL, storage::logicalCreated(), storage::notDeletedExt(), PARTEDCMD, storage::PRIMARY, storage::quote(), storage::sub_sat(), storage::toString(), storage::UB_BTRFS, storage::Storage::waitForDevice(), and y2mil.
Referenced by storage::MdPartCo::doCreate(), and storage::DmPartCo::doCreate().
| int storage::Disk::doCreateLabel | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
Referenced by storage::MdPartCo::doCreateLabel(), and storage::DmPartCo::doCreateLabel().
| int storage::Disk::doRemove | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::classic(), storage::DISK_REMOVE_PARTITION_LIST_ERASE, storage::DISK_REMOVE_PARTITION_PARTED_FAILED, EFIBOOTMGR, storage::IterPair< Iter >::empty(), storage::ProcParts::findDevice(), storage::ArchInfo::is_efiboot, storage::notCreatedPrimary(), PARTEDCMD, storage::quote(), storage::Storage::waitForDevice(), y2mil, and y2war.
Referenced by storage::MdPartCo::doRemove(), and storage::DmPartCo::doRemove().
| int storage::Disk::doResize | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::IterPair< Iter >::begin(), storage::classic(), storage::Device::device(), storage::DISK_PARTITION_NOT_FOUND, storage::DISK_RESIZE_PARTITION_PARTED_FAILED, storage::IterPair< Iter >::empty(), storage::FSNONE, storage::Volume::getFs(), storage::HFS, storage::HFSPLUS, storage::Volume::isMounted(), storage::LOGICAL, storage::Volume::mount(), storage::Device::name(), storage::Volume::needExtend(), storage::Volume::needShrink(), storage::notDeletedExt(), storage::Volume::nr(), PARTEDCMD, storage::quote(), storage::Volume::resizeFs(), storage::Partition::resizeText(), storage::Device::sizeK(), storage::Partition::type(), storage::Volume::umount(), storage::VFAT, storage::Storage::waitForDevice(), and y2mil.
Referenced by storage::MdPartCo::doResize(), and storage::DmPartCo::doResize().
| int storage::Disk::doSetType | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::Partition::boot(), storage::Partition::changeIdDone(), storage::classic(), storage::Device::device(), storage::DISK_SET_TYPE_PARTED_FAILED, storage::Volume::eraseLabel(), storage::Partition::id(), storage::Partition::ID_GPT_BOOT, storage::Partition::ID_GPT_PREP, storage::Partition::ID_LINUX, storage::Partition::ID_LVM, storage::Partition::ID_RAID, storage::Partition::ID_SWAP, storage::Volume::nr(), PARTEDCMD, storage::quote(), storage::Partition::setTypeText(), and storage::Storage::waitForDevice().
Referenced by storage::MdPartCo::doSetType(), and storage::DmPartCo::doSetType().
| void storage::Disk::enlargeGpt | ( | ) | [protected] |
References PARTEDBIN, and storage::quote().
| bool storage::Disk::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
| int storage::Disk::execCheckFailed | ( | const string & | cmd_line, |
| bool | stop_hald = true |
||
| ) | [protected] |
Referenced by storage::Dasd::doDasdfmt().
| int storage::Disk::execCheckFailed | ( | SystemCmd & | cmd, |
| const string & | cmd_line, | ||
| bool | stop_hald = true |
||
| ) | [protected] |
| bool storage::Disk::extendedPossible | ( | ) | const [inline] |
References ext_possible.
Referenced by storage::MdPartCo::extendedPossible(), and storage::DmPartCo::extendedPossible().
| bool storage::Disk::FakeDisk | ( | ) | const [inline] |
References range.
| int storage::Disk::forgetChangePartitionId | ( | unsigned | nr | ) |
| int storage::Disk::freeCylindersAroundPartition | ( | const Partition * | p, |
| unsigned long & | freeCylsBefore, | ||
| unsigned long & | freeCylsAfter | ||
| ) | const |
| void storage::Disk::getCommitActions | ( | list< commitAction > & | l | ) | const [virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::DECREASE.
| virtual Container* storage::Disk::getCopy | ( | ) | const [inline, protected, virtual] |
| pair< string, unsigned > storage::Disk::getDiskPartition | ( | const string & | dev | ) | [static] |
Referenced by storage::Storage::getMountBy().
| bool storage::Disk::getDlabelCapabilities | ( | const string & | dlabel, |
| storage::DlabelCapabilities & | dlabelcapabilities | ||
| ) | [static] |
Referenced by storage::Storage::getDlabelCapabilities().
| const Geometry& storage::Disk::getGeometry | ( | ) | const [inline] |
References geometry.
Referenced by storage::operator<<().
| void storage::Disk::getInfo | ( | storage::DiskInfo & | info | ) | const |
Referenced by storage::MdPartCo::getInfo(), and storage::DmPartCo::getInfo().
| string storage::Disk::getPartDevice | ( | unsigned | nr | ) | const |
Referenced by storage::Dasd::checkFdasdOutput(), and storage::Partition::removeText().
| bool storage::Disk::getPartedSectors | ( | const Partition * | p, |
| unsigned long long & | start, | ||
| unsigned long long & | end | ||
| ) | const [protected] |
| bool storage::Disk::getPartedValues | ( | Partition * | p | ) | const [protected] |
References storage::Volume::setSize(), and storage::Device::sizeK().
| string storage::Disk::getPartName | ( | unsigned | nr | ) | const |
Referenced by storage::Dasd::checkFdasdOutput().
| bool storage::Disk::getSysfsInfo | ( | const string & | sysfsdir, |
| SysfsInfo & | sysfsinfo | ||
| ) | [static] |
Referenced by storage::Storage::initDisk().
| bool storage::Disk::getSysfsInfo | ( | ) | [protected] |
References storage::Disk::SysfsInfo::range.
Referenced by storage::Storage::getDiskList().
| void storage::Disk::getToCommit | ( | storage::CommitStage | stage, |
| list< const Container * > & | col, | ||
| list< const Volume * > & | vol | ||
| ) | const [virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
| void storage::Disk::getUnusedSpace | ( | std::list< Region > & | free, |
| bool | all = true, |
||
| bool | logical = false |
||
| ) | const |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), and storage::notDeletedNotLog().
Referenced by storage::MdPartCo::getUnusedSpace(), and storage::DmPartCo::getUnusedSpace().
| bool storage::Disk::hasExtended | ( | ) | const |
Referenced by storage::MdPartCo::hasExtended(), and storage::DmPartCo::hasExtended().
| unsigned storage::Disk::heads | ( | ) | const [inline] |
References geometry, and storage::Geometry::heads.
| virtual int storage::Disk::initializeDisk | ( | bool | ) | [inline, virtual] |
Reimplemented in storage::Dasd.
References storage::DISK_INIT_NOT_POSSIBLE.
| bool storage::Disk::initializeDisk | ( | ) | const [inline] |
References init_disk.
| bool storage::Disk::isDasd | ( | ) | const [inline] |
References storage::Device::nm.
| bool storage::Disk::isIScsi | ( | ) | const [inline] |
References storage::ISCSI, and transport.
Referenced by storage::Storage::hasIScsiDisks(), and isIScsi().
| bool storage::Disk::isLogical | ( | unsigned | nr | ) | const |
| unsigned long storage::Disk::kbToCylinder | ( | unsigned long long | kb | ) | const [inline] |
References geometry, and storage::Geometry::kbToCylinder().
Referenced by storage::MdPartCo::kbToCylinder(), and storage::DmPartCo::kbToCylinder().
| unsigned long long storage::Disk::kbToSector | ( | unsigned long long | kb | ) | const [inline] |
References geometry, and storage::Geometry::kbToSector().
| const string& storage::Disk::labelName | ( | ) | const [inline] |
References label.
Referenced by storage::MdPartCo::labelName(), and storage::DmPartCo::labelName().
| void storage::Disk::logData | ( | const string & | Dir | ) | const [protected, virtual] |
Reimplemented from storage::Container.
| void storage::Disk::logDifference | ( | std::ostream & | log, |
| const Disk & | rhs | ||
| ) | const |
| void storage::Disk::logDifferenceWithVolumes | ( | std::ostream & | log, |
| const Container & | rhs | ||
| ) | const [virtual] |
Implements storage::Container.
| unsigned storage::Disk::maxLogical | ( | ) | const [inline] |
References max_logical.
Referenced by storage::MdPartCo::maxLogical(), and storage::DmPartCo::maxLogical().
| unsigned storage::Disk::maxPrimary | ( | ) | const [inline] |
References max_primary.
Referenced by storage::MdPartCo::maxPrimary(), and storage::DmPartCo::maxPrimary().
| bool storage::Disk::needP | ( | const string & | dev | ) | [static] |
References storage::Regex::match().
| int storage::Disk::nextFreePartition | ( | storage::PartitionType | type, |
| unsigned & | nr, | ||
| string & | device | ||
| ) | const |
| unsigned int storage::Disk::numLogical | ( | ) | const |
Referenced by storage::MdPartCo::numLogical(), and storage::DmPartCo::numLogical().
| unsigned long storage::Disk::numMinor | ( | ) | const [inline] |
References range.
| unsigned storage::Disk::numPartitions | ( | ) | const |
| unsigned int storage::Disk::numPrimary | ( | ) | const |
Referenced by storage::MdPartCo::numPrimary(), and storage::DmPartCo::numPrimary().
| PartIter storage::Disk::partBegin | ( | bool(*)(const Partition &) | CheckPart = NULL | ) | [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
Referenced by partPair().
| ConstPartIter storage::Disk::partBegin | ( | bool(*)(const Partition &) | CheckPart = NULL | ) | const [inline] |
References storage::Container::begin(), and storage::Container::end().
| ConstPartIter storage::Disk::partEnd | ( | bool(*)(const Partition &) | CheckPart = NULL | ) | const [inline] |
References storage::Container::begin(), and storage::Container::end().
References storage::Container::begin(), and storage::Container::end().
Referenced by partPair().
| list< string > storage::Disk::partitionsKernelKnowns | ( | const ProcParts & | parts | ) | const [protected] |
| string storage::Disk::partNaming | ( | const string & | disk | ) | [static] |
References partBegin(), and partEnd().
Referenced by Disk(), storage::MdPartCo::getPartition(), storage::DmPartCo::getPartition(), storage::Storage::getRecursiveUsingHelper(), storage::MdPartCo::getVolumes(), storage::DmPartCo::getVolumes(), storage::MdPartCo::handleWholeDevice(), storage::DmPartCo::handleWholeDevice(), storage::Dasd::initializeDisk(), storage::Dasd::removePartition(), storage::MdPartCo::validPartition(), and storage::DmPartCo::validPartition().
| ConstPartPair storage::Disk::partPair | ( | bool(*)(const Partition &) | CheckPart = NULL | ) | const [inline] |
References partBegin(), and partEnd().
| virtual void storage::Disk::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
| unsigned long long storage::Disk::procExtendedBlks | ( | ) | const [protected] |
| virtual string storage::Disk::procName | ( | ) | const [inline, virtual] |
Reimplemented from storage::Device.
References storage::Device::nm.
| void storage::Disk::redetectGeometry | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
References y2mil.
| void storage::Disk::removeFromMemory | ( | ) | [protected] |
References y2mil.
Referenced by storage::Dasd::doDasdfmt().
| int storage::Disk::removePartition | ( | unsigned | nr | ) | [virtual] |
| void storage::Disk::removePresentPartitions | ( | ) | [protected] |
References y2mil.
| int storage::Disk::removeVolume | ( | Volume * | v | ) | [virtual] |
Reimplemented from storage::Container.
| void storage::Disk::resetInitDisk | ( | ) | [inline] |
References init_disk.
Referenced by storage::Dasd::doDasdfmt().
| int storage::Disk::resizePartition | ( | Partition * | p, |
| unsigned long | newCyl | ||
| ) | [virtual] |
Reimplemented in storage::Dasd.
References storage::DISK_CHANGE_READONLY.
Referenced by storage::Storage::resizePartition(), storage::MdPartCo::resizePartition(), and storage::DmPartCo::resizePartition().
| int storage::Disk::resizeVolume | ( | Volume * | v, |
| unsigned long long | newSize | ||
| ) | [virtual] |
Reimplemented from storage::Container.
References storage::DISK_CHANGE_READONLY.
Referenced by storage::MdPartCo::resizeVolume(), and storage::DmPartCo::resizeVolume().
| void storage::Disk::saveData | ( | xmlNode * | node | ) | const |
Reimplemented from storage::Container.
| unsigned storage::Disk::sectors | ( | ) | const [inline] |
References geometry, and storage::Geometry::sectors.
| unsigned storage::Disk::sectorSize | ( | ) | const [inline] |
References geometry, and storage::Geometry::sector_size.
| unsigned long long storage::Disk::sectorToKb | ( | unsigned long long | sector | ) | const [inline] |
References geometry, and storage::Geometry::sectorToKb().
| void storage::Disk::setAddpart | ( | bool | val = true | ) | [inline] |
References no_addpart.
Referenced by storage::DmPartCo::createDisk().
| Text storage::Disk::setDiskLabelText | ( | bool | doing | ) | const |
References storage::_(), and storage::sformat().
Referenced by storage::MdPartCo::setDiskLabelText(), and storage::DmPartCo::setDiskLabelText().
| void storage::Disk::setLabelData | ( | const string & | disklabel | ) | [protected] |
| void storage::Disk::setNumMinor | ( | unsigned long | val | ) | [inline] |
References range.
Referenced by storage::MdPartCo::createDisk(), and storage::DmPartCo::createDisk().
| void storage::Disk::setSlave | ( | bool | val = true | ) | [inline] |
References dmp_slave.
Referenced by storage::MdPartCo::createDisk(), and storage::DmPartCo::createDisk().
| void storage::Disk::setUdevData | ( | const string & | path, |
| const list< string > & | id | ||
| ) |
Referenced by storage::MdPartCo::setUdevData(), and storage::DmPartCo::setUdevData().
| static storage::CType storage::Disk::staticType | ( | ) | [inline, static] |
Reimplemented from storage::Container.
References storage::DISK.
Referenced by storage::Dasd::getCommitActions().
| string storage::Disk::sysfsPath | ( | ) | const [virtual] |
Reimplemented from storage::Device.
Referenced by storage::Lsscsi::parse(), and storage::Partition::sysfsPath().
| string storage::Disk::sysfsPath | ( | const string & | device | ) | [static] |
| string storage::Disk::sysfsToDev | ( | const string & | nm | ) | [static] |
Referenced by storage::getPresentDisks(), and storage::Storage::initDisk().
| void storage::Disk::triggerUdevUpdate | ( | ) | const |
| virtual list<string> storage::Disk::udevId | ( | ) | const [inline, virtual] |
Reimplemented from storage::Device.
References udev_id.
Referenced by storage::Partition::addAltUdevId(), and storage::Partition::udevId().
| virtual string storage::Disk::udevPath | ( | ) | const [inline, virtual] |
Reimplemented from storage::Device.
References udev_path.
Referenced by storage::Partition::addAltUdevPath(), and storage::Partition::udevPath().
| Region storage::Disk::usableCylRegion | ( | ) | const |
friend class DmPartCo [friend] |
friend class MdPartCo [friend] |
| std::ostream& operator<< | ( | std::ostream & | s, |
| const Disk & | d | ||
| ) | [friend] |
friend class Storage [friend] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
bool storage::Disk::del_ptable [protected] |
string storage::Disk::detected_label [protected] |
bool storage::Disk::dmp_slave [protected] |
Referenced by setSlave().
bool storage::Disk::ext_possible [protected] |
Referenced by extendedPossible().
Geometry storage::Disk::geometry [protected] |
Referenced by cylinders(), cylinderToKb(), getGeometry(), heads(), storage::Dasd::initializeDisk(), kbToCylinder(), kbToSector(), sectors(), sectorSize(), and sectorToKb().
bool storage::Disk::gpt_enlarge [protected] |
bool storage::Disk::has_fake_partition [protected] |
storage::DiskInfo storage::Disk::info [mutable, protected] |
Reimplemented from storage::Container.
bool storage::Disk::init_disk [protected] |
string storage::Disk::label [protected] |
Referenced by labelName().
const Disk::label_info storage::Disk::labels [static, protected] |
{
{ "msdos", true, 4, 256, (1ULL << 32) - 1 },
{ "gpt", false, 128, 0, (1ULL << 48) - 1 },
{ "bsd", false, 8, 0, (1ULL << 32) - 1 },
{ "sun", false, 8, 0, (1ULL << 32) - 1 },
{ "mac", false, 64, 0, (1ULL << 32) - 1 },
{ "dasd", false, 3, 0, (1ULL << 32) - 1 },
{ "aix", false, 0, 0, (1ULL << 32) - 1 },
{ "amiga", false, 63, 0, (1ULL << 32) - 1 },
{ "xenxvd", false, 256, 0, (1ULL << 32) - 1 },
{ "", false, 0, 0, 0 }
}
string storage::Disk::logfile_name [protected] |
unsigned storage::Disk::max_logical [protected] |
Referenced by maxLogical().
unsigned storage::Disk::max_primary [protected] |
Referenced by maxPrimary().
Geometry storage::Disk::new_geometry [protected] |
Referenced by storage::Dasd::initializeDisk().
bool storage::Disk::no_addpart [protected] |
Referenced by setAddpart().
const string storage::Disk::p_disks [static, protected] |
{ "cciss/", "ida/", "ataraid/", "etherd/", "rd/", "mmcblk[0-9]+",
"md[0-9]+", "nvme[0-9]+n[0-9]+" }
unsigned long storage::Disk::range [protected] |
Referenced by storage::Dasd::checkFdasdOutput(), FakeDisk(), numMinor(), and setNumMinor().
Transport storage::Disk::transport [protected] |
Referenced by isIScsi().
list<string> storage::Disk::udev_id [protected] |
Referenced by udevId().
string storage::Disk::udev_path [protected] |
Referenced by udevPath().
1.7.3