#include <Disk.h>

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 |
| 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) |
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 | 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 |
| 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 &) |
Classes | |
| struct | label_info |
| struct | PartitionCPI |
| struct | PartitionPI |
| struct | SysfsInfo |
typedef CastIterator<VIter, Partition *> storage::Disk::PartInter [protected] |
typedef CastIterator<CVIter, const Partition *> storage::Disk::PartCInter [protected] |
typedef CheckFnc<const Partition> storage::Disk::CheckFncPartition [protected] |
typedef CheckerIterator< CheckFncPartition, PartitionPI<CheckFncPartition>::type, PartInter, Partition > storage::Disk::PartPIterator [protected] |
typedef CheckerIterator< CheckFncPartition, PartitionCPI<CheckFncPartition>::type, PartCInter, const Partition > storage::Disk::PartCPIterator [protected] |
typedef DerefIterator<PartPIterator,Partition> storage::Disk::PartIter [protected] |
typedef IterPair<PartIter> storage::Disk::PartPair [protected] |
| typedef DerefIterator<PartCPIterator,const Partition> storage::Disk::ConstPartIter |
| storage::Disk::Disk | ( | Storage * | s, | |
| const string & | name, | |||
| const string & | device, | |||
| unsigned long long | Size, | |||
| SystemInfo & | systeminfo | |||
| ) |
| storage::Disk::Disk | ( | Storage * | s, | |
| const string & | name, | |||
| const string & | device, | |||
| unsigned | num, | |||
| unsigned long long | Size, | |||
| SystemInfo & | systeminfo | |||
| ) |
References addPartition(), storage::decString(), logfile_name, storage::Container::ronly, storage::Device::size_k, and y2mil.
| storage::Disk::Disk | ( | Storage * | s, | |
| const xmlNode * | node | |||
| ) |
| storage::Disk::Disk | ( | const Disk & | c | ) |
| storage::Disk::~Disk | ( | ) | [virtual] |
References storage::Device::dev, and y2deb.
| void storage::Disk::saveData | ( | xmlNode * | node | ) | const |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), ext_possible, geometry, label, max_logical, max_primary, partPair(), range, storage::Container::saveData(), storage::setChildValue(), storage::toString(), transport, storage::TUNKNOWN, udev_id, udev_path, and storage::xmlNewChild().
Referenced by logData().
| unsigned long storage::Disk::cylinders | ( | ) | const [inline] |
References storage::Geometry::cylinders, and geometry.
Referenced by changePartitionArea(), createChecks(), storage::Dasd::detectPartitions(), doCreate(), storage::Dasd::doFdasd(), freeCylindersAroundPartition(), getInfo(), getUnusedSpace(), and usableCylRegion().
| unsigned storage::Disk::heads | ( | ) | const [inline] |
| unsigned storage::Disk::sectors | ( | ) | const [inline] |
| unsigned storage::Disk::sectorSize | ( | ) | const [inline] |
References geometry, and storage::Geometry::sector_size.
Referenced by checkPartitionsValid(), doResize(), getInfo(), getPartedValues(), and procExtendedBlks().
| const Geometry& storage::Disk::getGeometry | ( | ) | const [inline] |
| Region storage::Disk::usableCylRegion | ( | ) | const |
References cylinders(), getDlabelCapabilities(), kbToCylinder(), label, storage::DlabelCapabilities::maxSectors, and sectorToKb().
Referenced by freeCylindersAroundPartition(), and getUnusedSpace().
| unsigned long storage::Disk::numMinor | ( | ) | const [inline] |
References range.
| unsigned storage::Disk::maxPrimary | ( | ) | const [inline] |
References max_primary.
Referenced by getInfo(), storage::MdPartCo::maxPrimary(), and storage::DmPartCo::maxPrimary().
| bool storage::Disk::extendedPossible | ( | ) | const [inline] |
References ext_possible.
Referenced by storage::MdPartCo::extendedPossible(), storage::DmPartCo::extendedPossible(), and getInfo().
| unsigned storage::Disk::maxLogical | ( | ) | const [inline] |
References max_logical.
Referenced by getInfo(), storage::MdPartCo::maxLogical(), and storage::DmPartCo::maxLogical().
| const string& storage::Disk::labelName | ( | ) | const [inline] |
References label.
Referenced by getInfo(), storage::MdPartCo::labelName(), and storage::DmPartCo::labelName().
| virtual string storage::Disk::udevPath | ( | ) | const [inline, virtual] |
Reimplemented from storage::Device.
References udev_path.
Referenced by storage::Partition::addAltUdevPath(), and storage::Partition::udevPath().
| 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().
| void storage::Disk::setSlave | ( | bool | val = true |
) | [inline] |
References dmp_slave.
Referenced by storage::MdPartCo::createDisk(), and storage::DmPartCo::createDisk().
| void storage::Disk::setAddpart | ( | bool | val = true |
) | [inline] |
| void storage::Disk::setNumMinor | ( | unsigned long | val | ) | [inline] |
References range.
Referenced by storage::MdPartCo::createDisk(), and storage::DmPartCo::createDisk().
| virtual string storage::Disk::procName | ( | ) | const [inline, virtual] |
| string storage::Disk::sysfsPath | ( | ) | const [virtual] |
Reimplemented from storage::Device.
References procName(), and SYSFSDIR.
Referenced by getSysfsInfo(), storage::Lsscsi::parse(), and storage::Partition::sysfsPath().
| string storage::Disk::sysfsPath | ( | const string & | device | ) | [static] |
References storage::Device::dev, and SYSFSDIR.
| unsigned storage::Disk::numPartitions | ( | ) | const |
| bool storage::Disk::isDasd | ( | ) | const [inline] |
| 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 |
References ext_possible, max_primary, and y2mil.
| bool storage::Disk::detect | ( | SystemInfo & | systeminfo | ) |
References detectGeometry(), and detectPartitions().
Referenced by storage::MdPartCo::createDisk(), storage::DmPartCo::createDisk(), and storage::Storage::initDisk().
| static storage::CType storage::Disk::staticType | ( | ) | [inline, static] |
Reimplemented from storage::Container.
References storage::DISK.
Referenced by getCommitActions(), and storage::Dasd::getCommitActions().
| void storage::Disk::triggerUdevUpdate | ( | ) | const |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), and partPair().
| bool storage::Disk::needP | ( | const string & | dev | ) | [static] |
| string storage::Disk::partNaming | ( | const string & | disk | ) | [static] |
References needP().
Referenced by getPartDevice(), storage::Storage::getPartitionName(), storage::Storage::getPartitionPrefix(), getPartName(), partitionsKernelKnowns(), and storage::Volume::setNameDev().
| void storage::Disk::setUdevData | ( | const string & | path, | |
| const list< string > & | id | |||
| ) |
References storage::Device::alt_names, storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::Device::nm, partPair(), udev_id, udev_path, and y2mil.
Referenced by storage::MdPartCo::setUdevData(), and storage::DmPartCo::setUdevData().
| 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(), storage::DmPartCo::createPartition(), and createPartition().
| int storage::Disk::createPartition | ( | long unsigned | len, | |
| string & | device, | |||
| bool | checkRelaxed = false | |||
| ) |
| int storage::Disk::createPartition | ( | storage::PartitionType | type, | |
| string & | device | |||
| ) |
References availablePartNumber(), storage::IterPair< Iter >::begin(), createPartition(), storage::DISK_CREATE_PARTITION_NO_SPACE, storage::DISK_PARTITION_NO_FREE_NUMBER, storage::IterPair< Iter >::empty(), storage::EXTENDED, getUnusedSpace(), storage::LOGICAL, storage::notDeletedExt(), partPair(), storage::PRIMARY, storage::PTYPE_ANY, storage::regions_sort_size(), storage::toString(), and y2mil.
| int storage::Disk::removePartition | ( | unsigned | nr | ) | [virtual] |
Reimplemented in storage::Dasd.
References storage::IterPair< Iter >::begin(), changeNumbers(), storage::DISK_CHANGE_READONLY, storage::DISK_PARTITION_NOT_FOUND, storage::DISK_REMOVE_PARTITION_CREATE_NOT_FOUND, storage::DISK_REMOVE_USED_BY, storage::IterPair< Iter >::end(), storage::EXTENDED, storage::Container::getStorage(), storage::Storage::logCo(), max_primary, storage::Partition::notDeleted(), partPair(), storage::Container::readonly(), storage::Container::removeFromList(), storage::volume_ptr_sort_nr(), and y2mil.
Referenced by storage::Storage::removePartition(), storage::MdPartCo::removePartition(), storage::DmPartCo::removePartition(), storage::Dasd::removePartition(), storage::MdPartCo::removeVolume(), storage::DmPartCo::removeVolume(), and removeVolume().
| int storage::Disk::changePartitionId | ( | unsigned | nr, | |
| unsigned | id | |||
| ) | [virtual] |
Reimplemented in storage::Dasd.
References storage::IterPair< Iter >::begin(), storage::DISK_PARTITION_NOT_FOUND, storage::IterPair< Iter >::end(), storage::Partition::notDeleted(), partPair(), storage::Container::readonly(), y2mil, and y2war.
Referenced by storage::Storage::changePartitionId(), storage::MdPartCo::changePartitionId(), and storage::DmPartCo::changePartitionId().
| virtual int storage::Disk::initializeDisk | ( | bool | ) | [inline, virtual] |
Reimplemented in storage::Dasd.
References storage::DISK_INIT_NOT_POSSIBLE.
Referenced by storage::needDasdfmt().
| bool storage::Disk::initializeDisk | ( | ) | const [inline] |
References init_disk.
| void storage::Disk::resetInitDisk | ( | ) | [inline] |
| int storage::Disk::forgetChangePartitionId | ( | unsigned | nr | ) |
References storage::IterPair< Iter >::begin(), storage::DISK_CHANGE_READONLY, storage::DISK_PARTITION_NOT_FOUND, storage::IterPair< Iter >::end(), storage::Partition::notDeleted(), partPair(), storage::Container::readonly(), and y2mil.
Referenced by storage::Storage::forgetChangePartitionId(), storage::MdPartCo::forgetChangePartitionId(), and storage::DmPartCo::forgetChangePartitionId().
| int storage::Disk::changePartitionArea | ( | unsigned | nr, | |
| const Region & | cylRegion, | |||
| bool | checkRelaxed = false | |||
| ) |
References storage::IterPair< Iter >::begin(), cylinders(), cylinderToKb(), storage::DISK_CHANGE_READONLY, storage::DISK_PARTITION_EXCEEDS_DISK, storage::DISK_PARTITION_LOGICAL_OUTSIDE_EXT, storage::DISK_PARTITION_NOT_FOUND, storage::DISK_PARTITION_OVERLAPS_EXISTING, storage::DISK_PARTITION_ZERO_SIZE, storage::Region::empty(), storage::Region::end(), storage::IterPair< Iter >::end(), storage::fuzz_cyl, storage::Region::len(), storage::LOGICAL, max_primary, storage::Partition::notDeleted(), storage::notDeletedExt(), storage::notDeletedLog(), partPair(), storage::Container::readonly(), y2mil, and y2war.
Referenced by storage::MdPartCo::changePartitionArea(), storage::DmPartCo::changePartitionArea(), and storage::Storage::updatePartitionArea().
| int storage::Disk::nextFreePartition | ( | storage::PartitionType | type, | |
| unsigned & | nr, | |||
| string & | device | |||
| ) | const |
References availablePartNumber(), storage::DISK_PARTITION_NO_FREE_NUMBER, getPartDevice(), and y2mil.
| int storage::Disk::destroyPartitionTable | ( | const string & | new_label | ) |
References del_ptable, storage::Device::device(), storage::DISK_DESTROY_TABLE_INVALID_LABEL, dmp_slave, storage::Storage::getRecursiveRemoval(), storage::Container::getStorage(), storage::Device::getUsedBy(), storage::Device::isUsedBy(), label, max_primary, storage::Storage::removeUsing(), storage::Storage::removeVolume(), storage::Container::ronly, setLabelData(), storage::Storage::setRecursiveRemoval(), storage::Container::vols, and y2mil.
Referenced by storage::MdPartCo::destroyPartitionTable(), storage::DmPartCo::destroyPartitionTable(), and storage::Dasd::initializeDisk().
| unsigned storage::Disk::availablePartNumber | ( | storage::PartitionType | type = storage::PRIMARY |
) | const |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::empty(), storage::IterPair< Iter >::end(), ext_possible, storage::EXTENDED, hasExtended(), label, storage::LOGICAL, max_logical, max_primary, storage::Device::name(), storage::Partition::notDeleted(), partPair(), range, storage::toString(), and y2mil.
Referenced by createPartition(), storage::MdPartCo::nextFreePartition(), storage::DmPartCo::nextFreePartition(), and nextFreePartition().
| void storage::Disk::getCommitActions | ( | list< commitAction > & | l | ) | const [virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::DECREASE, del_ptable, storage::Container::getCommitActions(), setDiskLabelText(), and staticType().
Referenced by storage::Dasd::getCommitActions().
| 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.
References storage::IterPair< Iter >::begin(), del_ptable, storage::IterPair< Iter >::end(), storage::Container::getToCommit(), storage::INCREASE, partPair(), storage::Partition::toChangeId(), and y2mil.
Referenced by storage::Dasd::getToCommit().
| int storage::Disk::commitChanges | ( | storage::CommitStage | stage | ) | [virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::DECREASE, del_ptable, storage::DISK_COMMIT_NOTHING_TODO, doCreateLabel(), storage::Device::name(), and y2mil.
Referenced by storage::Dasd::commitChanges().
| int storage::Disk::commitChanges | ( | storage::CommitStage | stage, | |
| Volume * | vol | |||
| ) | [virtual] |
Reimplemented from storage::Container.
References storage::Container::commitChanges(), storage::DISK_SET_TYPE_INVALID_VOLUME, doSetType(), storage::INCREASE, storage::Device::name(), storage::Partition::toChangeId(), and y2mil.
| int storage::Disk::freeCylindersAroundPartition | ( | const Partition * | p, | |
| unsigned long & | freeCylsBefore, | |||
| unsigned long & | freeCylsAfter | |||
| ) | const |
References storage::IterPair< Iter >::begin(), storage::Partition::cylEnd(), cylinders(), storage::Partition::cylSize(), storage::Partition::cylStart(), storage::Region::doIntersect(), storage::IterPair< Iter >::end(), storage::EXTENDED, hasExtended(), storage::LOGICAL, storage::Partition::notDeleted(), storage::notDeletedExt(), storage::Volume::nr(), partPair(), storage::PRIMARY, storage::Partition::type(), usableCylRegion(), and y2mil.
Referenced by storage::Storage::freeCylindersAroundPartition(), storage::MdPartCo::freeCylindersAroundPartition(), storage::DmPartCo::freeCylindersAroundPartition(), and resizePartition().
| int storage::Disk::resizePartition | ( | Partition * | p, | |
| unsigned long | newCyl | |||
| ) | [virtual] |
Reimplemented in storage::Dasd.
References storage::Volume::canResize(), storage::Partition::changeRegion(), storage::Device::created(), cylinderToKb(), storage::Partition::cylSize(), storage::Partition::cylStart(), storage::DISK_CHANGE_READONLY, storage::DISK_RESIZE_NO_SPACE, freeCylindersAroundPartition(), storage::Container::readonly(), storage::Partition::setResizedSize(), and y2mil.
Referenced by storage::Storage::resizePartition(), storage::MdPartCo::resizePartition(), storage::DmPartCo::resizePartition(), and resizeVolume().
| int storage::Disk::resizeVolume | ( | Volume * | v, | |
| unsigned long long | newSize | |||
| ) | [virtual] |
Reimplemented from storage::Container.
References cylinderToKb(), storage::DISK_CHANGE_READONLY, storage::DISK_CHECK_RESIZE_INVALID_VOLUME, kbToCylinder(), storage::Container::readonly(), resizePartition(), and y2mil.
Referenced by storage::MdPartCo::resizeVolume(), and storage::DmPartCo::resizeVolume().
| int storage::Disk::removeVolume | ( | Volume * | v | ) | [virtual] |
| void storage::Disk::getUnusedSpace | ( | std::list< Region > & | free, | |
| bool | all = true, |
|||
| bool | logical = false | |||
| ) | const |
References storage::IterPair< Iter >::begin(), cylinders(), storage::Region::doIntersect(), storage::IterPair< Iter >::empty(), storage::IterPair< Iter >::end(), storage::Container::end(), storage::Region::intersect(), storage::notDeletedExt(), storage::notDeletedLog(), storage::notDeletedNotLog(), partPair(), usableCylRegion(), y2deb, and y2mil.
Referenced by createPartition(), storage::MdPartCo::getUnusedSpace(), and storage::DmPartCo::getUnusedSpace().
| unsigned int storage::Disk::numPrimary | ( | ) | const |
References storage::IterPair< Iter >::length(), storage::notDeletedPri(), and partPair().
Referenced by storage::MdPartCo::numPrimary(), and storage::DmPartCo::numPrimary().
| bool storage::Disk::hasExtended | ( | ) | const |
| unsigned int storage::Disk::numLogical | ( | ) | const |
References storage::IterPair< Iter >::length(), storage::notDeletedLog(), and partPair().
Referenced by storage::MdPartCo::numLogical(), and storage::DmPartCo::numLogical().
| Text storage::Disk::setDiskLabelText | ( | bool | doing | ) | const |
References storage::_(), storage::Device::dev, label, and storage::sformat().
Referenced by doCreateLabel(), getCommitActions(), storage::MdPartCo::setDiskLabelText(), and storage::DmPartCo::setDiskLabelText().
| unsigned long long storage::Disk::cylinderToKb | ( | unsigned long | cylinder | ) | const [inline] |
References storage::Geometry::cylinderToKb(), and geometry.
Referenced by changePartitionArea(), storage::Dasd::checkFdasdOutput(), checkPartedOutput(), storage::MdPartCo::cylinderToKb(), storage::DmPartCo::cylinderToKb(), storage::Dasd::detectPartitions(), getPartedValues(), resizePartition(), and resizeVolume().
| unsigned long storage::Disk::kbToCylinder | ( | unsigned long long | kb | ) | const [inline] |
References geometry, and storage::Geometry::kbToCylinder().
Referenced by checkPartedValid(), storage::MdPartCo::kbToCylinder(), storage::DmPartCo::kbToCylinder(), resizeVolume(), and usableCylRegion().
| unsigned long long storage::Disk::sectorToKb | ( | unsigned long long | sector | ) | const [inline] |
| unsigned long long storage::Disk::kbToSector | ( | unsigned long long | kb | ) | const [inline] |
References geometry, and storage::Geometry::kbToSector().
Referenced by addPartition(), defaultLabel(), and doResize().
| string storage::Disk::getPartName | ( | unsigned | nr | ) | const |
References storage::decString(), storage::Device::dev, storage::Device::nm, and partNaming().
Referenced by addPartition(), storage::Dasd::checkFdasdOutput(), checkPartedOutput(), checkPartedValid(), storage::Dasd::detectPartitions(), and doRemove().
| string storage::Disk::getPartDevice | ( | unsigned | nr | ) | const |
| void storage::Disk::getInfo | ( | storage::DiskInfo & | info | ) | const |
References storage::DiskInfo::cyl, cylinders(), storage::Geometry::cylinderSize(), storage::DiskInfo::cylSize, detected_label, storage::DiskInfo::disklabel, extendedPossible(), storage::DiskInfo::extendedPossible, geometry, heads(), storage::DiskInfo::heads, info, init_disk, storage::DiskInfo::initDisk, storage::ISCSI, storage::DiskInfo::iscsi, label, labelName(), maxLogical(), storage::DiskInfo::maxLogical, maxPrimary(), storage::DiskInfo::maxPrimary, storage::DiskInfo::orig_disklabel, sectors(), storage::DiskInfo::sectors, sectorSize(), storage::DiskInfo::sectorSize, storage::Device::sizeK(), storage::DiskInfo::sizeK, storage::DiskInfo::transport, and transport.
Referenced by storage::MdPartCo::getInfo(), and storage::DmPartCo::getInfo().
| bool storage::Disk::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), del_ptable, dmp_slave, storage::IterPair< Iter >::end(), storage::equalContent(), ext_possible, geometry, gpt_enlarge, init_disk, label, max_logical, max_primary, storage::Device::mjr, storage::Device::mnr, no_addpart, partPair(), range, storage::Device::size_k, and transport.
| void storage::Disk::logDifference | ( | std::ostream & | log, | |
| const Disk & | rhs | |||
| ) | const |
References del_ptable, ext_possible, geometry, init_disk, label, storage::logDiff(), storage::logDiffEnum(), storage::Container::logDifference(), max_logical, max_primary, range, storage::Device::size_k, and transport.
Referenced by logDifferenceWithVolumes().
| void storage::Disk::logDifferenceWithVolumes | ( | std::ostream & | log, | |
| const Container & | rhs | |||
| ) | const [virtual] |
Implements storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), logDifference(), storage::logVolumesDifference(), and partPair().
| bool storage::Disk::FakeDisk | ( | ) | const [inline] |
References range.
| pair< string, unsigned > storage::Disk::getDiskPartition | ( | const string & | dev | ) | [static] |
References storage::Regex::match(), and y2mil.
Referenced by checkPartedValid(), and storage::Storage::getMountBy().
| bool storage::Disk::getDlabelCapabilities | ( | const string & | dlabel, | |
| storage::DlabelCapabilities & | dlabelcapabilities | |||
| ) | [static] |
References storage::Disk::label_info::extended, storage::DlabelCapabilities::extendedPossible, labels, storage::Disk::label_info::logical, storage::Disk::label_info::max_sectors, storage::DlabelCapabilities::maxLogical, storage::DlabelCapabilities::maxPrimary, storage::DlabelCapabilities::maxSectors, storage::Disk::label_info::name, storage::Device::name(), storage::Disk::label_info::primary, and y2mil.
Referenced by storage::Storage::getDlabelCapabilities(), setLabelData(), and usableCylRegion().
| bool storage::Disk::getSysfsInfo | ( | const string & | sysfsdir, | |
| SysfsInfo & | sysfsinfo | |||
| ) | [static] |
References storage::Disk::SysfsInfo::range, storage::read_sysfs_property(), storage::Disk::SysfsInfo::size, storage::Disk::SysfsInfo::vbd, and y2mil.
Referenced by storage::Storage::initDisk().
| PartPair storage::Disk::partPair | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | [inline, protected] |
References partBegin(), and partEnd().
Referenced by availablePartNumber(), changePartitionArea(), changePartitionId(), createChecks(), createPartition(), Disk(), doCreate(), storage::Dasd::doFdasd(), doRemove(), doResize(), equalContent(), forgetChangePartitionId(), freeCylindersAroundPartition(), storage::MdPartCo::getPartition(), storage::DmPartCo::getPartition(), getPartitionAfter(), storage::Storage::getRecursiveUsingHelper(), getToCommit(), getUnusedSpace(), storage::MdPartCo::getVolumes(), storage::DmPartCo::getVolumes(), storage::MdPartCo::handleWholeDevice(), storage::DmPartCo::handleWholeDevice(), hasExtended(), storage::Dasd::initializeDisk(), logDifferenceWithVolumes(), numLogical(), numPartitions(), numPrimary(), removePartition(), storage::Dasd::removePartition(), saveData(), setUdevData(), triggerUdevUpdate(), storage::MdPartCo::validPartition(), and storage::DmPartCo::validPartition().
| ConstPartPair storage::Disk::partPair | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | const [inline] |
References partBegin(), and partEnd().
| 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().
| bool storage::Disk::detectGeometry | ( | ) | [protected, virtual] |
| bool storage::Disk::detectPartitions | ( | SystemInfo & | systeminfo | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::_(), checkPartedOutput(), defaultLabel(), detected_label, storage::Device::dev, geometry, storage::Parted::getGeometry(), storage::Parted::getGptEnlarge(), storage::Parted::getLabel(), storage::SystemInfo::getParted(), gpt_enlarge, label, storage::Text::native, new_geometry, storage::Container::ronly, setLabelData(), storage::sformat(), storage::Container::vols, y2mil, and y2war.
Referenced by detect().
| bool storage::Disk::getSysfsInfo | ( | ) | [protected] |
References storage::Device::dev, storage::Device::mjr, storage::Device::mnr, storage::Disk::SysfsInfo::range, range, sysfsPath(), and y2mil.
Referenced by storage::Storage::autodetectDisks().
| int storage::Disk::checkSystemError | ( | const string & | cmd_line, | |
| const SystemCmd & | cmd | |||
| ) | const [protected] |
References dmp_slave, storage::SystemCmd::retcode(), storage::SystemCmd::stderr(), storage::SystemCmd::stdout(), y2err, and y2mil.
Referenced by execCheckFailed().
| int storage::Disk::execCheckFailed | ( | const string & | cmd_line, | |
| bool | stop_hald = true | |||
| ) | [protected] |
Referenced by doCreate(), doCreateLabel(), storage::Dasd::doDasdfmt(), storage::Dasd::doFdasd(), doRemove(), doResize(), and doSetType().
| int storage::Disk::execCheckFailed | ( | SystemCmd & | cmd, | |
| const string & | cmd_line, | |||
| bool | stop_hald = true | |||
| ) | [protected] |
| bool storage::Disk::checkPartedOutput | ( | SystemInfo & | systeminfo | ) | [protected] |
References storage::_(), storage::Storage::addInfoPopupText(), storage::Container::addToList(), checkPartedValid(), cylinderToKb(), storage::Device::dev, dmp_slave, storage::EXTENDED, storage::Parted::getEntries(), getPartDevice(), storage::SystemInfo::getParted(), getPartName(), storage::SystemInfo::getProcParts(), storage::ProcParts::getSize(), storage::Container::getStorage(), storage::Device::nm, range, storage::Container::ronly, storage::sformat(), and y2mil.
Referenced by detectPartitions().
| list< string > storage::Disk::partitionsKernelKnowns | ( | const ProcParts & | parts | ) | const [protected] |
References storage::Device::dev, storage::ProcParts::getMatchingEntries(), partNaming(), and y2mil.
Referenced by checkPartedValid(), checkPartitionsValid(), and storage::Dasd::checkPartitionsValid().
| bool storage::Disk::checkPartedValid | ( | SystemInfo & | systeminfo, | |
| list< Partition * > & | pl, | |||
| unsigned long & | rng | |||
| ) | const [protected] |
References checkPartitionsValid(), ext_possible, storage::EXTENDED, getDiskPartition(), getPartDevice(), getPartName(), storage::SystemInfo::getProcParts(), storage::ProcParts::getSize(), storage::Partition::ID_EXTENDED, storage::Partition::ID_LINUX, kbToCylinder(), label, storage::LOGICAL, max_primary, partitionsKernelKnowns(), storage::PRIMARY, procExtendedBlks(), range, storage::Container::type(), and y2mil.
Referenced by storage::Dasd::checkFdasdOutput(), and checkPartedOutput().
| bool storage::Disk::checkPartitionsValid | ( | SystemInfo & | systeminfo, | |
| const list< Partition * > & | pl | |||
| ) | const [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::Partition::detectSysfsBlkRegion(), storage::Device::dev, storage::EXTENDED, storage::Parted::getEntry(), storage::SystemInfo::getParted(), storage::SystemInfo::getProcParts(), storage::Volume::nr(), partitionsKernelKnowns(), storage::Parted::Entry::secRegion, sectorSize(), storage::Partition::type(), and y2err.
Referenced by checkPartedValid().
| bool storage::Disk::callDelpart | ( | unsigned | nr | ) | const [protected] |
References storage::decString(), DELPARTBIN, storage::Device::device(), storage::quote(), and storage::SystemCmd::retcode().
Referenced by doRemove(), and getPartedValues().
| bool storage::Disk::callAddpart | ( | unsigned | nr, | |
| const Region & | blkRegion | |||
| ) | const [protected] |
References ADDPARTBIN, storage::decString(), storage::Device::device(), storage::Region::len(), storage::quote(), storage::SystemCmd::retcode(), and storage::Region::start().
Referenced by getPartedValues().
| bool storage::Disk::getPartedValues | ( | Partition * | p | ) | const [protected] |
References callAddpart(), callDelpart(), storage::Partition::changeRegion(), cylinderToKb(), storage::Parted::Entry::cylRegion, storage::Partition::detectSysfsBlkRegion(), storage::Device::device(), storage::EXTENDED, storage::Parted::getEntry(), storage::ProcParts::getSize(), storage::Container::getStorage(), storage::Region::len(), no_addpart, storage::Volume::nr(), procExtendedBlks(), storage::Partition::procName(), storage::Parted::Entry::secRegion, sectorSize(), storage::Region::setLen(), storage::Volume::setSize(), storage::Device::sizeK(), storage::Storage::testmode(), storage::Partition::type(), y2err, and y2mil.
Referenced by doCreate(), and doResize().
| bool storage::Disk::getPartedSectors | ( | const Partition * | p, | |
| unsigned long long & | start, | |||
| unsigned long long & | end | |||
| ) | const [protected] |
References storage::Partition::cylEnd(), storage::Partition::cylStart(), storage::Device::device(), storage::Region::end(), storage::Parted::getEntry(), storage::Container::getStorage(), storage::Geometry::heads, new_geometry, storage::Volume::nr(), storage::Parted::Entry::secRegion, storage::Geometry::sectors, and storage::Region::start().
Referenced by doResize().
| void storage::Disk::addPartition | ( | unsigned | num, | |
| unsigned long long | sz, | |||
| SystemInfo & | ppart | |||
| ) | [protected] |
References storage::Container::addToList(), storage::Geometry::cylinders, geometry, getPartDevice(), getPartName(), storage::SystemInfo::getProcParts(), storage::ProcParts::getSize(), storage::Geometry::heads, kbToSector(), new_geometry, storage::PRIMARY, storage::Partition::procName(), storage::Geometry::sectors, storage::Volume::setSize(), and storage::Device::size_k.
Referenced by Disk().
| virtual void storage::Disk::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
| virtual Container* storage::Disk::getCopy | ( | ) | const [inline, protected, virtual] |
| void storage::Disk::redetectGeometry | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::Device::device(), geometry, storage::Parted::getGeometry(), new_geometry, and y2mil.
Referenced by doCreateLabel(), and doRemove().
| int storage::Disk::createChecks | ( | PartitionType & | type, | |
| const Region & | cylRegion, | |||
| bool | checkRelaxed | |||
| ) | const [protected] |
References storage::IterPair< Iter >::begin(), cylinders(), storage::DISK_CHANGE_READONLY, storage::DISK_CREATE_PARTITION_EXT_IMPOSSIBLE, storage::DISK_CREATE_PARTITION_EXT_ONLY_ONCE, storage::DISK_CREATE_PARTITION_LOGICAL_NO_EXT, storage::DISK_PARTITION_EXCEEDS_DISK, storage::DISK_PARTITION_LOGICAL_OUTSIDE_EXT, storage::DISK_PARTITION_OVERLAPS_EXISTING, storage::DISK_PARTITION_ZERO_SIZE, storage::Region::empty(), storage::IterPair< Iter >::empty(), storage::IterPair< Iter >::end(), storage::Region::end(), ext_possible, storage::EXTENDED, storage::fuzz_cyl, storage::LOGICAL, storage::Partition::notDeleted(), storage::notDeletedExt(), storage::notDeletedLog(), partPair(), storage::PRIMARY, storage::PTYPE_ANY, storage::Container::readonly(), storage::Region::start(), storage::toString(), y2mil, and y2war.
| void storage::Disk::removePresentPartitions | ( | ) | [protected] |
| void storage::Disk::removeFromMemory | ( | ) | [protected] |
References storage::Container::vols, and y2mil.
Referenced by doCreateLabel(), and storage::Dasd::doDasdfmt().
| void storage::Disk::enlargeGpt | ( | ) | [protected] |
References storage::Device::device(), gpt_enlarge, PARTEDBIN, storage::quote(), and y2mil.
Referenced by doCreate().
| unsigned long long storage::Disk::procExtendedBlks | ( | ) | const [protected] |
| 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::Partition::createText(), storage::Geometry::cylinders, cylinders(), storage::Partition::cylSize(), storage::Partition::cylStart(), storage::decString(), detected_label, storage::Device::device(), storage::DISK_CREATE_PARTITION_INVALID_TYPE, storage::DISK_CREATE_PARTITION_INVALID_VOLUME, storage::DISK_CREATE_PARTITION_PARTED_FAILED, storage::DISK_PARTITION_NOT_FOUND, dmp_slave, doCreateLabel(), doSetType(), storage::IterPair< Iter >::empty(), storage::IterPair< Iter >::end(), storage::Container::end(), enlargeGpt(), execCheckFailed(), storage::existingLog(), storage::existingNotLog(), storage::EXTENDED, storage::fuzz_cyl, geometry, storage::Volume::getFormat(), storage::Volume::getLabel(), getPartedValues(), storage::Container::getStorage(), gpt_enlarge, storage::Storage::handleHald(), storage::Partition::id(), 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::Storage::instsys(), label, storage::IterPair< Iter >::length(), storage::LOGICAL, storage::logicalCreated(), storage::Device::name(), storage::Volume::needLabel(), new_geometry, storage::notDeletedExt(), storage::Volume::nr(), PARTEDCMD, partPair(), storage::PRIMARY, storage::quote(), storage::Device::setCreated(), storage::Volume::setLabel(), storage::Storage::showInfoCb(), storage::Device::silent, storage::sub_sat(), storage::toString(), storage::Partition::type(), storage::Volume::updateFsData(), storage::Storage::waitForDevice(), y2mil, and storage::Partition::zeroIfNeeded().
Referenced by storage::MdPartCo::doCreate(), and storage::DmPartCo::doCreate().
| int storage::Disk::doRemove | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References callDelpart(), storage::classic(), storage::Device::created(), storage::Device::device(), storage::DISK_REMOVE_PARTITION_INVALID_VOLUME, storage::DISK_REMOVE_PARTITION_LIST_ERASE, storage::DISK_REMOVE_PARTITION_PARTED_FAILED, dmp_slave, storage::IterPair< Iter >::empty(), execCheckFailed(), storage::ProcParts::findDevice(), getPartDevice(), getPartName(), storage::Container::getStorage(), storage::Storage::handleHald(), storage::Device::name(), storage::notCreatedPrimary(), storage::Partition::OrigNr(), PARTEDCMD, partPair(), storage::Volume::prepareRemove(), storage::quote(), redetectGeometry(), storage::Storage::removeDmMapsTo(), storage::Container::removeFromList(), storage::Partition::removeText(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Storage::waitForDevice(), and y2mil.
Referenced by storage::MdPartCo::doRemove(), storage::DmPartCo::doRemove(), and removePresentPartitions().
| int storage::Disk::doResize | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::Dasd.
References storage::IterPair< Iter >::begin(), storage::classic(), storage::Geometry::cylinderSize(), storage::Device::device(), storage::DISK_PARTITION_NOT_FOUND, storage::DISK_RESIZE_PARTITION_INVALID_VOLUME, storage::DISK_RESIZE_PARTITION_PARTED_FAILED, dmp_slave, storage::IterPair< Iter >::empty(), execCheckFailed(), storage::FSNONE, geometry, storage::Volume::getFs(), getPartedSectors(), getPartedValues(), getPartitionAfter(), storage::Container::getStorage(), storage::Storage::handleHald(), storage::HFS, storage::HFSPLUS, storage::Volume::isMounted(), kbToSector(), storage::LOGICAL, storage::Volume::mount(), storage::Device::name(), storage::Volume::needExtend(), storage::Volume::needShrink(), storage::notDeletedExt(), storage::Volume::nr(), PARTEDCMD, partPair(), storage::quote(), storage::Volume::resizeFs(), storage::Partition::resizeText(), sectorSize(), storage::Storage::showInfoCb(), storage::Device::silent, 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::classic(), storage::Device::device(), storage::DISK_SET_TYPE_INVALID_VOLUME, storage::DISK_SET_TYPE_PARTED_FAILED, dmp_slave, execCheckFailed(), storage::Container::getStorage(), storage::Partition::ID_GPT_BOOT, storage::Partition::ID_LINUX, storage::Partition::ID_LVM, storage::Partition::ID_RAID, storage::Partition::ID_SWAP, label, storage::Device::name(), PARTEDCMD, storage::quote(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Storage::waitForDevice(), and y2mil.
Referenced by commitChanges(), doCreate(), storage::MdPartCo::doSetType(), and storage::DmPartCo::doSetType().
| int storage::Disk::doCreateLabel | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::ArchInfo::arch, storage::classic(), del_ptable, detected_label, storage::Device::device(), storage::DISK_SET_LABEL_PARTED_FAILED, dmp_slave, execCheckFailed(), storage::Storage::getArchInfo(), storage::Container::getStorage(), gpt_enlarge, storage::ArchInfo::is_efiboot, label, LABEL_GPT_SYNC_MBR, MDADMBIN, PARTEDCMD, storage::quote(), redetectGeometry(), storage::Storage::removeDmMapsTo(), removeFromMemory(), removePresentPartitions(), setDiskLabelText(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Storage::waitForDevice(), and y2mil.
Referenced by commitChanges(), doCreate(), storage::MdPartCo::doCreateLabel(), and storage::DmPartCo::doCreateLabel().
| void storage::Disk::logData | ( | const string & | Dir | ) | const [protected, virtual] |
Reimplemented from storage::Container.
References storage::Container::getStorage(), storage::Storage::handleLogFile(), logfile_name, storage::XmlFile::save(), saveData(), storage::XmlFile::setRootElement(), and storage::xmlNewNode().
| void storage::Disk::setLabelData | ( | const string & | disklabel | ) | [protected] |
References ext_possible, storage::DlabelCapabilities::extendedPossible, getDlabelCapabilities(), label, max_logical, max_primary, storage::DlabelCapabilities::maxLogical, storage::DlabelCapabilities::maxPrimary, range, and y2mil.
Referenced by destroyPartitionTable(), detectPartitions(), and storage::Dasd::detectPartitions().
| string storage::Disk::defaultLabel | ( | ) | const [protected, virtual] |
Reimplemented in storage::Dasd.
References storage::ArchInfo::arch, storage::Storage::getArchInfo(), storage::Container::getStorage(), storage::ArchInfo::is_efiboot, storage::ArchInfo::is_ppc_mac, storage::ArchInfo::is_ppc_pegasos, kbToSector(), storage::Device::size_k, and y2mil.
Referenced by detectPartitions().
friend class Storage [friend] |
friend class DmPartCo [friend] |
friend class MdPartCo [friend] |
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const Disk & | d | |||
| ) | [friend] |
const Disk::label_info storage::Disk::labels [static, protected] |
Initial value:
{
{ "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 },
{ "", false, 0, 0, 0 }
}
Referenced by getDlabelCapabilities().
const string storage::Disk::p_disks [static, protected] |
Initial value:
{ "cciss/", "ida/", "ataraid/", "etherd/", "rd/", "mmcblk[0-9]+",
"md[0-9]+" }
Referenced by needP().
Geometry storage::Disk::geometry [protected] |
Referenced by addPartition(), storage::Dasd::checkFdasdOutput(), storage::Dasd::checkPartitionsValid(), cylinders(), cylinderToKb(), detectGeometry(), detectPartitions(), storage::Dasd::detectPartitions(), Disk(), doCreate(), doResize(), equalContent(), getGeometry(), getInfo(), heads(), storage::Dasd::initializeDisk(), kbToCylinder(), kbToSector(), logDifference(), storage::operator<<(), redetectGeometry(), saveData(), sectors(), sectorSize(), and sectorToKb().
Geometry storage::Disk::new_geometry [protected] |
string storage::Disk::label [protected] |
Referenced by availablePartNumber(), checkPartedValid(), destroyPartitionTable(), detectPartitions(), storage::Dasd::detectPartitions(), Disk(), doCreate(), doCreateLabel(), doSetType(), equalContent(), getInfo(), labelName(), logDifference(), storage::operator<<(), saveData(), setDiskLabelText(), setLabelData(), and usableCylRegion().
string storage::Disk::udev_path [protected] |
Referenced by storage::operator<<(), saveData(), setUdevData(), and udevPath().
list<string> storage::Disk::udev_id [protected] |
Referenced by storage::operator<<(), saveData(), setUdevData(), and udevId().
string storage::Disk::detected_label [protected] |
Referenced by detectPartitions(), storage::Dasd::detectPartitions(), doCreate(), doCreateLabel(), getInfo(), and storage::operator<<().
string storage::Disk::logfile_name [protected] |
unsigned storage::Disk::max_primary [protected] |
bool storage::Disk::ext_possible [protected] |
unsigned storage::Disk::max_logical [protected] |
Referenced by availablePartNumber(), Disk(), equalContent(), logDifference(), maxLogical(), storage::operator<<(), saveData(), and setLabelData().
bool storage::Disk::init_disk [protected] |
Transport storage::Disk::transport [protected] |
Referenced by Disk(), equalContent(), getInfo(), isIScsi(), logDifference(), storage::operator<<(), and saveData().
bool storage::Disk::dmp_slave [protected] |
bool storage::Disk::no_addpart [protected] |
Referenced by equalContent(), getPartedValues(), storage::operator<<(), and setAddpart().
bool storage::Disk::gpt_enlarge [protected] |
Referenced by detectPartitions(), doCreate(), doCreateLabel(), enlargeGpt(), equalContent(), and storage::operator<<().
unsigned long storage::Disk::range [protected] |
bool storage::Disk::del_ptable [protected] |
Referenced by storage::MdPartCo::commitChanges(), storage::DmPartCo::commitChanges(), commitChanges(), destroyPartitionTable(), doCreateLabel(), storage::Dasd::doFdasd(), equalContent(), storage::MdPartCo::getCommitActions(), storage::DmPartCo::getCommitActions(), getCommitActions(), storage::MdPartCo::getToCommit(), storage::DmPartCo::getToCommit(), getToCommit(), logDifference(), and storage::operator<<().
storage::DiskInfo storage::Disk::info [mutable, protected] |
1.5.6