- 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:
parent
e631ed5131
commit
237ced1168
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user