|
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 long | sizeK () const |
unsigned long | minorNr () const |
unsigned long | majorNr () 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 | 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 |
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 |
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 DerefIterator< PartCPIterator,
const Partition > | ConstPartIter |
typedef IterPair< PartIter > | PartPair |
typedef IterPair< ConstPartIter > | ConstPartPair |
Protected Member Functions |
PartPair | partPair (bool(*CheckPart)(const Partition &)=NULL) |
PartIter | partBegin (bool(*CheckPart)(const Partition &)=NULL) |
PartIter | partEnd (bool(*CheckPart)(const Partition &)=NULL) |
ConstPartPair | partPair (bool(*CheckPart)(const Partition &)=NULL) const |
ConstPartIter | partBegin (bool(*CheckPart)(const Partition &)=NULL) const |
ConstPartIter | partEnd (bool(*CheckPart)(const Partition &)=NULL) const |
| Disk (Storage *const s, const string &File) |
unsigned long long | capacityInKb () const |
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 |
unsigned | max_logical |
unsigned long | byte_cyl |
unsigned long long | size_k |
unsigned long | mnr |
unsigned long | mjr |
unsigned long | range |
storage::DiskInfo | info |
Static Protected Attributes |
static label_info | labels [] |
static string | p_disks [] = { "cciss/", "ida/", "ataraid/", "etherd/", "rd/" } |
Friends |
class | Storage |
class | Dasd |
std::ostream & | operator<< (std::ostream &, const Disk &) |
Classes |
struct | label_info |
struct | PartitionCPI |
struct | PartitionPI |
|
Initial value: {
{ "msdos", true, 4, 63 },
{ "gpt", false, 63, 0 },
{ "bsd", false, 8, 0 },
{ "sun", false, 8, 0 },
{ "mac", false, 64, 0 },
{ "dasd", false, 3, 0 },
{ "aix", false, 0, 0 },
{ "", false, 0, 0 }
}
|