Lines Matching refs:pf
9 int sepol_policy_file_create(sepol_policy_file_t ** pf) in sepol_policy_file_create() argument
11 *pf = calloc(1, sizeof(sepol_policy_file_t)); in sepol_policy_file_create()
12 if (!(*pf)) in sepol_policy_file_create()
20 struct policy_file *pf = &spf->pf; in sepol_policy_file_set_mem() local
22 pf->type = PF_LEN; in sepol_policy_file_set_mem()
25 pf->type = PF_USE_MEMORY; in sepol_policy_file_set_mem()
26 pf->data = data; in sepol_policy_file_set_mem()
27 pf->len = len; in sepol_policy_file_set_mem()
28 pf->size = len; in sepol_policy_file_set_mem()
34 struct policy_file *pf = &spf->pf; in sepol_policy_file_set_fp() local
35 pf->type = PF_USE_STDIO; in sepol_policy_file_set_fp()
36 pf->fp = fp; in sepol_policy_file_set_fp()
42 struct policy_file *pf = &spf->pf; in sepol_policy_file_get_len() local
43 if (pf->type != PF_LEN) in sepol_policy_file_get_len()
45 *len = pf->len; in sepol_policy_file_get_len()
49 void sepol_policy_file_set_handle(sepol_policy_file_t * pf, in sepol_policy_file_set_handle() argument
52 pf->pf.handle = handle; in sepol_policy_file_set_handle()
55 void sepol_policy_file_free(sepol_policy_file_t * pf) in sepol_policy_file_free() argument
57 free(pf); in sepol_policy_file_free()
155 int sepol_policydb_read(sepol_policydb_t * p, sepol_policy_file_t * pf) in sepol_policydb_read() argument
157 return policydb_read(&p->p, &pf->pf, 0); in sepol_policydb_read()
160 int sepol_policydb_write(sepol_policydb_t * p, sepol_policy_file_t * pf) in sepol_policydb_write() argument
162 return policydb_write(&p->p, &pf->pf); in sepol_policydb_write()