FreeNOS
|
Mount filesystems on the system. More...
#include <Mount.h>
Public Member Functions | |
Mount (int argc, char **argv) | |
Constructor. More... | |
virtual | ~Mount () |
Destructor. More... | |
virtual Result | exec () |
Execute the application. More... | |
Public Member Functions inherited from POSIXApplication | |
POSIXApplication (int argc, char **argv) | |
Class constructor. More... | |
virtual | ~POSIXApplication () |
Class destructor. More... | |
Public Member Functions inherited from Application | |
Application (int argc, char **argv) | |
Class constructor. More... | |
virtual | ~Application () |
Class destructor. More... | |
virtual int | run () |
Run the application. More... | |
Private Member Functions | |
void | listMounts () const |
Print currently mounted file systems. More... | |
void | waitForMount (const char *path) const |
Blocking wait until the given path is mounted. More... | |
Additional Inherited Members | |
Public Types inherited from Application | |
enum | Result { Success, NotFound, IOError, InvalidArgument, ShowUsage, TimedOut, OutOfMemory } |
Result codes. More... | |
Protected Member Functions inherited from POSIXApplication | |
virtual Result | output (const char *string) const |
Print text to output. More... | |
int | runProgram (const char *path, const char **argv) |
Runs an external program. More... | |
Protected Member Functions inherited from Application | |
virtual Result | initialize () |
Initialize the application. More... | |
virtual Result | output (String &string) const |
Print string to output. More... | |
ArgumentParser & | parser () |
Get program arguments parser. More... | |
const ArgumentParser & | parser () const |
Get constant program arguments parser. More... | |
const ArgumentContainer & | arguments () const |
Get program arguments. More... | |
void | setVersion (const String &version) |
Set program version. More... | |
Protected Attributes inherited from Application | |
int | m_argc |
Input argument count. More... | |
char ** | m_argv |
Input argument values. More... | |
Mount::Mount | ( | int | argc, |
char ** | argv | ||
) |
Constructor.
Definition at line 27 of file Mount.cpp.
References Application::parser(), ArgumentParser::registerFlag(), and ArgumentParser::setDescription().
|
virtual |
Execute the application.
Implements Application.
Definition at line 86 of file Mount.cpp.
References Application::arguments(), ArgumentContainer::get(), listMounts(), Application::Success, waitForMount(), and ZERO.
|
private |
Print currently mounted file systems.
Definition at line 38 of file Mount.cpp.
References assert, MemoryBlock::copy(), ERROR, FileSystemClient::getFileSystems(), NULL, PAGESIZE, printf(), MemoryMap::range(), API::Read, API::Success, MemoryMap::UserArgs, Memory::Range::virt, and VMCopy().
Referenced by exec().
|
private |
Blocking wait until the given path is mounted.
path | Absolute path to a file system mount point |
Definition at line 72 of file Mount.cpp.
References assert, ERROR, exit(), FileSystem::Success, and FileSystemClient::waitFileSystem().
Referenced by exec().