libzypp
13.10.6
|
Interface to the mount program. More...
#include <Mount.h>
Public Types | |
typedef ExternalProgram::Environment | Environment |
For passing additional environment variables to mount. More... | |
typedef KVMap < kvmap::KVMapBase::CharSep<'=',','> > | Options |
Mount options. More... | |
Public Member Functions | |
Mount () | |
Create an new instance. More... | |
~Mount () | |
Clean up. More... | |
void | mount (const std::string &source, const std::string &target, const std::string &filesystem, const std::string &options, const Environment &environment=Environment()) |
mount device More... | |
void | umount (const std::string &path) |
umount device More... | |
Static Public Member Functions | |
static MountEntries | getEntries (const std::string &mtab="") |
Return mount entries from /etc/mtab or /etc/fstab file. More... | |
Private Member Functions | |
void | run (const char *const *argv, const Environment &environment, ExternalProgram::Stderr_Disposition stderr_disp=ExternalProgram::Stderr_To_Stdout) |
Run mount with the specified arguments and handle stderr. More... | |
void | run (const char *const *argv, ExternalProgram::Stderr_Disposition stderr_disp=ExternalProgram::Stderr_To_Stdout) |
int | Status () |
Return the exit status of the process, closing the connection if not already done. More... | |
void | Kill () |
Forcably kill the process. More... | |
Private Attributes | |
ExternalProgram * | process |
The connection to the mount process. More... | |
int | exit_code |
The exit code of the process, or -1 if not yet known. More... | |
typedef KVMap<kvmap::KVMapBase::CharSep<'=',','> > zypp::media::Mount::Options |
void zypp::media::Mount::mount | ( | const std::string & | source, |
const std::string & | target, | ||
const std::string & | filesystem, | ||
const std::string & | options, | ||
const Environment & | environment = Environment() |
||
) |
mount device
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") |
MediaException |
void zypp::media::Mount::umount | ( | const std::string & | path | ) |
|
static |
Return mount entries from /etc/mtab or /etc/fstab file.
mtab | The name of the (mounted) file system description file to read from. This file should be one /etc/mtab, /etc/fstab or /proc/mounts. Default is to read /proc/mounts and /etc/mtab in case is not a symlink to /proc/mounts. |
|
private |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |