#include <Disk.h>
Inheritance diagram for storage::Disk:

Public Types | |
| typedef DerefIterator< PartCPIterator, const Partition > | ConstPartIter |
| typedef IterPair< ConstPartIter > | ConstPartPair |
Public Member Functions | |
| Disk (Storage *const s, const string &Name, unsigned long long Size) | |
| Disk (Storage *const s, const string &Name, unsigned num, unsigned long long Size, ProcPart &ppart) | |
| Disk (const Disk &rhs) | |
| virtual | ~Disk () |
| unsigned long | cylinders () const |
| unsigned | heads () const |
| unsigned | sectors () const |
| unsigned long | numMinor () const |
| unsigned long | cylSizeB () const |
| unsigned | maxPrimary () const |
| unsigned | maxLogical () const |
| const string & | labelName () const |
| const string & | udevPath () const |
| const std::list< string > & | udevId () const |
| void | setSlave (bool val=true) |
| void | setNumMinor (unsigned long val) |
| void | addMpAlias (const string &dev) |
| void | clearMpAlias () |
| const std::list< string > & | mpAlias () const |
| const string & | sysfsDir () const |
| unsigned | numPartitions () const |
| bool | isDasd () const |
| bool | isLogical (unsigned nr) const |
| bool | detect (ProcPart &ppart) |
| void | setUdevData (const string &path, const 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, unsigned long start, unsigned long size, bool checkRelaxed=false) |
| int | nextFreePartition (storage::PartitionType type, unsigned &nr, string &device) |
| int | destroyPartitionTable (const string &new_label) |
| unsigned | availablePartNumber (storage::PartitionType type=storage::PRIMARY) |
| virtual void | getCommitActions (std::list< storage::commitAction * > &l) const |
| virtual int | getToCommit (storage::CommitStage stage, std::list< Container * > &col, std::list< Volume * > &vol) |
| virtual int | commitChanges (storage::CommitStage stage) |
| int | commitChanges (storage::CommitStage stage, Volume *vol) |
| 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) |
| bool | hasExtended () const |
| string | setDiskLabelText (bool doing=true) const |
| unsigned long long | cylinderToKb (unsigned long) const |
| unsigned long | kbToCylinder (unsigned long long) const |
| string | getPartName (unsigned nr) const |
| void | getInfo (storage::DiskInfo &info) const |
| bool | equalContent (const Disk &rhs) const |
| void | logDifference (const Disk &d) const |
| Disk & | operator= (const Disk &rhs) |
| 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 storage::CType const | staticType () |
| static bool | needP (const string &dev) |
| static string | getPartName (const string &disk, unsigned nr) |
| static string | getPartName (const string &disk, const string &nr) |
| static std::pair< string, long > | getDiskPartition (const string &dev) |
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) |
| Disk (Storage *const s, const string &File) | |
| virtual bool | detectGeometry () |
| virtual bool | detectPartitions (ProcPart &ppart) |
| bool | getSysfsInfo (const string &SysFsDir) |
| int | checkSystemError (const string &cmd_line, const SystemCmd &cmd) |
| int | execCheckFailed (const string &cmd_line) |
| int | execCheckFailed (SystemCmd &cmd, const string &cmd_line) |
| bool | checkPartedOutput (const SystemCmd &cmd, ProcPart &ppart) |
| bool | scanPartedLine (const string &Line, unsigned &nr, unsigned long &start, unsigned long &csize, storage::PartitionType &type, unsigned &id, bool &boot) |
| bool | checkPartedValid (const ProcPart &pp, const string &diskname, std::list< Partition * > &pl, unsigned long &rng) |
| bool | getPartedValues (Partition *p) |
| bool | getPartedSectors (const Partition *p, unsigned long long &start, unsigned long long &end) |
| const Partition * | getPartitionAfter (const Partition *p) |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| void | getGeometry (const string &line, unsigned long &c, unsigned &h, unsigned &s) |
| virtual void | redetectGeometry () |
| void | changeNumbers (const PartIter &b, const PartIter &e, unsigned start, int incr) |
| int | createChecks (storage::PartitionType &type, unsigned long start, unsigned long len, bool checkRelaxed) |
| void | removePresentPartitions () |
| void | removeFromMemory () |
| virtual int | doCreate (Volume *v) |
| virtual int | doRemove (Volume *v) |
| virtual int | doResize (Volume *v) |
| virtual int | doSetType (Volume *v) |
| virtual int | doCreateLabel () |
| void | logData (const string &Dir) |
| bool | haveBsdPart (const std::list< Partition * > &pl) const |
| void | setLabelData (const string &) |
Static Protected Member Functions | |
| static bool | notDeleted (const Partition &d) |
| static string | defaultLabel () |
Protected Attributes | |
| unsigned long | cyl |
| unsigned | head |
| unsigned | sector |
| unsigned long | new_cyl |
| unsigned | new_head |
| unsigned | new_sector |
| string | label |
| string | udev_path |
| std::list< string > | udev_id |
| std::list< string > | mp_alias |
| string | detected_label |
| string | system_stderr |
| string | logfile_name |
| string | sysfs_dir |
| unsigned | max_primary |
| bool | ext_possible |
| bool | init_disk |
| bool | dmp_slave |
| unsigned | max_logical |
| unsigned long | byte_cyl |
| unsigned long | range |
| storage::DiskInfo | info |
Static Protected Attributes | |
| static label_info | labels [] |
| static string | p_disks [] |
Friends | |
| class | Storage |
| class | DmPartCo |
| std::ostream & | operator<< (std::ostream &, const Disk &) |
Classes | |
| struct | label_info |
| struct | PartitionCPI |
| struct | PartitionPI |
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 |
| Disk::Disk | ( | Storage *const | s, | |
| const string & | Name, | |||
| unsigned long long | Size | |||
| ) |
| Disk::Disk | ( | Storage *const | s, | |
| const string & | Name, | |||
| unsigned | num, | |||
| unsigned long long | Size, | |||
| ProcPart & | ppart | |||
| ) |
| Disk::Disk | ( | const Disk & | rhs | ) |
| Disk::~Disk | ( | ) | [virtual] |
| Disk::Disk | ( | Storage *const | s, | |
| const string & | File | |||
| ) | [protected] |
| unsigned long storage::Disk::cylinders | ( | ) | const [inline] |
| unsigned storage::Disk::heads | ( | ) | const [inline] |
| unsigned storage::Disk::sectors | ( | ) | const [inline] |
| unsigned long storage::Disk::numMinor | ( | ) | const [inline] |
| unsigned long storage::Disk::cylSizeB | ( | ) | const [inline] |
| unsigned storage::Disk::maxPrimary | ( | ) | const [inline] |
| unsigned storage::Disk::maxLogical | ( | ) | const [inline] |
| const string& storage::Disk::labelName | ( | ) | const [inline] |
| const string& storage::Disk::udevPath | ( | ) | const [inline] |
| const std::list<string>& storage::Disk::udevId | ( | ) | const [inline] |
| void storage::Disk::setSlave | ( | bool | val = true |
) | [inline] |
| void storage::Disk::setNumMinor | ( | unsigned long | val | ) | [inline] |
| void Disk::addMpAlias | ( | const string & | dev | ) |
| void storage::Disk::clearMpAlias | ( | ) | [inline] |
| const std::list<string>& storage::Disk::mpAlias | ( | ) | const [inline] |
| const string& storage::Disk::sysfsDir | ( | ) | const [inline] |
| unsigned Disk::numPartitions | ( | ) | const |
| bool storage::Disk::isDasd | ( | ) | const [inline] |
| bool Disk::isLogical | ( | unsigned | nr | ) | const |
| bool Disk::detect | ( | ProcPart & | ppart | ) |
| static storage::CType const storage::Disk::staticType | ( | ) | [inline, static] |
Reimplemented from storage::Container.
| bool Disk::needP | ( | const string & | dev | ) | [static] |
| void Disk::setUdevData | ( | const string & | path, | |
| const string & | id | |||
| ) |
| virtual int storage::Disk::createPartition | ( | storage::PartitionType | type, | |
| long unsigned | start, | |||
| long unsigned | len, | |||
| string & | device, | |||
| bool | checkRelaxed = false | |||
| ) | [virtual] |
Reimplemented in storage::Dasd.
| int storage::Disk::createPartition | ( | long unsigned | len, | |
| string & | device, | |||
| bool | checkRelaxed = false | |||
| ) |
| int Disk::createPartition | ( | storage::PartitionType | type, | |
| string & | device | |||
| ) |
| int Disk::removePartition | ( | unsigned | nr | ) | [virtual] |
Reimplemented in storage::Dasd.
| int Disk::changePartitionId | ( | unsigned | nr, | |
| unsigned | id | |||
| ) | [virtual] |
Reimplemented in storage::Dasd.
| virtual int storage::Disk::initializeDisk | ( | bool | ) | [inline, virtual] |
Reimplemented in storage::Dasd.
| bool storage::Disk::initializeDisk | ( | ) | const [inline] |
| void storage::Disk::resetInitDisk | ( | ) | [inline] |
| int Disk::forgetChangePartitionId | ( | unsigned | nr | ) |
| int Disk::changePartitionArea | ( | unsigned | nr, | |
| unsigned long | start, | |||
| unsigned long | size, | |||
| bool | checkRelaxed = false | |||
| ) |
| int Disk::nextFreePartition | ( | storage::PartitionType | type, | |
| unsigned & | nr, | |||
| string & | device | |||
| ) |
| int Disk::destroyPartitionTable | ( | const string & | new_label | ) |
| unsigned Disk::availablePartNumber | ( | storage::PartitionType | type = storage::PRIMARY |
) |
| virtual void storage::Disk::getCommitActions | ( | std::list< storage::commitAction * > & | l | ) | const [virtual] |
| virtual int storage::Disk::getToCommit | ( | storage::CommitStage | stage, | |
| std::list< Container * > & | col, | |||
| std::list< Volume * > & | vol | |||
| ) | [virtual] |
| int Disk::commitChanges | ( | storage::CommitStage | stage | ) | [virtual] |
| int Disk::commitChanges | ( | storage::CommitStage | stage, | |
| Volume * | vol | |||
| ) | [virtual] |
Reimplemented from storage::Container.
| int Disk::resizePartition | ( | Partition * | p, | |
| unsigned long | newCyl | |||
| ) | [virtual] |
Reimplemented in storage::Dasd.
| int Disk::resizeVolume | ( | Volume * | v, | |
| unsigned long long | newSize | |||
| ) | [virtual] |
Reimplemented from storage::Container.
| int Disk::removeVolume | ( | Volume * | v | ) | [virtual] |
Reimplemented from storage::Container.
| void storage::Disk::getUnusedSpace | ( | std::list< Region > & | free, | |
| bool | all = true, |
|||
| bool | logical = false | |||
| ) |
| bool Disk::hasExtended | ( | ) | const |
| string Disk::setDiskLabelText | ( | bool | doing = true |
) | const |
| unsigned long long Disk::cylinderToKb | ( | unsigned | long | ) | const |
| unsigned long Disk::kbToCylinder | ( | unsigned long | long | ) | const |
| string Disk::getPartName | ( | unsigned | nr | ) | const |
| void Disk::getInfo | ( | storage::DiskInfo & | info | ) | const |
| bool Disk::equalContent | ( | const Disk & | rhs | ) | const |
| void Disk::logDifference | ( | const Disk & | d | ) | const |
| bool storage::Disk::FakeDisk | ( | ) | const [inline] |
| string Disk::getPartName | ( | const string & | disk, | |
| unsigned | nr | |||
| ) | [static] |
| string Disk::getPartName | ( | const string & | disk, | |
| const string & | nr | |||
| ) | [static] |
| pair< string, long > Disk::getDiskPartition | ( | const string & | dev | ) | [static] |
| PartPair storage::Disk::partPair | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | [inline, protected] |
| PartIter storage::Disk::partBegin | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | [inline, protected] |
| ConstPartPair storage::Disk::partPair | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | const [inline] |
| ConstPartIter storage::Disk::partBegin | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | const [inline] |
| ConstPartIter storage::Disk::partEnd | ( | bool(*)(const Partition &) | CheckPart = NULL |
) | const [inline] |
| bool Disk::detectGeometry | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
| bool Disk::detectPartitions | ( | ProcPart & | ppart | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
| bool Disk::getSysfsInfo | ( | const string & | SysFsDir | ) | [protected] |
| int Disk::checkSystemError | ( | const string & | cmd_line, | |
| const SystemCmd & | cmd | |||
| ) | [protected] |
| int Disk::execCheckFailed | ( | const string & | cmd_line | ) | [protected] |
| int Disk::execCheckFailed | ( | SystemCmd & | cmd, | |
| const string & | cmd_line | |||
| ) | [protected] |
| bool Disk::scanPartedLine | ( | const string & | Line, | |
| unsigned & | nr, | |||
| unsigned long & | start, | |||
| unsigned long & | csize, | |||
| storage::PartitionType & | type, | |||
| unsigned & | id, | |||
| bool & | boot | |||
| ) | [protected] |
| bool storage::Disk::checkPartedValid | ( | const ProcPart & | pp, | |
| const string & | diskname, | |||
| std::list< Partition * > & | pl, | |||
| unsigned long & | rng | |||
| ) | [protected] |
| bool Disk::getPartedValues | ( | Partition * | p | ) | [protected] |
| bool Disk::getPartedSectors | ( | const Partition * | p, | |
| unsigned long long & | start, | |||
| unsigned long long & | end | |||
| ) | [protected] |
| virtual void storage::Disk::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
| virtual Container* storage::Disk::getCopy | ( | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
| void Disk::getGeometry | ( | const string & | line, | |
| unsigned long & | c, | |||
| unsigned & | h, | |||
| unsigned & | s | |||
| ) | [protected] |
| void Disk::redetectGeometry | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
| void Disk::changeNumbers | ( | const PartIter & | b, | |
| const PartIter & | e, | |||
| unsigned | start, | |||
| int | incr | |||
| ) | [protected] |
| int Disk::createChecks | ( | storage::PartitionType & | type, | |
| unsigned long | start, | |||
| unsigned long | len, | |||
| bool | checkRelaxed | |||
| ) | [protected] |
| void Disk::removePresentPartitions | ( | ) | [protected] |
| void Disk::removeFromMemory | ( | ) | [protected] |
| static bool storage::Disk::notDeleted | ( | const Partition & | d | ) | [inline, static, protected] |
| int Disk::doCreate | ( | Volume * | v | ) | [protected, virtual] |
| int Disk::doRemove | ( | Volume * | v | ) | [protected, virtual] |
| int Disk::doResize | ( | Volume * | v | ) | [protected, virtual] |
| int Disk::doSetType | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
| int Disk::doCreateLabel | ( | ) | [protected, virtual] |
Reimplemented in storage::Dasd.
| void Disk::logData | ( | const string & | Dir | ) | [protected, virtual] |
Reimplemented from storage::Container.
| bool storage::Disk::haveBsdPart | ( | const std::list< Partition * > & | pl | ) | const [protected] |
| void Disk::setLabelData | ( | const string & | ) | [protected] |
| string Disk::defaultLabel | ( | ) | [static, protected] |
friend class Storage [friend] |
friend class DmPartCo [friend] |
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const Disk & | d | |||
| ) | [friend] |
Disk::label_info Disk::labels [static, protected] |
string Disk::p_disks [static, protected] |
unsigned long storage::Disk::cyl [protected] |
unsigned storage::Disk::head [protected] |
unsigned storage::Disk::sector [protected] |
unsigned long storage::Disk::new_cyl [protected] |
unsigned storage::Disk::new_head [protected] |
unsigned storage::Disk::new_sector [protected] |
string storage::Disk::label [protected] |
string storage::Disk::udev_path [protected] |
std::list<string> storage::Disk::udev_id [protected] |
std::list<string> storage::Disk::mp_alias [protected] |
string storage::Disk::detected_label [protected] |
string storage::Disk::system_stderr [protected] |
string storage::Disk::logfile_name [protected] |
string storage::Disk::sysfs_dir [protected] |
unsigned storage::Disk::max_primary [protected] |
bool storage::Disk::ext_possible [protected] |
bool storage::Disk::init_disk [protected] |
bool storage::Disk::dmp_slave [protected] |
unsigned storage::Disk::max_logical [protected] |
unsigned long storage::Disk::byte_cyl [protected] |
unsigned long storage::Disk::range [protected] |
storage::DiskInfo storage::Disk::info [mutable, protected] |
Reimplemented from storage::Container.
1.5.0