storage::Partition Class Reference

#include <Partition.h>

Inheritance diagram for storage::Partition:

storage::Volume

List of all members.

Public Types

enum  IdNum {
  ID_DOS16 = 0x6, ID_DOS = 0x0c, ID_NTFS = 0x07, ID_EXTENDED = 0x0f,
  ID_LINUX = 0x83, ID_SWAP = 0x82, ID_LVM = 0x8e, ID_RAID = 0xfd,
  ID_APPLE_OTHER = 0x101, ID_APPLE_HFS = 0x102, ID_GPT_BOOT = 0x103, ID_GPT_SERVICE = 0x104,
  ID_GPT_MSFTRES = 0x105, ID_APPLE_UFS = 0x106
}

Public Member Functions

 Partition (const Disk &d, unsigned Pnr, unsigned long long SizeK, unsigned long Start, unsigned long CSize, storage::PartitionType Type, unsigned id=ID_LINUX, bool Boot=false)
 Partition (const Disk &d, const string &Data)
 Partition (const Disk &d, const Partition &p)
virtual ~Partition ()
unsigned long cylStart () const
unsigned long cylSize () const
unsigned long cylEnd () const
const Regionregion () const
const std::list< string > udevId () const
const string & udevPath () const
string sysfsPath () const
bool intersectArea (const Region &r, unsigned fuzz=0) const
bool contains (const Region &r, unsigned fuzz=0) const
unsigned OrigNr () const
bool boot () const
unsigned id () const
storage::PartitionType type () const
std::ostream & logData (std::ostream &file) const
void changeRegion (unsigned long Start, unsigned long CSize, unsigned long long SizeK)
void changeNumber (unsigned new_num)
void changeId (unsigned id)
void changeIdDone ()
void unChangeId ()
string removeText (bool doing=true) const
string createText (bool doing=true) const
string formatText (bool doing=true) const
string resizeText (bool doing=true) const
void getCommitActions (std::list< storage::commitAction * > &l) const
string setTypeText (bool doing=true) const
int setFormat (bool format=true, storage::FsType fs=storage::REISERFS)
int changeMount (const string &val)
const Diskdisk () const
bool isWindows () const
virtual void print (std::ostream &s) const
void setResizedSize (unsigned long long SizeK)
void forgetResize ()
bool canUseDevice () const
void getInfo (storage::PartitionInfo &info) const
void getInfo (storage::PartitionAddInfo &info) const
bool equalContent (const Partition &rhs) const
void logDifference (const Partition &d) const
void addUdevData ()
bool operator== (const Partition &rhs) const
bool operator!= (const Partition &rhs) const
bool operator< (const Partition &rhs) const
bool operator<= (const Partition &rhs) const
bool operator>= (const Partition &rhs) const
bool operator> (const Partition &rhs) const

Static Public Member Functions

static bool notDeleted (const Partition &d)
static bool toChangeId (const Partition &d)

Protected Member Functions

Partitionoperator= (const Partition &)
void addAltUdevId (unsigned num)
void addAltUdevPath (unsigned num)

Protected Attributes

Region reg
bool bootflag
storage::PartitionType typ
unsigned idt
unsigned orig_id
string parted_start
unsigned orig_num
storage::PartitionInfo info

Static Protected Attributes

static string pt_names [storage::PTYPE_ANY+1] = { "primary", "extended", "logical", "any" }

Friends

std::ostream & operator<< (std::ostream &s, const Partition &p)


Member Enumeration Documentation

Enumerator:
ID_DOS16 
ID_DOS 
ID_NTFS 
ID_EXTENDED 
ID_LINUX 
ID_SWAP 
ID_LVM 
ID_RAID 
ID_APPLE_OTHER 
ID_APPLE_HFS 
ID_GPT_BOOT 
ID_GPT_SERVICE 
ID_GPT_MSFTRES 
ID_APPLE_UFS 


Constructor & Destructor Documentation

Partition::Partition ( const Disk d,
unsigned  Pnr,
unsigned long long  SizeK,
unsigned long  Start,
unsigned long  CSize,
storage::PartitionType  Type,
unsigned  id = ID_LINUX,
bool  Boot = false 
)

Partition::Partition ( const Disk d,
const string &  Data 
)

Partition::Partition ( const Disk d,
const Partition p 
)

References storage::Volume::dev, and y2debug.

Partition::~Partition (  )  [virtual]

References storage::Volume::dev, and y2debug.


Member Function Documentation

unsigned long storage::Partition::cylStart (  )  const [inline]

unsigned long storage::Partition::cylSize (  )  const [inline]

unsigned long storage::Partition::cylEnd (  )  const [inline]

const Region& storage::Partition::region (  )  const [inline]

References reg.

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

Reimplemented from storage::Volume.

References storage::Volume::alt_names.

Referenced by addAltUdevId(), and getInfo().

const string & Partition::udevPath (  )  const [virtual]

string Partition::sysfsPath (  )  const [virtual]

bool Partition::intersectArea ( const Region r,
unsigned  fuzz = 0 
) const

bool Partition::contains ( const Region r,
unsigned  fuzz = 0 
) const

unsigned storage::Partition::OrigNr (  )  const [inline]

bool storage::Partition::boot (  )  const [inline]

References bootflag.

unsigned storage::Partition::id (  )  const [inline]

storage::PartitionType storage::Partition::type (  )  const [inline]

std::ostream& storage::Partition::logData ( std::ostream &  file  )  const

void Partition::changeRegion ( unsigned long  Start,
unsigned long  CSize,
unsigned long long  SizeK 
)

void Partition::changeNumber ( unsigned  new_num  ) 

void Partition::changeId ( unsigned  id  ) 

void Partition::changeIdDone (  ) 

References idt, and orig_id.

void Partition::unChangeId (  ) 

References idt, and orig_id.

string Partition::removeText ( bool  doing = true  )  const [virtual]

string Partition::createText ( bool  doing = true  )  const [virtual]

string Partition::formatText ( bool  doing = true  )  const [virtual]

string Partition::resizeText ( bool  doing = true  )  const [virtual]

void storage::Partition::getCommitActions ( std::list< storage::commitAction * > &  l  )  const [virtual]

Reimplemented from storage::Volume.

string Partition::setTypeText ( bool  doing = true  )  const

int Partition::setFormat ( bool  format = true,
storage::FsType  fs = storage::REISERFS 
) [virtual]

int Partition::changeMount ( const string &  val  )  [virtual]

const Disk * Partition::disk (  )  const

bool Partition::isWindows (  )  const

References ID_DOS, ID_NTFS, and idt.

Referenced by removeText(), and resizeText().

static bool storage::Partition::notDeleted ( const Partition d  )  [inline, static]

static bool storage::Partition::toChangeId ( const Partition d  )  [inline, static]

virtual void storage::Partition::print ( std::ostream &  s  )  const [inline, virtual]

Reimplemented from storage::Volume.

void Partition::setResizedSize ( unsigned long long  SizeK  )  [virtual]

void Partition::forgetResize (  )  [virtual]

bool Partition::canUseDevice (  )  const [virtual]

void Partition::getInfo ( storage::PartitionInfo info  )  const

void Partition::getInfo ( storage::PartitionAddInfo info  )  const

bool Partition::equalContent ( const Partition rhs  )  const

void Partition::logDifference ( const Partition d  )  const

void Partition::addUdevData (  ) 

bool Partition::operator== ( const Partition rhs  )  const

bool storage::Partition::operator!= ( const Partition rhs  )  const [inline]

bool Partition::operator< ( const Partition rhs  )  const

References storage::Volume::del, and orig_num.

bool storage::Partition::operator<= ( const Partition rhs  )  const [inline]

bool storage::Partition::operator>= ( const Partition rhs  )  const [inline]

bool storage::Partition::operator> ( const Partition rhs  )  const [inline]

Partition & Partition::operator= ( const Partition rhs  )  [protected]

void Partition::addAltUdevId ( unsigned  num  )  [protected]

void Partition::addAltUdevPath ( unsigned  num  )  [protected]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const Partition p 
) [friend]


Member Data Documentation

bool storage::Partition::bootflag [protected]

unsigned storage::Partition::idt [protected]

unsigned storage::Partition::orig_id [protected]

unsigned storage::Partition::orig_num [protected]

string Partition::pt_names = { "primary", "extended", "logical", "any" } [static, protected]

Reimplemented from storage::Volume.

Referenced by getInfo().


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

Generated on Sun Jun 8 10:48:04 2008 for yast2-storage by  doxygen 1.5.5