storage::Volume Class Reference

#include <Volume.h>

Inheritance diagram for storage::Volume:

storage::Dm storage::Loop storage::Md storage::Nfs storage::Partition storage::DmPart storage::LvmLv storage::Dmmultipath 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 string & dmcryptDevice () 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 sameDevice (const string &device) const
bool fstabAdded () const
void clearUsedBy ()
void setUsedBy (storage::UsedByType ub_type, const string &ub_name)
const storage::usedBygetUsedBy () const
storage::UsedByType getUsedByType () const
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 dmcrypt () const
bool loopActive () const
bool dmcryptActive () const
bool needCrsetup () const
const string & getUuid () const
const string & getLabel () const
int setLabel (const string &val)
int eraseLabel ()
bool needLabel () const
storage::EncryptType getEncryption () const
void setEncryption (storage::EncryptType val=storage::ENC_LUKS)
virtual int setEncryption (bool val, storage::EncryptType typ=storage::ENC_LUKS)
const string & getCryptPwd () const
int setCryptPwd (const string &val)
void clearCryptPwd ()
const string & getMount () const
bool hasOrigMount () 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)
void setMount (const string &val)
void updateFstabOptions ()
bool needFstabUpdate () const
const string & getMkfsOption () const
int setMkfsOption (const string &val)
const string & getTunefsOption () const
int setTunefsOption (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
bool isNumeric () const
void setMajorMinor (unsigned long Major, unsigned long Minor)
void setSize (unsigned long long SizeK)
virtual void setResizedSize (unsigned long long SizeK)
void setDmcryptDev (const string &dm, bool active)
void setDmcryptDevEnc (const string &dm, storage::EncryptType typ, bool active)
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 crUnsetup (bool force=false)
int mount (const string &mp="", bool ro=false)
int canResize (unsigned long long newSizeK) const
int doMount ()
int doFormat ()
int doCrsetup ()
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 crsetupText (bool doing=true) const
string fstabUpdateText () const
string sizeString () const
string bootMount () const
bool optNoauto () const
bool inCryptotab () const
bool inCrypttab () const
virtual void print (std::ostream &s) const
int getFreeLoop ()
int getFreeLoop (SystemCmd &loopData)
int getFreeLoop (SystemCmd &loopData, const std::list< unsigned > &ids)
void getInfo (storage::VolumeInfo &info) const
void mergeFstabInfo (storage::VolumeInfo &tinfo, const FstabEntry &fste) const
void updateFsData ()
void triggerUdevUpdate () const
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 bool isTmpCryptMp (const string &mp)

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, bool swap_only=false)
void getFstabData (EtcFstab &fstabData)
void getStartData ()
void getTestmodeData (const string &data)
void replaceAltName (const string &prefix, const string &newn)
string getMountByString (storage::MountByType mby, const string &dev, const string &uuid, const string &label) const
string getFstabDevice ()
string getFstabDentry ()
void getFstabOpts (std::list< string > &ol)
bool getLoopFile (string &fname) const
void setExtError (const SystemCmd &cmd, bool serr=true)
string getDmcryptName ()
bool needLosetup () const
bool needCryptsetup () const
int doLosetup ()
int doCryptsetup ()
int loUnsetup (bool force=false)
int cryptUnsetup (bool force=false)
std::ostream & logVolume (std::ostream &file) const
string getLosetupCmd (storage::EncryptType, const string &pwdfile) const
string getCryptsetupCmd (storage::EncryptType e, const string &dmdev, const string &mp, const string &pwdfile, bool format, bool empty_pwd=false) const
storage::EncryptType detectEncryption ()
string getFilesysSysfsPath () const

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
string tunefs_opt
bool is_loop
bool is_mounted
bool ignore_fstab
bool ignore_fs
bool loop_active
bool dmcrypt_active
bool ronly
storage::EncryptType encryption
storage::EncryptType orig_encryption
string loop_dev
string dmcrypt_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] = { "device", "uuid", "label", "id", "path" }
static string enc_names [storage::ENC_UNKNOWN+1]
static string tmp_mount [3] = { "swap", "/tmp", "/var/tmp" }
static const string empty_string
static const 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 
)

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

Volume::Volume ( const Container d  ) 

References init(), numeric, orig_size_k, size_k, and y2deb.

Volume::Volume ( const Volume rhs  ) 

References dev, and y2deb.

Volume::~Volume (  )  [virtual]

References dev, and y2deb.


Member Function Documentation

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

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

const string & Volume::mountDevice (  )  const

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

References loop_dev.

Referenced by hasLoopDevice().

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

References dmcrypt_dev.

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]

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

Reimplemented in storage::Partition.

References empty_string.

Referenced by getFstabData().

string Volume::sysfsPath (  )  const [virtual]

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

References SYSFSDIR, and y2mil.

Referenced by getFilesysSysfsPath().

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

References del.

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

References create.

Referenced by storage::Disk::doCreate().

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

References ronly.

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

References silnt.

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

References ignore_fstab.

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

References ignore_fstab.

Referenced by storage::NfsCo::getNfsData().

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

References ignore_fs.

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

References ignore_fs.

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

References fstab_added.

bool storage::Volume::sameDevice ( const string &  device  )  const

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

References fstab_added.

Referenced by fstabAdded().

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

References storage::usedBy::clear(), and uby.

void storage::Volume::setUsedBy ( storage::UsedByType  ub_type,
const string &  ub_name 
) [inline]

References storage::usedBy::set(), and uby.

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

References uby.

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

void Volume::getFsInfo ( const Volume source  ) 

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

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

References detected_fs, format, and fs.

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

void storage::Volume::rename ( const string &  newName  ) 

int storage::Volume::changeFstabOptions ( const string &  options  ) 

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

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

Reimplemented in storage::Partition.

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

References is_loop.

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

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

References is_loop, and loop_active.

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

References dmcrypt(), and dmcrypt_active.

bool Volume::needCrsetup (  )  const

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

References uuid.

Referenced by getFsInfo().

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

References label.

Referenced by storage::Disk::doCreate(), and getFsInfo().

int storage::Volume::setLabel ( const string &  val  ) 

Referenced by storage::Disk::doCreate().

int storage::Volume::eraseLabel (  )  [inline]

References label, and orig_label.

Referenced by detectEncryption(), and setFormat().

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

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

References encryption.

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

int Volume::setEncryption ( bool  val,
storage::EncryptType  typ = storage::ENC_LUKS 
) [virtual]

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

References crypt_pwd.

int storage::Volume::setCryptPwd ( const string &  val  ) 

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

References crypt_pwd.

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

bool storage::Volume::hasOrigMount (  )  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]

References orig_size_k, and size_k.

Referenced by lvResized().

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

References fs.

Referenced by storage::Disk::doResize(), and getFsInfo().

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

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

Reimplemented in storage::LvmLv.

References uuid.

Referenced by getFsInfo().

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

References label, and orig_label.

Referenced by getFsInfo().

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

References mount_by.

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

References fstab_opt.

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

References fstab_opt, and orig_fstab_opt.

Referenced by storage::NfsCo::getNfsData().

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

References mp, and orig_mp.

Referenced by storage::NfsCo::getNfsData().

void Volume::updateFstabOptions (  ) 

bool Volume::needFstabUpdate (  )  const

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

References mkfs_opt.

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

References mkfs_opt.

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

References tunefs_opt.

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

References tunefs_opt.

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

References dtxt.

Referenced by storage::Storage::getCommitInfo().

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

References dtxt.

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

References alt_names.

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]

References mnr.

Referenced by storage::Dm::updateMajorMinor().

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

References mjr.

Referenced by storage::Dm::updateMajorMinor().

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

References numeric.

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

References mjr, and mnr.

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

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

void storage::Volume::setDmcryptDev ( const string &  dm,
bool  active 
)

Reimplemented in storage::Loop.

void storage::Volume::setDmcryptDevEnc ( const string &  dm,
storage::EncryptType  typ,
bool  active 
)

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

Reimplemented in storage::Partition.

References orig_size_k, and size_k.

Referenced by storage::Partition::forgetResize().

bool Volume::canUseDevice (  )  const [virtual]

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

References cont, del, nm, num, and numeric.

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

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

References cont, del, nm, num, and numeric.

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 storage::Volume::umount ( const string &  mp = ""  ) 

int Volume::crUnsetup ( bool  force = false  ) 

References cryptUnsetup(), and loUnsetup().

Referenced by detectEncryption(), and prepareRemove().

int storage::Volume::mount ( const string &  mp = "",
bool  ro = false 
)

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

int Volume::doMount (  ) 

int Volume::doFormat (  ) 

int Volume::doCrsetup (  ) 

int Volume::doSetLabel (  ) 

int Volume::doFstabUpdate (  ) 

References storage::EtcFstab::addEntry(), storage::EtcFstab::addText(), alt_names, cont, crypt_pwd, storage::FstabEntry::crypto, cType(), deleted(), storage::FstabChange::dentry, detected_fs, storage::FstabChange::device, dmcrypt(), storage::ENC_NONE, storage::FstabChange::encr, encryption, storage::SystemCmd::execute(), storage::EtcFstab::findDevice(), storage::EtcFstab::findMount(), storage::EtcFstab::flush(), storage::FstabChange::freq, storage::FstabChange::fs, fs, fs_names, fstab_added, fstab_loop_dev, fstab_opt, storage::FSUNKNOWN, getFreeLoop(), storage::Storage::getFstab(), getFstabDentry(), getFstabDevice(), getFstabOpts(), getLoopFile(), storage::Container::getStorage(), haveQuota(), ignore_fstab, inCryptotab(), storage::Storage::instsys(), is_loop, storage::Storage::isRootMounted(), isTmpCryptMp(), storage::LOOP, storage::FstabChange::loop_dev, mount(), storage::FstabChange::mount, storage::FstabEntry::mount, mount_by, MOUNTBIN, storage::MOUNTBY_LABEL, storage::MOUNTBY_UUID, storage::NFS, storage::NTFS, optNoauto(), storage::FstabChange::opts, orig_encryption, orig_fstab_opt, orig_label, orig_mount_by, orig_mp, storage::FstabChange::passno, storage::Storage::prependRoot(), storage::quote(), storage::EtcFstab::removeEntry(), storage::EtcFstab::removeText(), storage::SystemCmd::retcode(), storage::Storage::showInfoCb(), silent(), storage::SWAP, storage::FstabChange::tmpcrypt, storage::Container::type(), udevId(), umount(), storage::EtcFstab::updateEntry(), storage::EtcFstab::updateText(), storage::VFAT, storage::VOLUME_REMOUNT_FAILED, y2mil, and y2milestone.

Referenced by storage::Container::commitChanges(), doFormat(), doMount(), doSetLabel(), and prepareRemove().

int Volume::resizeFs (  ) 

void Volume::fstabUpdateDone (  ) 

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

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

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

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

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

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

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

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

References storage::_(), label, and storage::sformat().

Referenced by doSetLabel(), and getCommitActions().

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

References storage::_(), and storage::sformat().

Referenced by doLosetup().

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

References storage::_(), and storage::sformat().

Referenced by doCryptsetup().

string Volume::fstabUpdateText (  )  const

string Volume::sizeString (  )  const

string Volume::bootMount (  )  const

bool Volume::optNoauto (  )  const

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

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

References storage::ENC_LUKS, encryption, and optNoauto().

Referenced by mountText().

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

int Volume::getFreeLoop (  ) 

int Volume::getFreeLoop ( SystemCmd loopData  ) 

References getFreeLoop(), loop_dev, and y2mil.

int Volume::getFreeLoop ( SystemCmd loopData,
const std::list< unsigned > &  ids 
)

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

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

void Volume::updateFsData (  ) 

void Volume::triggerUdevUpdate (  )  const

static bool storage::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]

References deleted().

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

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

Referenced by getFreeLoop().

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

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

static storage::MountByType storage::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]

References fs_names.

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

References enc_names.

Referenced by detectEncryption().

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

static bool storage::Volume::isTmpCryptMp ( const string &  mp  )  [static]

void Volume::init (  )  [protected]

void Volume::setNameDev (  )  [protected]

int Volume::checkDevice (  )  [protected]

Referenced by doFormat(), and doMount().

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

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

bool storage::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,
bool  swap_only = false 
) [protected]

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

void Volume::getStartData (  )  [protected]

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

void storage::Volume::replaceAltName ( const string &  prefix,
const string &  newn 
) [protected]

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

Referenced by getFstabDentry().

string Volume::getFstabDevice (  )  [protected]

string Volume::getFstabDentry (  )  [protected]

void storage::Volume::getFstabOpts ( std::list< string > &  ol  )  [protected]

bool storage::Volume::getLoopFile ( string &  fname  )  const [protected]

Referenced by detectEncryption(), and doFstabUpdate().

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

References cont, and storage::Container::setExtError().

Referenced by doFormat(), and resizeFs().

string Volume::getDmcryptName (  )  [protected]

bool Volume::needLosetup (  )  const [protected]

bool Volume::needCryptsetup (  )  const [protected]

int Volume::doLosetup (  )  [protected]

int Volume::doCryptsetup (  )  [protected]

int Volume::loUnsetup ( bool  force = false  )  [protected]

int Volume::cryptUnsetup ( bool  force = false  )  [protected]

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

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

Referenced by doLosetup().

string storage::Volume::getCryptsetupCmd ( storage::EncryptType  e,
const string &  dmdev,
const string &  mp,
const string &  pwdfile,
bool  format,
bool  empty_pwd = false 
) const [protected]

Referenced by detectEncryption(), and doCryptsetup().

EncryptType Volume::detectEncryption (  )  [protected]

string Volume::getFilesysSysfsPath (  )  const [protected]

References is_loop, loop_dev, SYSFSDIR, sysfsPath(), and y2mil.

Referenced by triggerUdevUpdate().


Friends And Related Function Documentation

friend class Storage [friend]

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


Member Data Documentation

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]

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]

string storage::Volume::tunefs_opt [protected]

bool storage::Volume::is_loop [protected]

bool storage::Volume::is_mounted [protected]

bool storage::Volume::ignore_fs [protected]

bool storage::Volume::loop_active [protected]

bool storage::Volume::ronly [protected]

string storage::Volume::loop_dev [protected]

string storage::Volume::dmcrypt_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]

Referenced by storage::Partition::addUdevData(), storage::Partition::changeNumber(), storage::Partition::createText(), storage::LvmLv::createText(), storage::Loop::createText(), storage::Dmraid::createText(), storage::Dmmultipath::createText(), device(), storage::Dm::Dm(), storage::Dmmultipath::Dmmultipath(), storage::DmPart::DmPart(), storage::Dmraid::Dmraid(), equalContent(), storage::Partition::formatText(), storage::LvmLv::formatText(), storage::Loop::formatText(), storage::Dmraid::formatText(), storage::Dmmultipath::formatText(), storage::Dm::getTableInfo(), init(), storage::Nfs::init(), storage::Partition::logData(), logDifference(), storage::LvmLv::LvmLv(), storage::Md::Md(), mountDevice(), storage::operator<<(), operator=(), storage::Partition::Partition(), storage::Partition::removeText(), storage::Nfs::removeText(), storage::LvmLv::removeText(), storage::Loop::removeText(), storage::Dmraid::removeText(), storage::Dmmultipath::removeText(), storage::Partition::resizeText(), storage::LvmLv::resizeText(), storage::Dmraid::resizeText(), storage::Dmmultipath::resizeText(), storage::Loop::setEncryption(), storage::Partition::setFormat(), setNameDev(), storage::Partition::setTypeText(), storage::Dmraid::setTypeText(), storage::DmPart::setTypeText(), storage::Dmmultipath::setTypeText(), storage::Partition::sysfsPath(), storage::DmPart::updateMinor(), storage::DmPart::updateName(), Volume(), storage::Dm::~Dm(), storage::Dmmultipath::~Dmmultipath(), storage::DmPart::~DmPart(), storage::Dmraid::~Dmraid(), storage::Loop::~Loop(), storage::LvmLv::~LvmLv(), storage::Md::~Md(), storage::Nfs::~Nfs(), storage::Partition::~Partition(), and ~Volume().

string storage::Volume::dtxt [protected]

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

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

string Volume::fs_names [static, protected]

Initial value:

 { "unknown", "reiserfs", "ext2", "ext3", "vfat",
                              "xfs", "jfs", "hfs", "ntfs", "swap", "hfsplus",
                              "nfs", "none" }

Referenced by detectEncryption(), doFstabUpdate(), fsTypeString(), getFsData(), logDifference(), logVolume(), storage::operator<<(), setFormat(), and storage::Partition::setFormat().

string Volume::mb_names = { "device", "uuid", "label", "id", "path" } [static, protected]

string Volume::enc_names [static, protected]

Initial value:

 { "none", "twofish256", "twofish",
                               "twofishSL92", "luks", "unknown" }

Referenced by encTypeString(), getFstabData(), logDifference(), logVolume(), and storage::operator<<().

string Volume::tmp_mount = { "swap", "/tmp", "/var/tmp" } [static, protected]

const string Volume::empty_string [static, protected]

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

Referenced by udevId().


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

Generated on Sun Dec 7 21:01:51 2008 for yast2-storage by  doxygen 1.5.6