Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Mount Class Reference

Interface to the mount program. More...

#include <Mount.h>

List of all members.

Public Types

typedef MediaError Error
typedef ExternalProgram::Environment Environment
typedef KVMap< _KVMap::CharSep<'=',','> > Options

Public Member Functions

 Mount ()
 ~Mount ()
PMError mount (const std::string &source, const std::string &target, const std::string &filesystem, const std::string &options, const Environment &environment=Environment())
PMError umount (const std::string &path)

Private Member Functions

void run (const char *const *argv, const Environment &environment, ExternalProgram::Stderr_Disposition stderr_disp=ExternalProgram::Stderr_To_Stdout)
void run (const char *const *argv, ExternalProgram::Stderr_Disposition stderr_disp=ExternalProgram::Stderr_To_Stdout)
int Status ()
void Kill ()

Private Attributes

ExternalProgramprocess
int exit_code


Detailed Description

Interface to the mount program.


Member Typedef Documentation

typedef ExternalProgram::Environment Mount::Environment
 

For passing additional environment variables to mount

typedef MediaError Mount::Error
 

default error class

typedef KVMap<_KVMap::CharSep<'=',','> > Mount::Options
 

Mount options. 'key' or 'key=value' pairs, separated by ','


Constructor & Destructor Documentation

Mount::Mount  ) 
 

Create an new instance.

Mount::~Mount  ) 
 

Clean up.


Member Function Documentation

void Mount::Kill  )  [private]
 

Forcably kill the process

PMError Mount::mount const std::string &  source,
const std::string &  target,
const std::string &  filesystem,
const std::string &  options,
const Environment environment = Environment()
 

mount device

Parameters:
source what to mount (e.g. /dev/hda3)
target where to mount (e.g. /mnt)
filesystem which filesystem to use (e.g. reiserfs) (-t parameter)
options mount options (e.g. ro) (-o parameter)
environment optinal environment to pass (e.g. PASSWD="sennah")

void Mount::run const char *const *  argv,
ExternalProgram::Stderr_Disposition  stderr_disp = ExternalProgram::Stderr_To_Stdout
[inline, private]
 

void Mount::run const char *const *  argv,
const Environment environment,
ExternalProgram::Stderr_Disposition  stderr_disp = ExternalProgram::Stderr_To_Stdout
[private]
 

Run mount with the specified arguments and handle stderr.

Parameters:
argv Mount arguments
environment Addittional environment to set
stderr_disp How to handle stderr, merged with stdout by default

int Mount::Status  )  [private]
 

Return the exit status of the process, closing the connection if not already done.

PMError Mount::umount const std::string &  path  ) 
 

umount device

Parameters:
path device or mountpoint to umount


Member Data Documentation

int Mount::exit_code [private]
 

The exit code of the process, or -1 if not yet known.

ExternalProgram* Mount::process [private]
 

The connection to the mount process.


The documentation for this class was generated from the following files:
Generated on Mon Sep 12 21:52:14 2005 for yast2-packagemanager by  doxygen 1.4.4