Go to the documentation of this file.
18 #include <FreeNOS/System.h>
31 parser().
registerFlag(
'w',
"wait",
"Blocking wait until given filesystem path is mounted");
45 Size numberOfMounts = 0;
52 printf(
"PATH FILESYSTEM\r\n");
55 for (
Size i = 0; i < numberOfMounts; i++)
57 if (mounts[i].path[0])
63 ERROR(
"VMCopy failed for PID " << mounts[i].procID <<
": result = " << (
int) result);
67 printf(
"%20s %s\r\n", mounts[i].path, cmd);
79 ERROR(
"failed to wait for filesystem at " << path <<
": result = " << (
int) result);
const char * get(const char *name) const
Get argument by name.
static Size copy(void *dest, const void *src, Size count)
Copy memory from one place to another.
Result
Enumeration of generic kernel API result codes.
Represents a mounted filesystem.
FileSystemClient provides a simple interface to a FileSystemServer.
#define PAGESIZE
ARM uses 4K pages.
FileSystem::Result waitFileSystem(const char *path) const
Blocking wait for a mounted filesystem.
POSIX-compatible application.
unsigned long Address
A memory address.
const ArgumentContainer & arguments() const
Get program arguments.
void setDescription(const String &desc)
Set program description.
void listMounts() const
Print currently mounted file systems.
Memory mapping for the kernel and user processes on the ARM architecture.
virtual ~Mount()
Destructor.
int printf(const char *format,...)
Output a formatted string to standard output.
Memory::Range range(Region region) const
Get memory range for the given region.
#define NULL
NULL means zero.
unsigned int Size
Any sane size indicator cannot go negative.
virtual Result exec()
Execute the application.
Result registerFlag(char arg, const char *name, const char *description)
Register a flag Argument.
FileSystemMount * getFileSystems(Size &numberOfMounts) const
Get file system mounts table.
ArgumentParser & parser()
Get program arguments parser.
#define assert(exp)
Insert program diagnostics.
#define ERROR(msg)
Output an error message.
Result
Result code for filesystem Actions.
void waitForMount(const char *path) const
Blocking wait until the given path is mounted.
Address virt
Virtual address.
@ UserArgs
< Used for copying program arguments and file descriptors
API::Result VMCopy(const ProcessID proc, const API::Operation how, const Address ours, const Address theirs, const Size sz)
Prototype for user applications.
C void exit(int status)
Terminate a process.
Mount(int argc, char **argv)
Constructor.