Main Page | Namespace List | Class Hierarchy | Class List | 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

Public Member Functions

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

Private Member Functions

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 MediaError Mount::Error
 

default error class


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
 

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)

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

Run mount with the specified arguments and handle stderr.

Parameters:
n_opts The number of arguments
options Array of the arguments, n_opts elements
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 Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6