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:
Ingo Weinhold 2009-07-07 13:10:52 +00:00
parent 16d5c24e53
commit 34bc7f03ed
1 changed files with 6 additions and 2 deletions

View File

@ -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;
@ -896,7 +900,7 @@ KPartition::VisitEachDescendant(KPartitionVisitor *visitor)
}
if (visitor->VisitPost(this))
return this;
return NULL;
return NULL;
}