VFS: be more verbose
This commit is contained in:
parent
b38c52f8c7
commit
8158ddc94f
@ -19,5 +19,8 @@ namespace VFS
|
||||
|
||||
int32_t read(Node* node, uint32_t offset, uint32_t length, char* buffer);
|
||||
Node* open(const char* filename);
|
||||
|
||||
void mount_root(Node* root);
|
||||
|
||||
Node* root();
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "fs/VFS.h"
|
||||
#include "log/Log.h"
|
||||
#include "std/string.h"
|
||||
|
||||
static VFS::Node* vfs_root;
|
||||
|
||||
@ -18,6 +19,9 @@ int32_t VFS::read(Node* node, uint32_t offset, uint32_t length, char* buffer)
|
||||
return -1;
|
||||
}
|
||||
|
||||
kdbgln("read(): node %s (inode %ld), offset %d, %d bytes, into %p", node->name, node->inode, offset, length,
|
||||
(void*)buffer);
|
||||
|
||||
return node->read_func(node, offset, length, buffer);
|
||||
}
|
||||
|
||||
@ -34,6 +38,8 @@ VFS::Node* VFS::open(const char* filename)
|
||||
return 0;
|
||||
}
|
||||
|
||||
kinfoln("open(): opening %s", filename);
|
||||
|
||||
return vfs_root->find_func(vfs_root, filename);
|
||||
}
|
||||
|
||||
@ -52,3 +58,8 @@ void VFS::mount_root(Node* root)
|
||||
kinfoln("mounting node '%s' as vfs root", root->name);
|
||||
vfs_root = root;
|
||||
}
|
||||
|
||||
VFS::Node* VFS::root()
|
||||
{
|
||||
return vfs_root;
|
||||
}
|
Loading…
Reference in New Issue
Block a user