22 #include "RawFsFile.h" 23 #include "modules/Module.h" 24 #include "modules/system/vfs/VFS.h" 25 #include "pedigree/kernel/Log.h" 26 #include "pedigree/kernel/machine/Device.h" 27 #include "pedigree/kernel/processor/types.h" 28 #include "pedigree/kernel/utilities/new" 33 static RawFs *g_pRawFs = 0;
35 RawFsDir::~RawFsDir() =
default;
37 RawFs::RawFs() : m_pRoot(0)
53 static bool hasDiskChildren(
Device *pDev)
60 if (hasDiskChildren(pChild))
75 if (hasDiskChildren(pChild))
77 NOTICE(
"rawfs: adding dir '" << str <<
"'");
79 new RawFsDir(str, g_pRawFs, static_cast<File *>(pDir));
82 String(
"entire-disk"), g_pRawFs, static_cast<File *>(pDir),
83 reinterpret_cast<Disk *>(pChild)));
84 searchNode(pChild, pDir2);
88 NOTICE(
"rawfs: adding file '" << str <<
"'");
90 str, g_pRawFs, static_cast<File *>(pDir),
91 reinterpret_cast<Disk *>(pChild)));
95 searchNode(pChild, pDir);
99 static void rescanTree()
111 g_pRawFs =
new RawFs();
120 static void destroy()
124 MODULE_INFO(
"rawfs", &init, &destroy,
"vfs");
Device * getChild(size_t n)
virtual void getName(String &str)
void addAlias(Filesystem *pFs, const String &alias)
A disk device - a block device in UNIX terms.
void addMountCallback(MountCallback callback)
virtual File * getRoot() const
void addEntry(File *pEntry)