From 553e5a0f6ff50d3136e0223b5be3973345970459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 28 Oct 2003 02:13:12 +0000 Subject: [PATCH] BFS/AmigaFFS directory Open()/Close() methods now correctly call the respective methods of their parent (one possible crash less, as the nodes could get deleted accidently). The AmigaFFS is now silent if it just don't know the signature. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5182 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/loader/file_systems/amiga_ffs/Directory.cpp | 4 ++++ src/kernel/boot/loader/file_systems/amiga_ffs/Directory.h | 2 ++ src/kernel/boot/loader/file_systems/amiga_ffs/Volume.cpp | 2 +- src/kernel/boot/loader/file_systems/bfs/Directory.cpp | 4 ++++ src/kernel/boot/loader/file_systems/bfs/Directory.h | 2 ++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.cpp b/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.cpp index 39e42c2c5d..31ddd1beaf 100644 --- a/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.cpp +++ b/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.cpp @@ -55,6 +55,8 @@ Directory::InitCheck() status_t Directory::Open(void **_cookie, int mode) { + _inherited::Open(_cookie, mode); + HashIterator *iterator = new HashIterator(fVolume.Device(), fNode); if (iterator == NULL) return B_NO_MEMORY; @@ -72,6 +74,8 @@ Directory::Open(void **_cookie, int mode) status_t Directory::Close(void *cookie) { + _inherited::Close(cookie); + delete (HashIterator *)cookie; return B_OK; } diff --git a/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.h b/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.h index 62d61f36de..c3c99ecd34 100644 --- a/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.h +++ b/src/kernel/boot/loader/file_systems/amiga_ffs/Directory.h @@ -39,6 +39,8 @@ class Directory : public ::Directory { private: Volume &fVolume; DirectoryBlock fNode; + + typedef ::Directory _inherited; }; } // namespace FFS diff --git a/src/kernel/boot/loader/file_systems/amiga_ffs/Volume.cpp b/src/kernel/boot/loader/file_systems/amiga_ffs/Volume.cpp index db1b83d521..daa255b9c7 100644 --- a/src/kernel/boot/loader/file_systems/amiga_ffs/Volume.cpp +++ b/src/kernel/boot/loader/file_systems/amiga_ffs/Volume.cpp @@ -44,7 +44,7 @@ Volume::Volume(boot::Partition *partition) return; default: // unsupported file system - printf("amiga_ffs: unsupported: %08lx\n", fType); + //printf("amiga_ffs: unsupported: %08lx\n", fType); return; } diff --git a/src/kernel/boot/loader/file_systems/bfs/Directory.cpp b/src/kernel/boot/loader/file_systems/bfs/Directory.cpp index 402764392b..81037ca2c0 100644 --- a/src/kernel/boot/loader/file_systems/bfs/Directory.cpp +++ b/src/kernel/boot/loader/file_systems/bfs/Directory.cpp @@ -54,6 +54,8 @@ Directory::InitCheck() status_t Directory::Open(void **_cookie, int mode) { + _inherited::Open(_cookie, mode); + *_cookie = (void *)new TreeIterator(&fTree); if (*_cookie == NULL) return B_NO_MEMORY; @@ -65,6 +67,8 @@ Directory::Open(void **_cookie, int mode) status_t Directory::Close(void *cookie) { + _inherited::Close(cookie); + delete (TreeIterator *)cookie; return B_OK; } diff --git a/src/kernel/boot/loader/file_systems/bfs/Directory.h b/src/kernel/boot/loader/file_systems/bfs/Directory.h index 06555bc8ff..0f5ec4f810 100644 --- a/src/kernel/boot/loader/file_systems/bfs/Directory.h +++ b/src/kernel/boot/loader/file_systems/bfs/Directory.h @@ -39,6 +39,8 @@ class Directory : public ::Directory { private: Stream fStream; BPlusTree fTree; + + typedef ::Directory _inherited; }; } // namespace BFS