Instance: add method FindPartition()

This commit is contained in:
Max Kellermann
2017-02-20 12:38:27 +01:00
parent a99bab935a
commit e48ea5f23a
3 changed files with 19 additions and 6 deletions

View File

@@ -106,6 +106,13 @@ struct Instance final
idle_monitor.OrMask(mask);
}
/**
* Find a #Partition with the given name. Returns nullptr if
* no such partition was found.
*/
gcc_pure
Partition *FindPartition(const char *name);
#ifdef ENABLE_DATABASE
/**
* Returns the global #Database instance. May return nullptr