Changeset View
Changeset View
Standalone View
Standalone View
lib/libcasper/libcasper/libcasper.c
Show First 20 Lines • Show All 329 Lines • ▼ Show 20 Lines | cap_service_limit(const cap_channel_t *chan, const char * const *names, | ||||
nvlist_t *limits; | nvlist_t *limits; | ||||
unsigned int i; | unsigned int i; | ||||
limits = nvlist_create(0); | limits = nvlist_create(0); | ||||
for (i = 0; i < nnames; i++) | for (i = 0; i < nnames; i++) | ||||
nvlist_add_null(limits, names[i]); | nvlist_add_null(limits, names[i]); | ||||
return (cap_limit_set(chan, limits)); | return (cap_limit_set(chan, limits)); | ||||
} | } | ||||
bool | |||||
cap_enable(const cap_channel_t *chan) | |||||
{ | |||||
if (chan != NULL) { | |||||
assert(chan->cch_magic == CAP_CHANNEL_MAGIC); | |||||
return (true); | |||||
} | |||||
return (false); | |||||
} | |||||