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:
parent
4606537811
commit
e4b4a99228
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user