* Fixed a potential crash (partition may be NULL). This fixes CID 1544.
* Added missing authors. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38462 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007-2010, Haiku, Inc. All rights reserved.
|
* Copyright 2007-2010, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Stephan Aßmus, [email protected]
|
||||||
|
* Axel Dörfler, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -409,8 +413,8 @@ suggest_mount_flags(const BPartition* partition, uint32* _flags)
|
|||||||
"unintentional data loss because of errors in Haiku.");
|
"unintentional data loss because of errors in Haiku.");
|
||||||
}
|
}
|
||||||
|
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Mount warning"),
|
BAlert* alert = new BAlert(B_TRANSLATE("Mount warning"),
|
||||||
string.String(), B_TRANSLATE("Mount read/write"),
|
string.String(), B_TRANSLATE("Mount read/write"),
|
||||||
B_TRANSLATE("Cancel"), B_TRANSLATE("Mount read-only"),
|
B_TRANSLATE("Cancel"), B_TRANSLATE("Mount read-only"),
|
||||||
B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
|
B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
|
||||||
alert->SetShortcut(1, B_ESCAPE);
|
alert->SetShortcut(1, B_ESCAPE);
|
||||||
@@ -621,7 +625,7 @@ AutoMounter::_UnmountAndEjectVolume(BPartition* partition, BPath& mountPoint,
|
|||||||
else
|
else
|
||||||
status = fs_unmount_volume(mountPoint.Path(), 0);
|
status = fs_unmount_volume(mountPoint.Path(), 0);
|
||||||
|
|
||||||
if (status < B_OK) {
|
if (status != B_OK) {
|
||||||
if (!_SuggestForceUnmount(name, status))
|
if (!_SuggestForceUnmount(name, status))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -631,8 +635,8 @@ AutoMounter::_UnmountAndEjectVolume(BPartition* partition, BPath& mountPoint,
|
|||||||
status = fs_unmount_volume(mountPoint.Path(), B_FORCE_UNMOUNT);
|
status = fs_unmount_volume(mountPoint.Path(), B_FORCE_UNMOUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < B_OK) {
|
if (status != B_OK) {
|
||||||
_ReportUnmountError(partition->ContentName(), status);
|
_ReportUnmountError(name, status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user