// vfs.cpp // Virtual file system subsystem for HOS // Author: Josh Holtrop // Date: 05/10/05 // Modified: 05/10/05 #define _HOS_CPP_ _HOS_CPP_ extern "C" { #include "hos_defines.h" #include "display/kout.h" } #include "vfs.h" #include "lang/vector.h" #include "lang/string.h" #include "devices.h" inode_num_t rootInode; vector *mountPoints; int vfs_init() { mountPoints = new vector; return 0; } int vfs_mount(device_t device, int fsType, char *mountPoint) { string mountPt(mountPoint); if (mountPt == "/") { } return 0; } VFSMount::VFSMount(device_t dev, FileSystem *fs, string mountPoint, inode_num_t mountInode) { myDev = dev; myFS = fs; myRefs = 0; myMountPoint = mountPoint; myMountInode = mountInode; } VFSMount::~VFSMount() { if (myFS) delete myFS; if (myRefs) kprintf("Filesystem uncleanly mounted from %s\n", myMountPoint.data()); }