40 lines
723 B
C++
40 lines
723 B
C++
// VFSMount.cpp
|
|
// Virtual file system subsystem for HOS
|
|
// Author: Josh Holtrop
|
|
// Date: 06/21/05
|
|
// Modified: 06/21/05
|
|
|
|
extern "C" {
|
|
#include "display/kout.h"
|
|
}
|
|
|
|
#include "VFSMount.h"
|
|
#include "hos_defines.h"
|
|
#include "devices.h"
|
|
#include "lang/string.h"
|
|
#include "fs/vfs.h"
|
|
|
|
VFSMount::VFSMount(device_t dev, string fsType, FileSystem *fs,
|
|
string mountPoint,
|
|
inode_num_t mountInode, inode_num_t thisInode)
|
|
{
|
|
myDev = dev;
|
|
myFSType = fsType;
|
|
myFS = fs;
|
|
myMountPoint = mountPoint;
|
|
myMountInode = mountInode;
|
|
myThisInode = thisInode;
|
|
}
|
|
|
|
VFSMount::~VFSMount()
|
|
{
|
|
if (umount_safe())
|
|
kprintf("Filesystem uncleanly mounted from %s\n", myMountPoint.data());
|
|
delete myFS;
|
|
}
|
|
|
|
int VFSMount::umount_safe()
|
|
{
|
|
return 0;
|
|
}
|