Patch by Bryce Groff:
* SetBusy(): Use AddFlags() instead of SetFlags() so that the other flags aren't cleared. * AddChild(): Publish the newly added child partition. Otherwise no-one can do anything with it without rebooting first. Other children may need to be republished under a new name, if their index changes, which doesn't happen yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31444 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
16d5c24e53
commit
34bc7f03ed
@ -243,7 +243,7 @@ void
|
||||
KPartition::SetBusy(bool busy)
|
||||
{
|
||||
if (busy)
|
||||
SetFlags(B_PARTITION_BUSY);
|
||||
AddFlags(B_PARTITION_BUSY);
|
||||
else
|
||||
ClearFlags(B_PARTITION_BUSY);
|
||||
}
|
||||
@ -771,6 +771,10 @@ KPartition::AddChild(KPartition *partition, int32 index)
|
||||
fPartitionData.child_count++;
|
||||
partition->SetParent(this);
|
||||
partition->SetDevice(Device());
|
||||
// publish to devfs
|
||||
error = PublishDevice();
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
// notify listeners
|
||||
FireChildAdded(partition, index);
|
||||
return B_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user