Lines Matching defs:handle
6 #include "handle.h"
14 static int ibendport_from_record(sepol_handle_t *handle,
28 if (sepol_ibendport_alloc_ibdev_name(handle,
32 if (sepol_ibendport_get_ibdev_name(handle,
45 if (context_from_record(handle, policydb, &tmp_con,
57 ERR(handle, "out of memory");
67 ERR(handle, "could not create ibendport structure");
71 static int ibendport_to_record(sepol_handle_t *handle,
82 if (sepol_ibendport_create(handle, &tmp_record) < 0)
85 if (sepol_ibendport_set_ibdev_name(handle, tmp_record,
91 if (context_to_record(handle, policydb, con, &tmp_con) < 0)
94 if (sepol_ibendport_set_con(handle, tmp_record, tmp_con) < 0)
102 ERR(handle, "could not convert ibendport to record");
109 extern int sepol_ibendport_count(sepol_handle_t *handle __attribute__ ((unused)),
126 int sepol_ibendport_exists(sepol_handle_t *handle __attribute__ ((unused)),
153 int sepol_ibendport_query(sepol_handle_t *handle,
172 if (ibendport_to_record(handle, policydb, c, response) < 0)
182 ERR(handle, "could not query ibendport, IB device: %s port %u",
188 int sepol_ibendport_modify(sepol_handle_t *handle,
200 if (ibendport_from_record(handle, policydb, &ibendport, data) < 0)
210 ERR(handle, "could not load ibendport %s/%d",
219 int sepol_ibendport_iterate(sepol_handle_t *handle,
232 if (ibendport_to_record(handle, policydb, c, &ibendport) < 0)
251 ERR(handle, "could not iterate over ibendports");