Home
last modified time | relevance | path

Searched refs:le64toh (Results 1 – 18 of 18) sorted by relevance

/systemd-251/src/libsystemd/sd-journal/
Djournal-verify.c165 if (le64toh(o->data.entry_offset) == 0) in journal_file_object_verify()
168 if ((le64toh(o->data.entry_offset) == 0) ^ (le64toh(o->data.n_entries) == 0)) { in journal_file_object_verify()
169 error(offset, "Bad n_entries: %"PRIu64, le64toh(o->data.n_entries)); in journal_file_object_verify()
173 if (le64toh(o->object.size) - offsetof(Object, data.payload) <= 0) { in journal_file_object_verify()
176 le64toh(o->object.size)); in journal_file_object_verify()
180 h1 = le64toh(o->data.hash); in journal_file_object_verify()
182 le64toh(o->object.size) - offsetof(Object, data.payload), in journal_file_object_verify()
192 if (!VALID64(le64toh(o->data.next_hash_offset)) || in journal_file_object_verify()
193 !VALID64(le64toh(o->data.next_field_offset)) || in journal_file_object_verify()
194 !VALID64(le64toh(o->data.entry_offset)) || in journal_file_object_verify()
[all …]
Djournal-file.c105 p = le64toh(f->header->tail_object_offset); in journal_file_tail_end_by_pread()
107 p = le64toh(f->header->header_size); in journal_file_tail_end_by_pread()
116 sz = le64toh(tail.object.size); in journal_file_tail_end_by_pread()
142 p = le64toh(f->header->tail_object_offset); in journal_file_tail_end_by_mmap()
144 p = le64toh(f->header->header_size); in journal_file_tail_end_by_mmap()
153 sz = le64toh(READ_NOW(tail->object.size)); in journal_file_tail_end_by_mmap()
432 header_size = le64toh(READ_NOW(f->header->header_size)); in journal_file_verify_header()
441 arena_size = le64toh(READ_NOW(f->header->arena_size)); in journal_file_verify_header()
446 if (le64toh(f->header->tail_object_offset) > header_size + arena_size) in journal_file_verify_header()
449 if (!VALID64(le64toh(f->header->data_hash_table_offset)) || in journal_file_verify_header()
[all …]
Dcatalog.c532 le64toh(h->header_size) < sizeof(CatalogHeader) || in open_mmap()
533 le64toh(h->catalog_item_size) < sizeof(CatalogItem) || in open_mmap()
535 le64toh(h->n_items) <= 0 || in open_mmap()
536 …st.st_size < (off_t) (le64toh(h->header_size) + le64toh(h->catalog_item_size) * le64toh(h->n_items… in open_mmap()
565 (const uint8_t*) p + le64toh(h->header_size), in find_id()
566 le64toh(h->n_items), in find_id()
567 le64toh(h->catalog_item_size), in find_id()
576 (const uint8_t*) p + le64toh(h->header_size), in find_id()
577 le64toh(h->n_items), in find_id()
578 le64toh(h->catalog_item_size), in find_id()
[all …]
Djournal-authenticate.c21 r = le64toh(f->header->n_tags) + 1; in journal_file_tag_seqnum()
50 le64toh(o->tag.seqnum), in journal_file_append_tag()
251 … gcry_md_write(f->hmac, o->data.payload, le64toh(o->object.size) - offsetof(Object, data.payload)); in journal_file_hmac_put_object()
257 …gcry_md_write(f->hmac, o->field.payload, le64toh(o->object.size) - offsetof(Object, field.payload)… in journal_file_hmac_put_object()
262 …gcry_md_write(f->hmac, &o->entry.seqnum, le64toh(o->object.size) - offsetof(Object, entry.seqnum)); in journal_file_hmac_put_object()
366 if (le64toh(m->header_size) < sizeof(FSSHeader)) { in journal_file_fss_load()
371 if (le64toh(m->fsprg_state_size) != FSPRG_stateinbytes(le16toh(m->fsprg_secpar))) { in journal_file_fss_load()
376 f->fss_file_size = le64toh(m->header_size) + le64toh(m->fsprg_state_size); in journal_file_fss_load()
387 if (le64toh(m->start_usec) <= 0 || in journal_file_fss_load()
388 le64toh(m->interval_usec) <= 0) { in journal_file_fss_load()
[all …]
Dsd-journal.c121 .seqnum = le64toh(o->entry.seqnum), in init_location()
123 .realtime = le64toh(o->entry.realtime), in init_location()
124 .monotonic = le64toh(o->entry.monotonic), in init_location()
126 .xor_hash = le64toh(o->entry.xor_hash), in init_location()
759 n_entries = le64toh(f->header->n_entries); in next_beyond_location()
940 … SD_ID128_TO_STRING(j->current_file->header->seqnum_id), le64toh(o->entry.seqnum), in sd_journal_get_cursor()
941 SD_ID128_TO_STRING(o->entry.boot_id), le64toh(o->entry.monotonic), in sd_journal_get_cursor()
942 le64toh(o->entry.realtime), in sd_journal_get_cursor()
943 le64toh(o->entry.xor_hash)) < 0) in sd_journal_get_cursor()
1094 if (ll != le64toh(o->entry.seqnum)) in sd_journal_test_cursor()
[all …]
Djournal-vacuum.c114 return le64toh(n_entries) <= 0; in journal_file_empty()
Djournal-file.h170 (le64toh((h)->header_size) >= offsetof(Header, field) + sizeof((h)->field))
/systemd-251/src/libsystemd/sd-hwdb/
Dsd-hwdb.c70 base += le64toh(hwdb->head->node_size); in trie_node_child()
71 base += idx * le64toh(hwdb->head->child_entry_size); in trie_node_child()
78 base += le64toh(hwdb->head->node_size); in trie_node_value()
79 base += node->children_count * le64toh(hwdb->head->child_entry_size); in trie_node_value()
80 base += idx * le64toh(hwdb->head->value_entry_size); in trie_node_value()
85 return (const struct trie_node_f *)(hwdb->map + le64toh(off)); in trie_node_from_off()
89 return hwdb->map + le64toh(off); in trie_string()
104 …child = bsearch(&search, (const char *)node + le64toh(hwdb->head->node_size), node->children_count, in node_lookup_f()
105 le64toh(hwdb->head->child_entry_size), trie_children_cmp_f); in node_lookup_f()
128 if (le64toh(hwdb->head->value_entry_size) >= sizeof(struct trie_value_entry2_f)) { in hwdb_add_property()
[all …]
/systemd-251/src/journal/
Dtest-journal.c62 assert_se(le64toh(o->entry.seqnum) == 1); in TEST()
65 assert_se(le64toh(o->entry.seqnum) == 2); in TEST()
68 assert_se(le64toh(o->entry.seqnum) == 3); in TEST()
74 assert_se(le64toh(o->entry.seqnum) == 1); in TEST()
78 assert_se(le64toh(o->entry.seqnum) == 1); in TEST()
81 assert_se(le64toh(o->entry.seqnum) == 3); in TEST()
85 assert_se(le64toh(o->entry.seqnum) == 2); in TEST()
88 assert_se(le64toh(o->entry.seqnum) == 2); in TEST()
93 assert_se(le64toh(o->entry.seqnum) == 1); in TEST()
96 assert_se(le64toh(o->entry.seqnum) == 3); in TEST()
[all …]
Dmanaged-journal-file.c32 f->header->arena_size = htole64(p - le64toh(f->header->header_size)); in managed_journal_file_truncate()
48 for (uint64_t q = p; q != 0; q = le64toh(o.entry_array.next_entry_array_offset)) { in managed_journal_file_entry_array_punch_hole()
71 sz = p + le64toh(o.object.size) - offset; in managed_journal_file_entry_array_punch_hole()
76 if (p == le64toh(f->header->tail_object_offset) && !JOURNAL_HEADER_SEALED(f->header)) { in managed_journal_file_entry_array_punch_hole()
87 f->header->arena_size = htole64(ALIGN64(offset) - le64toh(f->header->header_size)); in managed_journal_file_entry_array_punch_hole()
114 f, le64toh(f->header->entry_array_offset), le64toh(f->header->n_entries)); in managed_journal_file_punch_holes()
118 p = le64toh(f->header->data_hash_table_offset); in managed_journal_file_punch_holes()
119 sz = le64toh(f->header->data_hash_table_size); in managed_journal_file_punch_holes()
133 for (uint64_t q = le64toh(items[j].head_hash_offset); q != 0; in managed_journal_file_punch_holes()
134 q = le64toh(o.data.next_hash_offset)) { in managed_journal_file_punch_holes()
[all …]
/systemd-251/src/shared/
Dbtrfs-util.c499 ret->otime = (usec_t) le64toh(ri->otime.sec) * USEC_PER_SEC + in btrfs_subvol_get_info_fd()
503 ret->read_only = le64toh(ri->flags) & BTRFS_ROOT_SUBVOL_RDONLY; in btrfs_subvol_get_info_fd()
592 ret->referenced = le64toh(qii->rfer); in btrfs_qgroup_get_quota_fd()
593 ret->exclusive = le64toh(qii->excl); in btrfs_qgroup_get_quota_fd()
600 if (le64toh(qli->flags) & BTRFS_QGROUP_LIMIT_MAX_RFER) in btrfs_qgroup_get_quota_fd()
601 ret->referenced_max = le64toh(qli->max_rfer); in btrfs_qgroup_get_quota_fd()
605 if (le64toh(qli->flags) & BTRFS_QGROUP_LIMIT_MAX_EXCL) in btrfs_qgroup_get_quota_fd()
606 ret->exclusive_max = le64toh(qli->max_excl); in btrfs_qgroup_get_quota_fd()
1123 … p = strndup((char*) ref + sizeof(struct btrfs_root_ref), le64toh(ref->name_len)); in subvol_remove_children()
1266 .lim.max_rfer = le64toh(qli->max_rfer), in btrfs_qgroup_copy_limits()
[all …]
Dcreds-util.c850 if (le64toh(t->pcr_mask) >= (UINT64_C(1) << TPM2_PCRS_MAX)) in decrypt_credential_and_warn()
871 le64toh(t->pcr_mask), in decrypt_credential_and_warn()
967 if (le64toh(m->timestamp) != USEC_INFINITY && in decrypt_credential_and_warn()
968 le64toh(m->not_after) != USEC_INFINITY && in decrypt_credential_and_warn()
969 le64toh(m->timestamp) >= le64toh(m->not_after)) in decrypt_credential_and_warn()
1005 … if (le64toh(m->timestamp) != USEC_INFINITY && le64toh(m->timestamp) > validate_timestamp) in decrypt_credential_and_warn()
1008 … if (le64toh(m->not_after) != USEC_INFINITY && le64toh(m->not_after) < validate_timestamp) { in decrypt_credential_and_warn()
/systemd-251/src/basic/
Dsparse-endian.h55 #undef le64toh
83 static inline uint64_t le64toh(le64_t value) { return bswap_64_on_be((uint64_t __sd_force)value); } in le64toh() function
Dunaligned.h62 return le64toh(u->x); in unaligned_read_le64()
80 u->x = le64toh(a); in unaligned_write_le64()
Dxattr-util.c126 u = le64toh(le); in parse_crtime()
/systemd-251/src/libsystemd/sd-bus/
Dbus-gvariant.c271 return le64toh(x.u64); in bus_gvariant_read_word_le()
/systemd-251/src/libsystemd-network/
Dsd-ipv4ll.c254 ll->seed.generation = htole64(le64toh(ll->seed.generation) + 1); in ipv4ll_pick_address()
/systemd-251/src/network/
Dnetworkctl.c1250 if (le64toh(u) >= 4096) in next_lldp_neighbor()
1253 raw = new(uint8_t, le64toh(u)); in next_lldp_neighbor()
1257 if (fread(raw, 1, le64toh(u), f) != le64toh(u)) in next_lldp_neighbor()
1260 r = sd_lldp_neighbor_from_raw(ret, raw, le64toh(u)); in next_lldp_neighbor()