diff options
| author | Miguel <m.i@gmx.at> | 2018-09-28 00:29:02 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-28 00:29:02 +0200 |
| commit | 9a29d452d03a63f39a80c0640b7747d8508568e2 (patch) | |
| tree | 05adc15fac805f019af21107a7e3d84135f483f9 /fs/mount.h | |
| parent | b3ec24b054fe36c7368048c3f1d0c46ed8fbb55e (diff) | |
moved mouse and kb, fixed mouse a bit
Diffstat (limited to 'fs/mount.h')
| -rw-r--r-- | fs/mount.h | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -1,30 +1,34 @@ /** * @file + * * Simple mount point manager * ========================== * - * Add up to MAX_MOUNTS (as defined in kernel.h) mounts and use - * mount_file_open() and mount_read_dir() to transparently - * be dispatch the underlying commands to them based on the supplied paths. + * Add up to MAX_MOUNTS (as defined in kernel.h) mountpoints and use the + * provided functions to transparently dispatch them to the undelying + * infrastructure provided via the mount_struct structures + * + * unt_file_open() and mount_read_dir() * - * Mount directories should exist on root direcotry '/' + * The mount directories itself should exist inside the + * root direcotry '/'. */ #ifndef MOUNT_H #define MOUNT_H #include <stdint.h> -#include "interface/fs.h" // fs_dirent for read_dir -#include "fd.h" // file descriptor returned by open + +#include "interface/fs.h" // provides fs_dirent structure for read_dir() +#include "fd.h" // file descriptor returned by open /** the possible values for mount_struct.type */ enum MOUNT_TYPE{ MOUNT_TYPE_EXT2 = 1, - MOUNT_TYPE_PIPES = 2, - MOUNT_TYPE_SYS = 3 + MOUNT_TYPE_SYS = 3 }; -/** struct telling all we need about a single mountpoint */ +/** struct providing all the required info, about a single mountpoint */ typedef struct mount_struct { uint32_t type; // MOUNT_TYPE @@ -34,13 +38,10 @@ typedef struct mount_struct fd (*mount_file_open)(struct mount_struct*, char *path); int (*mount_read_dir) (struct mount_struct*, char *path, fs_dirent *dirs, uint32_t *pos); - void *data; //opaque data + void *data; // pointer to some opaque private data }mount; -/** dumps mount info to klog */ -void mount_dump(); - /** adds a new mountpoints */ void mount_add(mount mnt); @@ -50,7 +51,7 @@ fd mount_file_open(char *path); /** TODO: should use fd number instead of PATH on each call*/ int mount_read_dir (char *path, fs_dirent *dirs, uint32_t *pos); -/** sysfs interface */ +/** sysfs interface / exposing status via /sysfs/ file */ void mount_sysfs(ringbuffer *r, void (*f)(ringbuffer *r,char *fmt, ...)); #endif |
