- Remembered that -1 means uninitialized device, not 0...

- Added call to close device on destruction


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5682 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder 2003-12-17 10:04:05 +00:00
parent e631ed5131
commit 237ced1168

View File

@ -19,7 +19,7 @@ using namespace Udf;
*/
Volume::Volume(nspace_id id)
: fId(id)
, fDevice(0)
, fDevice(-1)
, fMounted(false)
, fOffset(0)
, fLength(0)
@ -300,7 +300,9 @@ Volume::_Unset()
{
DEBUG_INIT("Volume");
fId = 0;
fDevice = 0;
if (fDevice >= 0)
close(fDevice);
fDevice = -1;
fMounted = false;
fOffset = 0;
fLength = 0;