Update the BDiskDevice object after mounting/unmounting a partition.

Untested, but should fix bug #92.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16012 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2006-01-20 14:49:16 +00:00
parent 4606537811
commit e4b4a99228
1 changed files with 11 additions and 1 deletions

View File

@ -516,6 +516,10 @@ BPartition::Mount(const char *mountPoint, uint32 mountFlags,
if (device < B_OK && deleteMountPoint)
rmdir(mountPoint);
// update object, if successful
if (device >= 0)
error = Device()->Update();
return device;
}
@ -543,7 +547,13 @@ BPartition::Unmount(uint32 unmountFlags)
return error;
// unmount
return fs_unmount_volume(partitionPath.Path(), unmountFlags);
error = fs_unmount_volume(partitionPath.Path(), unmountFlags);
// update object, if successful
if (error == B_OK)
error = Device()->Update();
return error;
}
// Device