Lines Matching refs:pf
14 policy_file_t pf; in policydb_from_image() local
16 policy_file_init(&pf); in policydb_from_image()
17 pf.type = PF_USE_MEMORY; in policydb_from_image()
18 pf.data = data; in policydb_from_image()
19 pf.len = len; in policydb_from_image()
20 pf.handle = handle; in policydb_from_image()
22 if (policydb_read(policydb, &pf, 0)) { in policydb_from_image()
40 policy_file_t pf; in policydb_to_image() local
44 policy_file_init(&pf); in policydb_to_image()
45 pf.type = PF_LEN; in policydb_to_image()
46 pf.handle = handle; in policydb_to_image()
47 if (policydb_write(policydb, &pf)) { in policydb_to_image()
54 pf.type = PF_USE_MEMORY; in policydb_to_image()
55 pf.data = malloc(pf.len); in policydb_to_image()
56 if (!pf.data) { in policydb_to_image()
62 tmp_len = pf.len; in policydb_to_image()
63 tmp_data = pf.data; in policydb_to_image()
66 if (policydb_write(policydb, &pf)) { in policydb_to_image()
73 pf.type = PF_USE_MEMORY; in policydb_to_image()
74 pf.data = tmp_data; in policydb_to_image()
75 pf.len = tmp_len; in policydb_to_image()
81 if (policydb_read(&tmp_policydb, &pf, 0)) { in policydb_to_image()