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:
parent
a03a04e027
commit
553e5a0f6f
@ -55,6 +55,8 @@ Directory::InitCheck()
|
|||||||
status_t
|
status_t
|
||||||
Directory::Open(void **_cookie, int mode)
|
Directory::Open(void **_cookie, int mode)
|
||||||
{
|
{
|
||||||
|
_inherited::Open(_cookie, mode);
|
||||||
|
|
||||||
HashIterator *iterator = new HashIterator(fVolume.Device(), fNode);
|
HashIterator *iterator = new HashIterator(fVolume.Device(), fNode);
|
||||||
if (iterator == NULL)
|
if (iterator == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
@ -72,6 +74,8 @@ Directory::Open(void **_cookie, int mode)
|
|||||||
status_t
|
status_t
|
||||||
Directory::Close(void *cookie)
|
Directory::Close(void *cookie)
|
||||||
{
|
{
|
||||||
|
_inherited::Close(cookie);
|
||||||
|
|
||||||
delete (HashIterator *)cookie;
|
delete (HashIterator *)cookie;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,8 @@ class Directory : public ::Directory {
|
|||||||
private:
|
private:
|
||||||
Volume &fVolume;
|
Volume &fVolume;
|
||||||
DirectoryBlock fNode;
|
DirectoryBlock fNode;
|
||||||
|
|
||||||
|
typedef ::Directory _inherited;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace FFS
|
} // namespace FFS
|
||||||
|
@ -44,7 +44,7 @@ Volume::Volume(boot::Partition *partition)
|
|||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
// unsupported file system
|
// unsupported file system
|
||||||
printf("amiga_ffs: unsupported: %08lx\n", fType);
|
//printf("amiga_ffs: unsupported: %08lx\n", fType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ Directory::InitCheck()
|
|||||||
status_t
|
status_t
|
||||||
Directory::Open(void **_cookie, int mode)
|
Directory::Open(void **_cookie, int mode)
|
||||||
{
|
{
|
||||||
|
_inherited::Open(_cookie, mode);
|
||||||
|
|
||||||
*_cookie = (void *)new TreeIterator(&fTree);
|
*_cookie = (void *)new TreeIterator(&fTree);
|
||||||
if (*_cookie == NULL)
|
if (*_cookie == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
@ -65,6 +67,8 @@ Directory::Open(void **_cookie, int mode)
|
|||||||
status_t
|
status_t
|
||||||
Directory::Close(void *cookie)
|
Directory::Close(void *cookie)
|
||||||
{
|
{
|
||||||
|
_inherited::Close(cookie);
|
||||||
|
|
||||||
delete (TreeIterator *)cookie;
|
delete (TreeIterator *)cookie;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,8 @@ class Directory : public ::Directory {
|
|||||||
private:
|
private:
|
||||||
Stream fStream;
|
Stream fStream;
|
||||||
BPlusTree fTree;
|
BPlusTree fTree;
|
||||||
|
|
||||||
|
typedef ::Directory _inherited;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace BFS
|
} // namespace BFS
|
||||||
|
Loading…
Reference in New Issue
Block a user