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
This commit is contained in:
Axel Dörfler
2003-10-28 02:13:12 +00:00
parent a03a04e027
commit 553e5a0f6f
5 changed files with 13 additions and 1 deletions
@@ -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;
}
@@ -39,6 +39,8 @@ class Directory : public ::Directory {
private:
Volume &fVolume;
DirectoryBlock fNode;
typedef ::Directory _inherited;
};
} // namespace FFS
@@ -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;
}
@@ -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;
}
@@ -39,6 +39,8 @@ class Directory : public ::Directory {
private:
Stream fStream;
BPlusTree fTree;
typedef ::Directory _inherited;
};
} // namespace BFS