storage::Volume Class Reference

#include <Volume.h>

Inheritance diagram for storage::Volume:

storage::Dm storage::Loop storage::Md storage::Partition storage::DmPart storage::Evms storage::LvmLv storage::Dmraid List of all members.

Public Member Functions

 Volume (const Container &d, unsigned Pnr, unsigned long long SizeK)
 Volume (const Container &d, const string &PName, unsigned long long SizeK)
 Volume (const Container &d)
 Volume (const Volume &)
Volumeoperator= (const Volume &)
virtual ~Volume ()
const string & device () const
const string & mountDevice () const
const string & loopDevice () const
const ContainergetContainer () const
storage::CType cType () const
bool deleted () const
bool created () const
bool silent () const
virtual const std::list< string > udevId () const
virtual const string & udevPath () const
virtual string sysfsPath () const
void setDeleted (bool val=true)
void setCreated (bool val=true)
void setReadonly (bool val=true)
void setSilent (bool val=true)
bool ignoreFstab () const
void setIgnoreFstab (bool val=true)
bool ignoreFs () const
void setIgnoreFs (bool val=true)
void setFstabAdded (bool val=true)
bool fstabAdded () const
const storage::usedBygetUsedBy () const
storage::UsedByType getUsedByType () const
const string & usedByName () const
void setUsedBy (storage::UsedByType t, const string &name)
void getFsInfo (const Volume *source)
virtual int setFormat (bool format=true, storage::FsType fs=storage::REISERFS)
void formattingDone ()
bool getFormat () const
void rename (const string &newName)
int changeFstabOptions (const string &options)
int changeMountBy (storage::MountByType mby)
virtual int changeMount (const string &m)
bool loop () const
bool loopActive () const
bool needLosetup () const
const string & getUuid () const
const string & getLabel () const
int setLabel (const string &val)
bool needLabel () const
storage::EncryptType getEncryption () const
void setEncryption (storage::EncryptType val=storage::ENC_TWOFISH)
int setEncryption (bool val)
const string & getCryptPwd () const
int setCryptPwd (const string &val)
void clearCryptPwd ()
const string & getMount () const
bool needRemount () const
bool needShrink () const
bool needExtend () const
long long extendSize () const
storage::FsType getFs () const
void setFs (storage::FsType val)
void setUuid (const string &id)
void initLabel (const string &lbl)
storage::MountByType getMountBy () const
const string & getFstabOption () const
void setFstabOption (const string &val)
bool needFstabUpdate () const
const string & getMkfsOption () const
int setMkfsOption (const string &val)
const string & getDescText () const
int setDescText (const string &val)
const std::list< string > & altNames () const
unsigned nr () const
unsigned long long sizeK () const
unsigned long long origSizeK () const
const string & name () const
unsigned long minorNr () const
unsigned long majorNr () const
void setMajorMinor (unsigned long Major, unsigned long Minor)
void setSize (unsigned long long SizeK)
virtual void setResizedSize (unsigned long long SizeK)
virtual void forgetResize ()
virtual bool canUseDevice () const
bool operator== (const Volume &rhs) const
bool operator!= (const Volume &rhs) const
bool operator< (const Volume &rhs) const
bool operator<= (const Volume &rhs) const
bool operator>= (const Volume &rhs) const
bool operator> (const Volume &rhs) const
bool equalContent (const Volume &rhs) const
string logDifference (const Volume &c) const
int prepareRemove ()
int umount (const string &mp="")
int loUnsetup ()
int mount (const string &mp="")
int canResize (unsigned long long newSizeK) const
int doMount ()
int doFormat ()
int doLosetup ()
int doSetLabel ()
int doFstabUpdate ()
int resizeFs ()
void fstabUpdateDone ()
bool isMounted () const
virtual string removeText (bool doing=true) const
virtual string createText (bool doing=true) const
virtual string resizeText (bool doing=true) const
virtual string formatText (bool doing=true) const
virtual void getCommitActions (std::list< storage::commitAction * > &l) const
string mountText (bool doing=true) const
string labelText (bool doing=true) const
string losetupText (bool doing=true) const
string fstabUpdateText () const
string sizeString () const
string bootMount () const
bool optNoauto () const
bool inCrypto () const
virtual void print (std::ostream &s) const
int getFreeLoop ()
void getInfo (storage::VolumeInfo &info) const
void mergeFstabInfo (storage::VolumeInfo &tinfo, const FstabEntry &fste) const
void updateFsData ()
const string & fsTypeString () const

Static Public Member Functions

static bool loopInUse (Storage *sto, const string &loopdev)
static bool notDeleted (const Volume &d)
static bool isDeleted (const Volume &d)
static bool getMajorMinor (const string &device, unsigned long &Major, unsigned long &Minor)
static bool loopStringNum (const string &name, unsigned &num)
static storage::EncryptType toEncType (const string &val)
static storage::FsType toFsType (const string &val)
static storage::MountByType toMountByType (const string &val)
static const string & fsTypeString (const storage::FsType type)
static const string & encTypeString (const storage::EncryptType type)
static const string & mbyTypeString (const storage::MountByType type)

Static Public Attributes

static SkipDeleted SkipDel

Protected Member Functions

void init ()
void setNameDev ()
int checkDevice ()
int checkDevice (const string &device)
storage::MountByType defaultMountBy (const string &mp="")
bool allowedMountBy (storage::MountByType mby, const string &mp="")
void getFsData (SystemCmd &blkidData)
void getLoopData (SystemCmd &loopData)
void getMountData (const ProcMounts &mountData)
void getFstabData (EtcFstab &fstabData)
void getTestmodeData (const string &data)
string getMountByString (storage::MountByType mby, const string &dev, const string &uuid, const string &label) const
void setExtError (const SystemCmd &cmd, bool serr=true)
std::ostream & logVolume (std::ostream &file) const
string getLosetupCmd (storage::EncryptType e, const string &pwdfile) const
storage::EncryptType detectLoopEncryption ()
string getFilesysSysfsPath () const
void triggerUdevUpdate ()

Protected Attributes

const Container *const cont
bool numeric
bool create
bool del
bool format
bool silnt
bool fstab_added
storage::FsType fs
storage::FsType detected_fs
storage::MountByType mount_by
storage::MountByType orig_mount_by
string uuid
string label
string orig_label
string mp
string orig_mp
string fstab_opt
string orig_fstab_opt
string mkfs_opt
bool is_loop
bool is_mounted
bool ignore_fstab
bool ignore_fs
bool loop_active
bool ronly
storage::EncryptType encryption
storage::EncryptType orig_encryption
string loop_dev
string fstab_loop_dev
string crypt_pwd
string nm
std::list< string > alt_names
unsigned num
unsigned long long size_k
unsigned long long orig_size_k
string dev
string dtxt
unsigned long mnr
unsigned long mjr
storage::usedBy uby
storage::VolumeInfo info

Static Protected Attributes

static string fs_names [storage::FSNONE+1]
static string mb_names [storage::MOUNTBY_PATH+1]
static string enc_names [storage::ENC_UNKNOWN+1]
static string empty_string
static std::list< string > empty_slist

Friends

class Storage
std::ostream & operator<< (std::ostream &s, const Volume &v)

Classes

struct  SkipDeleted

Constructor & Destructor Documentation

Volume::Volume ( const Container d,
unsigned  Pnr,
unsigned long long  SizeK 
)

Volume::Volume ( const Container d,
const string &  PName,
unsigned long long  SizeK 
)

Volume::Volume ( const Container d  ) 

Volume::Volume ( const Volume  ) 

Volume::~Volume (  )  [virtual]


Member Function Documentation

Volume & Volume::operator= ( const Volume  ) 

const string& storage::Volume::device (  )  const [inline]

const string& storage::Volume::mountDevice (  )  const [inline]

const string& storage::Volume::loopDevice (  )  const [inline]

const Container* storage::Volume::getContainer (  )  const [inline]

CType Volume::cType (  )  const

bool storage::Volume::deleted (  )  const [inline]

bool storage::Volume::created (  )  const [inline]

bool storage::Volume::silent (  )  const [inline]

virtual const std::list<string> storage::Volume::udevId (  )  const [inline, virtual]

Reimplemented in storage::Partition.

virtual const string& storage::Volume::udevPath (  )  const [inline, virtual]

Reimplemented in storage::Partition.

string Volume::sysfsPath (  )  const [virtual]

Reimplemented in storage::Dm, and storage::Partition.

void storage::Volume::setDeleted ( bool  val = true  )  [inline]

void storage::Volume::setCreated ( bool  val = true  )  [inline]

void storage::Volume::setReadonly ( bool  val = true  )  [inline]

void storage::Volume::setSilent ( bool  val = true  )  [inline]

bool storage::Volume::ignoreFstab (  )  const [inline]

void storage::Volume::setIgnoreFstab ( bool  val = true  )  [inline]

bool storage::Volume::ignoreFs (  )  const [inline]

void storage::Volume::setIgnoreFs ( bool  val = true  )  [inline]

void storage::Volume::setFstabAdded ( bool  val = true  )  [inline]

bool storage::Volume::fstabAdded (  )  const [inline]

const storage::usedBy& storage::Volume::getUsedBy (  )  const [inline]

storage::UsedByType storage::Volume::getUsedByType (  )  const [inline]

const string& storage::Volume::usedByName (  )  const [inline]

void storage::Volume::setUsedBy ( storage::UsedByType  t,
const string &  name 
) [inline]

void Volume::getFsInfo ( const Volume source  ) 

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

Reimplemented in storage::Partition.

void storage::Volume::formattingDone (  )  [inline]

bool storage::Volume::getFormat (  )  const [inline]

void Volume::rename ( const string &  newName  ) 

int Volume::changeFstabOptions ( const string &  options  ) 

int Volume::changeMountBy ( storage::MountByType  mby  ) 

int Volume::changeMount ( const string &  m  )  [virtual]

Reimplemented in storage::Partition.

bool storage::Volume::loop (  )  const [inline]

bool storage::Volume::loopActive (  )  const [inline]

bool Volume::needLosetup (  )  const

const string& storage::Volume::getUuid (  )  const [inline]

const string& storage::Volume::getLabel (  )  const [inline]

int Volume::setLabel ( const string &  val  ) 

bool storage::Volume::needLabel (  )  const [inline]

storage::EncryptType storage::Volume::getEncryption (  )  const [inline]

void storage::Volume::setEncryption ( storage::EncryptType  val = storage::ENC_TWOFISH  )  [inline]

int Volume::setEncryption ( bool  val  ) 

const string& storage::Volume::getCryptPwd (  )  const [inline]

int Volume::setCryptPwd ( const string &  val  ) 

void storage::Volume::clearCryptPwd (  )  [inline]

const string& storage::Volume::getMount (  )  const [inline]

bool Volume::needRemount (  )  const

bool storage::Volume::needShrink (  )  const [inline]

bool storage::Volume::needExtend (  )  const [inline]

long long storage::Volume::extendSize (  )  const [inline]

storage::FsType storage::Volume::getFs (  )  const [inline]

void storage::Volume::setFs ( storage::FsType  val  )  [inline]

void storage::Volume::setUuid ( const string &  id  )  [inline]

Reimplemented in storage::LvmLv.

void storage::Volume::initLabel ( const string &  lbl  )  [inline]

storage::MountByType storage::Volume::getMountBy (  )  const [inline]

const string& storage::Volume::getFstabOption (  )  const [inline]

void storage::Volume::setFstabOption ( const string &  val  )  [inline]

bool storage::Volume::needFstabUpdate (  )  const [inline]

const string& storage::Volume::getMkfsOption (  )  const [inline]

int storage::Volume::setMkfsOption ( const string &  val  )  [inline]

const string& storage::Volume::getDescText (  )  const [inline]

int storage::Volume::setDescText ( const string &  val  )  [inline]

const std::list<string>& storage::Volume::altNames (  )  const [inline]

unsigned storage::Volume::nr (  )  const [inline]

unsigned long long storage::Volume::sizeK (  )  const [inline]

unsigned long long storage::Volume::origSizeK (  )  const [inline]

const string& storage::Volume::name (  )  const [inline]

unsigned long storage::Volume::minorNr (  )  const [inline]

unsigned long storage::Volume::majorNr (  )  const [inline]

void storage::Volume::setMajorMinor ( unsigned long  Major,
unsigned long  Minor 
) [inline]

void storage::Volume::setSize ( unsigned long long  SizeK  )  [inline]

virtual void storage::Volume::setResizedSize ( unsigned long long  SizeK  )  [inline, virtual]

Reimplemented in storage::Partition.

virtual void storage::Volume::forgetResize (  )  [inline, virtual]

Reimplemented in storage::Partition.

bool Volume::canUseDevice (  )  const [virtual]

Reimplemented in storage::Partition.

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

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

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

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

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

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

bool Volume::equalContent ( const Volume rhs  )  const

string Volume::logDifference ( const Volume c  )  const

int Volume::prepareRemove (  ) 

int Volume::umount ( const string &  mp = ""  ) 

int Volume::loUnsetup (  ) 

int Volume::mount ( const string &  mp = ""  ) 

int Volume::canResize ( unsigned long long  newSizeK  )  const

int Volume::doMount (  ) 

int Volume::doFormat (  ) 

int Volume::doLosetup (  ) 

int Volume::doSetLabel (  ) 

int Volume::doFstabUpdate (  ) 

int Volume::resizeFs (  ) 

void Volume::fstabUpdateDone (  ) 

bool storage::Volume::isMounted (  )  const [inline]

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

Reimplemented in storage::Dm, storage::Dmraid, storage::Evms, storage::Loop, storage::LvmLv, storage::Md, and storage::Partition.

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

Reimplemented in storage::Dmraid, storage::Evms, storage::Loop, storage::LvmLv, storage::Md, and storage::Partition.

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

Reimplemented in storage::Dmraid, storage::Evms, storage::LvmLv, and storage::Partition.

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

Reimplemented in storage::Dm, storage::Dmraid, storage::Evms, storage::Loop, storage::LvmLv, storage::Md, and storage::Partition.

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

Reimplemented in storage::DmPart, and storage::Partition.

string Volume::mountText ( bool  doing = true  )  const

string Volume::labelText ( bool  doing = true  )  const

string Volume::losetupText ( bool  doing = true  )  const

string Volume::fstabUpdateText (  )  const

string Volume::sizeString (  )  const

string Volume::bootMount (  )  const

bool Volume::optNoauto (  )  const

bool storage::Volume::inCrypto (  )  const [inline]

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

Reimplemented in storage::Dm, storage::DmPart, storage::Dmraid, storage::Evms, storage::Loop, storage::LvmLv, storage::Md, and storage::Partition.

int Volume::getFreeLoop (  ) 

void Volume::getInfo ( storage::VolumeInfo info  )  const

void Volume::mergeFstabInfo ( storage::VolumeInfo tinfo,
const FstabEntry fste 
) const

void Volume::updateFsData (  ) 

bool Volume::loopInUse ( Storage sto,
const string &  loopdev 
) [static]

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

static bool storage::Volume::isDeleted ( const Volume d  )  [inline, static]

bool Volume::getMajorMinor ( const string &  device,
unsigned long &  Major,
unsigned long &  Minor 
) [static]

bool Volume::loopStringNum ( const string &  name,
unsigned &  num 
) [static]

EncryptType Volume::toEncType ( const string &  val  )  [static]

FsType Volume::toFsType ( const string &  val  )  [static]

MountByType Volume::toMountByType ( const string &  val  )  [static]

const string& storage::Volume::fsTypeString (  )  const [inline]

static const string& storage::Volume::fsTypeString ( const storage::FsType  type  )  [inline, static]

static const string& storage::Volume::encTypeString ( const storage::EncryptType  type  )  [inline, static]

static const string& storage::Volume::mbyTypeString ( const storage::MountByType  type  )  [inline, static]

void Volume::init (  )  [protected]

Reimplemented in storage::Dm, storage::Loop, and storage::Md.

void Volume::setNameDev (  )  [protected]

int Volume::checkDevice (  )  [protected]

int Volume::checkDevice ( const string &  device  )  [protected]

storage::MountByType Volume::defaultMountBy ( const string &  mp = ""  )  [protected]

bool Volume::allowedMountBy ( storage::MountByType  mby,
const string &  mp = "" 
) [protected]

void Volume::getFsData ( SystemCmd blkidData  )  [protected]

void Volume::getLoopData ( SystemCmd loopData  )  [protected]

void Volume::getMountData ( const ProcMounts mountData  )  [protected]

void Volume::getFstabData ( EtcFstab fstabData  )  [protected]

void Volume::getTestmodeData ( const string &  data  )  [protected]

string Volume::getMountByString ( storage::MountByType  mby,
const string &  dev,
const string &  uuid,
const string &  label 
) const [protected]

void Volume::setExtError ( const SystemCmd cmd,
bool  serr = true 
) [protected]

std::ostream& storage::Volume::logVolume ( std::ostream &  file  )  const [protected]

string Volume::getLosetupCmd ( storage::EncryptType  e,
const string &  pwdfile 
) const [protected]

EncryptType Volume::detectLoopEncryption (  )  [protected]

string Volume::getFilesysSysfsPath (  )  const [protected]

void Volume::triggerUdevUpdate (  )  [protected]


Friends And Related Function Documentation

friend class Storage [friend]

std::ostream& operator<< ( std::ostream &  s,
const Volume v 
) [friend]


Member Data Documentation

SkipDeleted storage::Volume::SkipDel [static]

const Container* const storage::Volume::cont [protected]

bool storage::Volume::numeric [protected]

bool storage::Volume::create [protected]

bool storage::Volume::del [protected]

bool storage::Volume::format [protected]

bool storage::Volume::silnt [protected]

bool storage::Volume::fstab_added [protected]

storage::FsType storage::Volume::fs [protected]

storage::FsType storage::Volume::detected_fs [protected]

storage::MountByType storage::Volume::mount_by [protected]

storage::MountByType storage::Volume::orig_mount_by [protected]

string storage::Volume::uuid [protected]

string storage::Volume::label [protected]

string storage::Volume::orig_label [protected]

string storage::Volume::mp [protected]

string storage::Volume::orig_mp [protected]

string storage::Volume::fstab_opt [protected]

string storage::Volume::orig_fstab_opt [protected]

string storage::Volume::mkfs_opt [protected]

bool storage::Volume::is_loop [protected]

bool storage::Volume::is_mounted [protected]

bool storage::Volume::ignore_fstab [protected]

bool storage::Volume::ignore_fs [protected]

bool storage::Volume::loop_active [protected]

bool storage::Volume::ronly [protected]

storage::EncryptType storage::Volume::encryption [protected]

storage::EncryptType storage::Volume::orig_encryption [protected]

string storage::Volume::loop_dev [protected]

string storage::Volume::fstab_loop_dev [protected]

string storage::Volume::crypt_pwd [protected]

string storage::Volume::nm [protected]

std::list<string> storage::Volume::alt_names [protected]

unsigned storage::Volume::num [protected]

unsigned long long storage::Volume::size_k [protected]

unsigned long long storage::Volume::orig_size_k [protected]

string storage::Volume::dev [protected]

string storage::Volume::dtxt [protected]

unsigned long storage::Volume::mnr [protected]

unsigned long storage::Volume::mjr [protected]

storage::usedBy storage::Volume::uby [protected]

string Volume::fs_names [static, protected]

string Volume::mb_names [static, protected]

string Volume::enc_names [static, protected]

string Volume::empty_string [static, protected]

list< string > Volume::empty_slist [static, protected]

storage::VolumeInfo storage::Volume::info [mutable, protected]

Reimplemented in storage::Dm, storage::DmPart, storage::Evms, storage::Loop, storage::LvmLv, storage::Md, and storage::Partition.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 17:50:02 2006 for yast2-storage by  doxygen 1.5.0