36 lines
618 B
C++
36 lines
618 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, 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());
|
|
}
|
|
}
|
|
|