Merge pull request #328 from edk0/capability-put-ownerdata
capability: accept new ownerdata for existing caps
This commit is contained in:
commit
54a7996604
1 changed files with 5 additions and 0 deletions
|
@ -67,6 +67,11 @@ capability_put(struct CapabilityIndex *idx, const char *cap, void *ownerdata)
|
|||
if ((entry = rb_dictionary_retrieve(idx->cap_dict, cap)) != NULL)
|
||||
{
|
||||
entry->flags &= ~CAP_ORPHANED;
|
||||
if (ownerdata != NULL)
|
||||
{
|
||||
s_assert(entry->ownerdata == NULL);
|
||||
entry->ownerdata = ownerdata;
|
||||
}
|
||||
return (1 << entry->value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue