Go to the documentation of this file.
18 #include <FreeNOS/User.h>
27 int forkexec(
const char *path,
const char *argv[])
33 if (
stat(path, &st) != 0)
off_t st_size
For regular files, the file size in bytes.
The <sys/stat.h> header shall define the stat structure.
C int errno
The lvalue errno is used by many functions to return error values.
u64 getUncompressedSize() const
Get size of the uncompressed data.
Result initialize()
Initialize the decompressor.
API::Result VMCtl(const ProcessID procID, const MemoryOperation op, Memory::Range *range=ZERO)
Prototype for user applications.
int open(const char *path, int oflag,...)
Open file relative to directory file descriptor.
ssize_t read(int fildes, void *buf, size_t nbyte)
Read from a file.
Address phys
Physical address.
int close(int fildes)
Close a file descriptor.
int forkexec(const char *path, const char *argv[])
Create a new process and execute program.
#define EFAULT
Bad address.
int stat(const char *path, struct stat *buf)
Get file status.
Result read(void *buffer, const Size size) const
Reads compressed data.
Decompress data using the LZ4 algorithm created by Yann Collet.
int spawn(Address program, Size programSize, const char *argv[])
Create a new process using in-memory image.
Address virt
Virtual address.
Size size
Size in number of bytes.
Access access
Page access flags.
#define O_RDONLY
Open for reading only.