Lines Matching full:items
67 size_t items; in ebitmap_write() local
77 items = put_entry(buf, sizeof(uint32_t), 3, fp); in ebitmap_write()
78 if (items != 3) in ebitmap_write()
83 items = put_entry(&bit, sizeof(uint32_t), 1, fp); in ebitmap_write()
84 if (items != 1) in ebitmap_write()
87 items = put_entry(&map, sizeof(uint64_t), 1, fp); in ebitmap_write()
88 if (items != 1) in ebitmap_write()
114 size_t items, items2; in avtab_write_item() local
128 items = 1; /* item 0 is used for the item count */ in avtab_write_item()
130 buf32[items++] = cpu_to_le32(val); in avtab_write_item()
132 buf32[items++] = cpu_to_le32(val); in avtab_write_item()
134 buf32[items++] = cpu_to_le32(val); in avtab_write_item()
170 buf32[items++] = cpu_to_le32(val); in avtab_write_item()
194 buf32[items++] = in avtab_write_item()
201 buf32[items++] = cpu_to_le32(cur->datum.data); in avtab_write_item()
211 buf32[0] = cpu_to_le32(items - 1); in avtab_write_item()
215 items2 = put_entry(buf32, sizeof(uint32_t), items, fp); in avtab_write_item()
216 if (items != items2) in avtab_write_item()
228 items = put_entry(buf16, sizeof(uint16_t), 4, fp); in avtab_write_item()
229 if (items != 4) in avtab_write_item()
248 items = put_entry(&buf8, sizeof(uint8_t),1,fp); in avtab_write_item()
249 if (items != 1) in avtab_write_item()
252 items = put_entry(&buf8, sizeof(uint8_t),1,fp); in avtab_write_item()
253 if (items != 1) in avtab_write_item()
257 items = put_entry(buf32, sizeof(uint32_t),8,fp); in avtab_write_item()
258 if (items != 8) in avtab_write_item()
262 items = put_entry(buf32, sizeof(uint32_t), 1, fp); in avtab_write_item()
263 if (items != 1) in avtab_write_item()
287 size_t items; in avtab_write() local
308 items = put_entry(&nel, sizeof(uint32_t), 1, fp); in avtab_write()
309 if (items != 1) in avtab_write()
316 If new format, write out the items. */ in avtab_write()
326 Write the computed nel value, then write the items. */ in avtab_write()
328 items = put_entry(&nel, sizeof(uint32_t), 1, fp); in avtab_write()
329 if (items != 1) { in avtab_write()
359 size_t items; in mls_write_semantic_level_helper() local
367 items = put_entry(buf, sizeof(uint32_t), 2, fp); in mls_write_semantic_level_helper()
368 if (items != 2) in mls_write_semantic_level_helper()
374 items = put_entry(buf, sizeof(uint32_t), 2, fp); in mls_write_semantic_level_helper()
375 if (items != 2) in mls_write_semantic_level_helper()
407 size_t items; in mls_write_level() local
410 items = put_entry(&sens, sizeof(uint32_t), 1, fp); in mls_write_level()
411 if (items != 1) in mls_write_level()
427 size_t items, items2; in mls_write_range_helper() local
432 items = 1; /* item 0 is used for the item count */ in mls_write_range_helper()
433 buf[items++] = cpu_to_le32(r->level[0].sens); in mls_write_range_helper()
435 buf[items++] = cpu_to_le32(r->level[1].sens); in mls_write_range_helper()
436 buf[0] = cpu_to_le32(items - 1); in mls_write_range_helper()
438 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in mls_write_range_helper()
439 if (items2 != items) in mls_write_range_helper()
455 size_t items, items2, len; in sens_write() local
462 items = 0; in sens_write()
463 buf[items++] = cpu_to_le32(len); in sens_write()
464 buf[items++] = cpu_to_le32(levdatum->isalias); in sens_write()
465 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in sens_write()
466 if (items != items2) in sens_write()
469 items = put_entry(key, 1, len, fp); in sens_write()
470 if (items != len) in sens_write()
483 size_t items, items2, len; in cat_write() local
490 items = 0; in cat_write()
491 buf[items++] = cpu_to_le32(len); in cat_write()
492 buf[items++] = cpu_to_le32(catdatum->s.value); in cat_write()
493 buf[items++] = cpu_to_le32(catdatum->isalias); in cat_write()
494 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in cat_write()
495 if (items != items2) in cat_write()
498 items = put_entry(key, 1, len, fp); in cat_write()
499 if (items != len) in cat_write()
510 size_t nel, items; in role_trans_write() local
521 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_trans_write()
522 if (items != 1) in role_trans_write()
536 items = put_entry(buf, sizeof(uint32_t), 3, fp); in role_trans_write()
537 if (items != 3) in role_trans_write()
541 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_trans_write()
542 if (items != 1) in role_trans_write()
554 size_t nel, items; in role_allow_write() local
560 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_allow_write()
561 if (items != 1) in role_allow_write()
566 items = put_entry(buf, sizeof(uint32_t), 2, fp); in role_allow_write()
567 if (items != 2) in role_allow_write()
576 size_t items, len; in filename_write_helper() local
583 items = put_entry(buf, sizeof(uint32_t), 1, fp); in filename_write_helper()
584 if (items != 1) in filename_write_helper()
587 items = put_entry(ft->name, sizeof(char), len, fp); in filename_write_helper()
588 if (items != len) in filename_write_helper()
595 items = put_entry(buf, sizeof(uint32_t), 4, fp); in filename_write_helper()
596 if (items != 4) in filename_write_helper()
604 size_t nel, items; in filename_trans_write() local
613 items = put_entry(buf, sizeof(uint32_t), 1, fp); in filename_trans_write()
614 if (items != 1) in filename_trans_write()
626 size_t items; in role_set_write() local
633 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_set_write()
634 if (items != 1) in role_set_write()
642 size_t items; in type_set_write() local
651 items = put_entry(buf, sizeof(uint32_t), 1, fp); in type_set_write()
652 if (items != 1) in type_set_write()
662 unsigned int items, items2; in cond_write_bool() local
670 items = 0; in cond_write_bool()
671 buf[items++] = cpu_to_le32(booldatum->s.value); in cond_write_bool()
672 buf[items++] = cpu_to_le32(booldatum->state); in cond_write_bool()
673 buf[items++] = cpu_to_le32(len); in cond_write_bool()
674 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in cond_write_bool()
675 if (items != items2) in cond_write_bool()
677 items = put_entry(key, 1, len, fp); in cond_write_bool()
678 if (items != len) in cond_write_bool()
684 items = put_entry(buf, sizeof(uint32_t), 1, fp); in cond_write_bool()
685 if (items != 1) in cond_write_bool()
707 uint32_t len, items; in cond_write_av_list() local
727 items = put_entry(buf, sizeof(uint32_t), 1, fp); in cond_write_av_list()
728 if (items != 1) in cond_write_av_list()
757 uint32_t items, items2, len; in cond_write_node() local
760 items = put_entry(buf, sizeof(uint32_t), 1, fp); in cond_write_node()
761 if (items != 1) in cond_write_node()
770 items = put_entry(buf, sizeof(uint32_t), 1, fp); in cond_write_node()
771 if (items != 1) in cond_write_node()
775 items = 0; in cond_write_node()
776 buf[items++] = cpu_to_le32(cur_expr->expr_type); in cond_write_node()
777 buf[items++] = cpu_to_le32(cur_expr->bool); in cond_write_node()
778 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in cond_write_node()
779 if (items2 != items) in cond_write_node()
798 items = put_entry(buf, sizeof(uint32_t), 1, fp); in cond_write_node()
799 if (items != 1) in cond_write_node()
810 uint32_t len, items; in cond_write_list() local
817 items = put_entry(buf, sizeof(uint32_t), 1, fp); in cond_write_list()
818 if (items != 1) in cond_write_list()
836 size_t items, items2; in context_write() local
838 items = 0; in context_write()
839 buf[items++] = cpu_to_le32(c->user); in context_write()
840 buf[items++] = cpu_to_le32(c->role); in context_write()
841 buf[items++] = cpu_to_le32(c->type); in context_write()
842 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in context_write()
843 if (items2 != items) in context_write()
865 size_t items, items2, len; in perm_write() local
872 items = 0; in perm_write()
873 buf[items++] = cpu_to_le32(len); in perm_write()
874 buf[items++] = cpu_to_le32(perdatum->s.value); in perm_write()
875 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in perm_write()
876 if (items != items2) in perm_write()
879 items = put_entry(key, 1, len, fp); in perm_write()
880 if (items != len) in perm_write()
890 size_t items, items2, len; in common_write() local
897 items = 0; in common_write()
898 buf[items++] = cpu_to_le32(len); in common_write()
899 buf[items++] = cpu_to_le32(comdatum->s.value); in common_write()
900 buf[items++] = cpu_to_le32(comdatum->permissions.nprim); in common_write()
901 buf[items++] = cpu_to_le32(comdatum->permissions.table->nel); in common_write()
902 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in common_write()
903 if (items != items2) in common_write()
906 items = put_entry(key, 1, len, fp); in common_write()
907 if (items != len) in common_write()
923 int items; in write_cons_helper() local
932 items = put_entry(buf, sizeof(uint32_t), 2, fp); in write_cons_helper()
933 if (items != 2) in write_cons_helper()
939 items = put_entry(buf, sizeof(uint32_t), 3, fp); in write_cons_helper()
940 if (items != 3) in write_cons_helper()
972 size_t items, items2, len, len2; in class_write() local
990 items = 0; in class_write()
991 buf[items++] = cpu_to_le32(len); in class_write()
992 buf[items++] = cpu_to_le32(len2); in class_write()
993 buf[items++] = cpu_to_le32(cladatum->s.value); in class_write()
994 buf[items++] = cpu_to_le32(cladatum->permissions.nprim); in class_write()
996 buf[items++] = cpu_to_le32(cladatum->permissions.table->nel); in class_write()
998 buf[items++] = 0; in class_write()
999 buf[items++] = cpu_to_le32(ncons); in class_write()
1000 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in class_write()
1001 if (items != items2) in class_write()
1004 items = put_entry(key, 1, len, fp); in class_write()
1005 if (items != len) in class_write()
1009 items = put_entry(cladatum->comkey, 1, len2, fp); in class_write()
1010 if (items != len2) in class_write()
1029 items = put_entry(buf, sizeof(uint32_t), 1, fp); in class_write()
1030 if (items != 1) in class_write()
1050 items = put_entry(buf, sizeof(uint32_t), 3, fp); in class_write()
1051 if (items != 3) in class_write()
1060 items = put_entry(buf, sizeof(uint32_t), 1, fp); in class_write()
1061 if (items != 1) in class_write()
1072 size_t items, items2, len; in role_write() local
1093 items = 0; in role_write()
1094 buf[items++] = cpu_to_le32(len); in role_write()
1095 buf[items++] = cpu_to_le32(role->s.value); in role_write()
1097 buf[items++] = cpu_to_le32(role->bounds); in role_write()
1098 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in role_write()
1099 if (items != items2) in role_write()
1102 items = put_entry(key, 1, len, fp); in role_write()
1103 if (items != len) in role_write()
1136 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_write()
1137 if (items != 1) in role_write()
1151 size_t items, items2, len; in type_write() local
1168 items = 0; in type_write()
1169 buf[items++] = cpu_to_le32(len); in type_write()
1170 buf[items++] = cpu_to_le32(typdatum->s.value); in type_write()
1176 buf[items++] = cpu_to_le32(typdatum->primary); in type_write()
1192 buf[items++] = cpu_to_le32(properties); in type_write()
1193 buf[items++] = cpu_to_le32(typdatum->bounds); in type_write()
1195 buf[items++] = cpu_to_le32(typdatum->primary); in type_write()
1198 buf[items++] = cpu_to_le32(typdatum->flavor); in type_write()
1201 buf[items++] = cpu_to_le32(typdatum->flags); in type_write()
1209 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in type_write()
1210 if (items != items2) in type_write()
1218 items = put_entry(key, 1, len, fp); in type_write()
1219 if (items != len) in type_write()
1229 size_t items, items2, len; in user_write() local
1237 items = 0; in user_write()
1238 buf[items++] = cpu_to_le32(len); in user_write()
1239 buf[items++] = cpu_to_le32(usrdatum->s.value); in user_write()
1241 buf[items++] = cpu_to_le32(usrdatum->bounds); in user_write()
1242 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in user_write()
1243 if (items != items2) in user_write()
1246 items = put_entry(key, 1, len, fp); in user_write()
1247 if (items != len) in user_write()
1292 size_t nel, items, len; in ocontext_write_xen() local
1307 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_xen()
1308 if (items != 1) in ocontext_write_xen()
1316 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_xen()
1317 if (items != 1) in ocontext_write_xen()
1324 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_xen()
1325 if (items != 1) in ocontext_write_xen()
1335 items = put_entry(buf, sizeof(uint32_t), 2, fp); in ocontext_write_xen()
1336 if (items != 2) in ocontext_write_xen()
1348 items = put_entry(b64, sizeof(uint64_t), 2, fp); in ocontext_write_xen()
1349 if (items != 2) in ocontext_write_xen()
1363 items = put_entry(buf, sizeof(uint32_t), 2, fp); in ocontext_write_xen()
1364 if (items != 2) in ocontext_write_xen()
1372 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_xen()
1373 if (items != 1) in ocontext_write_xen()
1381 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_xen()
1382 if (items != 1) in ocontext_write_xen()
1384 items = put_entry(c->u.name, 1, len, fp); in ocontext_write_xen()
1385 if (items != len) in ocontext_write_xen()
1400 size_t nel, items, len; in ocontext_write_selinux() local
1415 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_selinux()
1416 if (items != 1) in ocontext_write_selinux()
1424 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_selinux()
1425 if (items != 1) in ocontext_write_selinux()
1434 items = put_entry(buf, sizeof(uint32_t), 1, fp); in ocontext_write_selinux()
1435 if (items != 1) in ocontext_write_selinux()
1437 items = put_entry(c->u.name, 1, len, fp); in ocontext_write_selinux()
1438 if (items != len) in ocontext_write_selinux()
1453 items = put_entry(buf, sizeof(uint32_t), 4, fp); in ocontext_write_selinux()
1454 if (items != 4) in ocontext_write_selinux()
1464 items = put_entry(buf, sizeof(uint32_t), 2, fp); in ocontext_write_selinux()
1465 if (items != 2) in ocontext_write_selinux()
1467 items = put_entry(c->u.ibendport.dev_name, 1, len, fp); in ocontext_write_selinux()
1468 if (items != len) in ocontext_write_selinux()
1481 items = put_entry(buf, sizeof(uint32_t), 3, fp); in ocontext_write_selinux()
1482 if (items != 3) in ocontext_write_selinux()
1490 items = put_entry(buf, sizeof(uint32_t), 2, fp); in ocontext_write_selinux()
1491 if (items != 2) in ocontext_write_selinux()
1500 items = put_entry(buf, sizeof(uint32_t), 2, fp); in ocontext_write_selinux()
1501 if (items != 2) in ocontext_write_selinux()
1503 items = put_entry(c->u.name, 1, len, fp); in ocontext_write_selinux()
1504 if (items != len) in ocontext_write_selinux()
1514 items = put_entry(buf, sizeof(uint32_t), 8, fp); in ocontext_write_selinux()
1515 if (items != 8) in ocontext_write_selinux()
1545 size_t nel = 0, items, len; in genfs_write() local
1551 items = put_entry(buf, sizeof(uint32_t), 1, fp); in genfs_write()
1552 if (items != 1) in genfs_write()
1557 items = put_entry(buf, sizeof(uint32_t), 1, fp); in genfs_write()
1558 if (items != 1) in genfs_write()
1560 items = put_entry(genfs->fstype, 1, len, fp); in genfs_write()
1561 if (items != len) in genfs_write()
1567 items = put_entry(buf, sizeof(uint32_t), 1, fp); in genfs_write()
1568 if (items != 1) in genfs_write()
1573 items = put_entry(buf, sizeof(uint32_t), 1, fp); in genfs_write()
1574 if (items != 1) in genfs_write()
1576 items = put_entry(c->u.name, 1, len, fp); in genfs_write()
1577 if (items != len) in genfs_write()
1580 items = put_entry(buf, sizeof(uint32_t), 1, fp); in genfs_write()
1581 if (items != 1) in genfs_write()
1620 size_t items; in range_write_helper() local
1635 items = put_entry(buf, sizeof(uint32_t), 2, fp); in range_write_helper()
1636 if (items != 2) in range_write_helper()
1640 items = put_entry(buf, sizeof(uint32_t), 1, fp); in range_write_helper()
1641 if (items != 1) in range_write_helper()
1653 size_t items; in range_write() local
1668 items = put_entry(buf, sizeof(uint32_t), 1, fp); in range_write()
1669 if (items != 1) in range_write()
1680 size_t items, items2; in avrule_write() local
1684 items = 0; in avrule_write()
1685 buf[items++] = cpu_to_le32(avrule->specified); in avrule_write()
1686 buf[items++] = cpu_to_le32(avrule->flags); in avrule_write()
1687 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in avrule_write()
1688 if (items2 != items) in avrule_write()
1703 items = 0; in avrule_write()
1704 buf[items++] = cpu_to_le32(len); in avrule_write()
1705 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in avrule_write()
1706 if (items2 != items) in avrule_write()
1710 items = 0; in avrule_write()
1711 buf[items++] = cpu_to_le32(cur->tclass); in avrule_write()
1712 buf[items++] = cpu_to_le32(cur->data); in avrule_write()
1713 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in avrule_write()
1714 if (items2 != items) in avrule_write()
1743 items = put_entry(&buf8, sizeof(uint8_t),1,fp); in avrule_write()
1744 if (items != 1) in avrule_write()
1747 items = put_entry(&buf8, sizeof(uint8_t),1,fp); in avrule_write()
1748 if (items != 1) in avrule_write()
1752 items = put_entry(buf32, sizeof(uint32_t), nel, fp); in avrule_write()
1753 if (items != nel) in avrule_write()
1803 size_t items; in role_trans_rule_write() local
1814 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_trans_rule_write()
1815 if (items != 1) in role_trans_rule_write()
1834 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_trans_rule_write()
1835 if (items != 1) in role_trans_rule_write()
1844 size_t items; in role_allow_rule_write() local
1851 items = put_entry(buf, sizeof(uint32_t), 1, fp); in role_allow_rule_write()
1852 if (items != 1) in role_allow_rule_write()
1866 size_t items; in filename_trans_rule_write() local
1874 items = put_entry(buf, sizeof(uint32_t), 1, fp); in filename_trans_rule_write()
1875 if (items != 1) in filename_trans_rule_write()
1881 items = put_entry(buf, sizeof(uint32_t), 1, fp); in filename_trans_rule_write()
1882 if (items != 1) in filename_trans_rule_write()
1885 items = put_entry(ftr->name, sizeof(char), len, fp); in filename_trans_rule_write()
1886 if (items != len) in filename_trans_rule_write()
1897 items = put_entry(buf, sizeof(uint32_t), 2, fp); in filename_trans_rule_write()
1898 if (items != 2) in filename_trans_rule_write()
1908 size_t items; in range_trans_rule_write() local
1915 items = put_entry(buf, sizeof(uint32_t), 1, fp); in range_trans_rule_write()
1916 if (items != 1) in range_trans_rule_write()
2042 unsigned int items = 2 + scope->decl_ids_len, i; in scope_write() local
2046 if (items >= (sizeof(static_buf) / 4)) { in scope_write()
2051 dyn_buf = malloc(items * sizeof(*dyn_buf)); in scope_write()
2069 if (put_entry(buf, sizeof(*buf), items, fp) != items) in scope_write()
2112 size_t items, items2, len; in policydb_write() local
2143 items = 0; in policydb_write()
2145 buf[items++] = cpu_to_le32(POLICYDB_MAGIC); in policydb_write()
2149 buf[items++] = cpu_to_le32(POLICYDB_MOD_MAGIC); in policydb_write()
2153 buf[items++] = cpu_to_le32(len); in policydb_write()
2154 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in policydb_write()
2155 if (items != items2) in policydb_write()
2157 items = put_entry(policydb_str, 1, len, fp); in policydb_write()
2158 if (items != len) in policydb_write()
2162 items = 0; in policydb_write()
2172 buf[items++] = cpu_to_le32(p->policy_type); in policydb_write()
2174 buf[items++] = cpu_to_le32(p->policyvers); in policydb_write()
2175 buf[items++] = cpu_to_le32(config); in policydb_write()
2176 buf[items++] = cpu_to_le32(info->sym_num); in policydb_write()
2177 buf[items++] = cpu_to_le32(info->ocon_num); in policydb_write()
2179 items2 = put_entry(buf, sizeof(uint32_t), items, fp); in policydb_write()
2180 if (items != items2) in policydb_write()
2187 items = put_entry(buf, sizeof(uint32_t), 1, fp); in policydb_write()
2188 if (items != 1) in policydb_write()
2190 items = put_entry(p->name, 1, len, fp); in policydb_write()
2191 if (items != len) in policydb_write()
2195 items = put_entry(buf, sizeof(uint32_t), 1, fp); in policydb_write()
2196 if (items != 1) in policydb_write()
2198 items = put_entry(p->version, 1, len, fp); in policydb_write()
2199 if (items != len) in policydb_write()
2261 items = put_entry(buf, sizeof(uint32_t), 2, fp); in policydb_write()
2262 if (items != 2) in policydb_write()