From db88a56aa876aa4ee408e78f5064b3605c42bb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 3 Feb 2004 02:14:51 +0000 Subject: [PATCH] Now calls the new fs_shell only call kill_device_vnodes() in Volume::Initialize() to be able to remove the cache correctly (without issuing any warnings). The Volume::Initialize() method is now only defined in USER mode (of course, this will change in OpenBeOS). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6481 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Volume.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index d3db7f637f..10332aae4b 100644 --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp @@ -531,6 +531,10 @@ Volume::RemoveQuery(Query *query) // Disk initialization +#ifdef USER +extern "C" void kill_device_vnodes(dev_t id); + // This call is only available in the userland fs_shell + status_t Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint32 flags) { @@ -626,12 +630,11 @@ Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint3 if (fIndicesNode != NULL) put_vnode(ID(), fIndicesNode->ID()); - delete fIndicesNode; - delete fRootNode; - // ToDo: this is a temporary hack until new_vnode()/put_vnode() is working - // correctly in the mkbfs command + kill_device_vnodes(ID()); + // This call is only available in the userland fs_shell Sync(); opener.RemoveCache(ALLOW_WRITES); return B_OK; } +#endif