/systemd-251/src/basic/ |
D | siphash24.c | 34 static void sipround(struct siphash *state) { in sipround() argument 35 assert(state); in sipround() 37 state->v0 += state->v1; in sipround() 38 state->v1 = rotate_left(state->v1, 13); in sipround() 39 state->v1 ^= state->v0; in sipround() 40 state->v0 = rotate_left(state->v0, 32); in sipround() 41 state->v2 += state->v3; in sipround() 42 state->v3 = rotate_left(state->v3, 16); in sipround() 43 state->v3 ^= state->v2; in sipround() 44 state->v0 += state->v3; in sipround() [all …]
|
D | siphash24.h | 22 void siphash24_init(struct siphash *state, const uint8_t k[static 16]); 23 void siphash24_compress(const void *in, size_t inlen, struct siphash *state); 24 #define siphash24_compress_byte(byte, state) siphash24_compress((const uint8_t[]) { (byte) }, 1, (s… argument 26 static inline void siphash24_compress_boolean(bool in, struct siphash *state) { in siphash24_compress_boolean() argument 29 siphash24_compress(&i, sizeof i, state); in siphash24_compress_boolean() 32 static inline void siphash24_compress_usec_t(usec_t in, struct siphash *state) { in siphash24_compress_usec_t() argument 33 siphash24_compress(&in, sizeof in, state); in siphash24_compress_usec_t() 36 static inline void siphash24_compress_safe(const void *in, size_t inlen, struct siphash *state) { in siphash24_compress_safe() argument 40 siphash24_compress(in, inlen, state); in siphash24_compress_safe() 43 static inline void siphash24_compress_string(const char *in, struct siphash *state) { in siphash24_compress_string() argument [all …]
|
D | hash-funcs.c | 8 void string_hash_func(const char *p, struct siphash *state) { in string_hash_func() argument 9 siphash24_compress(p, strlen(p) + 1, state); in string_hash_func() 19 void path_hash_func(const char *q, struct siphash *state) { in path_hash_func() argument 23 assert(state); in path_hash_func() 32 siphash24_compress("/", 1, state); in path_hash_func() 43 siphash24_compress_byte('/', state); in path_hash_func() 47 string_hash_func(q, state); in path_hash_func() 52 siphash24_compress(e, r, state); in path_hash_func() 65 void trivial_hash_func(const void *p, struct siphash *state) { in trivial_hash_func() argument 66 siphash24_compress(&p, sizeof(p), state); in trivial_hash_func() [all …]
|
D | env-file.c | 38 } state = PRE_KEY; in parse_env_file_internal() local 50 switch (state) { in parse_env_file_internal() 54 state = COMMENT; in parse_env_file_internal() 56 state = KEY; in parse_env_file_internal() 68 state = PRE_KEY; in parse_env_file_internal() 72 state = PRE_VALUE; in parse_env_file_internal() 90 state = PRE_KEY; in parse_env_file_internal() 110 state = SINGLE_QUOTE_VALUE; in parse_env_file_internal() 112 state = DOUBLE_QUOTE_VALUE; in parse_env_file_internal() 114 state = VALUE_ESCAPE; in parse_env_file_internal() [all …]
|
/systemd-251/src/test/ |
D | test-install-root.c | 22 UnitFileState state; in TEST() local 39 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "a.service", &state) >= 0 && state == UNI… in TEST() 45 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "b.service", &state) >= 0 && state == UNI… in TEST() 51 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "c.service", &state) >= 0 && state == UNI… in TEST() 58 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "d.service", &state) >= 0 && state == UNI… in TEST() 70 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "a.service", &state) >= 0 && state == UNI… in TEST() 71 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "b.service", &state) >= 0 && state == UNI… in TEST() 72 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "c.service", &state) >= 0 && state == UNI… in TEST() 73 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "d.service", &state) >= 0 && state == UNI… in TEST() 97 …assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "a.service", &state) >= 0 && state == UNI… in TEST() [all …]
|
D | test-siphash24.c | 10 struct siphash state = {}; in test_alignment_one() local 18 siphash24_init(&state, key); in test_alignment_one() 19 assert_se(state.v0 == 0x7469686173716475); in test_alignment_one() 20 assert_se(state.v1 == 0x6b617f6d656e6665); in test_alignment_one() 21 assert_se(state.v2 == 0x6b7f62616d677361); in test_alignment_one() 22 assert_se(state.v3 == 0x7b6b696e727e6c7b); in test_alignment_one() 23 siphash24_compress(in, len, &state); in test_alignment_one() 24 assert_se(state.v0 == 0x4a017198de0a59e0); in test_alignment_one() 25 assert_se(state.v1 == 0x0d52f6f62a4f59a4); in test_alignment_one() 26 assert_se(state.v2 == 0x634cb3577b01fd3d); in test_alignment_one() [all …]
|
D | test-install.c | 30 UnitFileState state = 0; in main() local 43 assert_se((r < 0 && p->state == UNIT_FILE_BAD) || in main() 44 (p->state == s)); in main() 48 unit_file_state_to_string(p->state)); in main() 66 r = unit_file_get_state(LOOKUP_SCOPE_SYSTEM, NULL, files[0], &state); in main() 68 assert_se(state == UNIT_FILE_ENABLED); in main() 80 r = unit_file_get_state(LOOKUP_SCOPE_SYSTEM, NULL, files[0], &state); in main() 82 assert_se(state == UNIT_FILE_DISABLED); in main() 97 r = unit_file_get_state(LOOKUP_SCOPE_SYSTEM, NULL, files[0], &state); in main() 99 assert_se(state == UNIT_FILE_MASKED); in main() [all …]
|
/systemd-251/src/boot/efi/ |
D | devicetree.c | 11 static EFI_STATUS devicetree_allocate(struct devicetree_state *state, UINTN size) { in devicetree_allocate() argument 15 assert(state); in devicetree_allocate() 17 err = BS->AllocatePages(AllocateAnyPages, EfiACPIReclaimMemory, pages, &state->addr); in devicetree_allocate() 21 state->pages = pages; in devicetree_allocate() 25 static UINTN devicetree_allocated(const struct devicetree_state *state) { in devicetree_allocated() argument 26 assert(state); in devicetree_allocated() 27 return state->pages * EFI_PAGE_SIZE; in devicetree_allocated() 30 static EFI_STATUS devicetree_fixup(struct devicetree_state *state, UINTN len) { in devicetree_fixup() argument 35 assert(state); in devicetree_fixup() 42 size = devicetree_allocated(state); in devicetree_fixup() [all …]
|
/systemd-251/src/busctl/ |
D | busctl-introspect.c | 54 } state = STATE_ANNOTATION; in parse_xml_annotation() local 75 switch (state) { in parse_xml_annotation() 82 state = STATE_NAME; in parse_xml_annotation() 85 state = STATE_VALUE; in parse_xml_annotation() 130 state = STATE_ANNOTATION; in parse_xml_annotation() 142 state = STATE_ANNOTATION; in parse_xml_annotation() 178 } state = STATE_NODE; in parse_xml_node() local 203 switch (state) { in parse_xml_node() 209 state = STATE_NODE_NAME; in parse_xml_node() 217 state = STATE_INTERFACE; in parse_xml_node() [all …]
|
/systemd-251/src/core/ |
D | target.c | 18 static void target_set_state(Target *t, TargetState state) { in target_set_state() argument 22 if (t->state != state) in target_set_state() 25 old_state = t->state; in target_set_state() 26 t->state = state; in target_set_state() 28 if (state != old_state) in target_set_state() 32 target_state_to_string(state)); in target_set_state() 34 unit_notify(UNIT(t), state_translation_table[old_state], state_translation_table[state], 0); in target_set_state() 93 assert(t->state == TARGET_DEAD); in target_coldplug() 95 if (t->deserialized_state != t->state) in target_coldplug() 109 prefix, target_state_to_string(t->state)); in target_dump() [all …]
|
D | scope.c | 100 static void scope_set_state(Scope *s, ScopeState state) { in scope_set_state() argument 104 if (s->state != state) in scope_set_state() 107 old_state = s->state; in scope_set_state() 108 s->state = state; in scope_set_state() 110 if (!IN_SET(state, SCOPE_STOP_SIGTERM, SCOPE_STOP_SIGKILL)) in scope_set_state() 113 if (IN_SET(state, SCOPE_DEAD, SCOPE_FAILED)) { in scope_set_state() 118 if (state != old_state) in scope_set_state() 119 …%s changed %s -> %s", UNIT(s)->id, scope_state_to_string(old_state), scope_state_to_string(state)); in scope_set_state() 121 unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state], 0); in scope_set_state() 244 assert(s->state == SCOPE_DEAD); in scope_coldplug() [all …]
|
D | slice.c | 30 static void slice_set_state(Slice *t, SliceState state) { in slice_set_state() argument 34 if (t->state != state) in slice_set_state() 37 old_state = t->state; in slice_set_state() 38 t->state = state; in slice_set_state() 40 if (state != old_state) in slice_set_state() 44 slice_state_to_string(state)); in slice_set_state() 46 unit_notify(UNIT(t), state_translation_table[old_state], state_translation_table[state], 0); in slice_set_state() 198 assert(t->state == SLICE_DEAD); in slice_coldplug() 200 if (t->deserialized_state != t->state) in slice_coldplug() 214 prefix, slice_state_to_string(t->state)); in slice_dump() [all …]
|
D | timer.c | 180 struct siphash state; in timer_get_fixed_delay_hash() local 195 siphash24_init(&state, hash_key); in timer_get_fixed_delay_hash() 196 siphash24_compress(&machine_id, sizeof(sd_id128_t), &state); in timer_get_fixed_delay_hash() 197 siphash24_compress_boolean(MANAGER_IS_SYSTEM(UNIT(t)->manager), &state); in timer_get_fixed_delay_hash() 198 siphash24_compress(&uid, sizeof(uid_t), &state); in timer_get_fixed_delay_hash() 199 siphash24_compress_string(UNIT(t)->id, &state); in timer_get_fixed_delay_hash() 201 return siphash24_finalize(&state); in timer_get_fixed_delay_hash() 251 prefix, timer_state_to_string(t->state), in timer_dump() 281 static void timer_set_state(Timer *t, TimerState state) { in timer_set_state() argument 285 if (t->state != state) in timer_set_state() [all …]
|
D | path.c | 416 prefix, path_state_to_string(p->state), in path_dump() 449 static void path_set_state(Path *p, PathState state) { in path_set_state() argument 453 if (p->state != state) in path_set_state() 456 old_state = p->state; in path_set_state() 457 p->state = state; in path_set_state() 459 if (!IN_SET(state, PATH_WAITING, PATH_RUNNING)) in path_set_state() 462 if (state != old_state) in path_set_state() 463 …t_debug(UNIT(p), "Changed %s -> %s", path_state_to_string(old_state), path_state_to_string(state)); in path_set_state() 465 unit_notify(UNIT(p), state_translation_table[old_state], state_translation_table[state], 0); in path_set_state() 474 assert(p->state == PATH_DEAD); in path_coldplug() [all …]
|
/systemd-251/src/libsystemd/sd-network/ |
D | sd-network.c | 40 int sd_network_get_operational_state(char **state) { in sd_network_get_operational_state() argument 41 return network_get_string("OPER_STATE", state); in sd_network_get_operational_state() 44 int sd_network_get_carrier_state(char **state) { in sd_network_get_carrier_state() argument 45 return network_get_string("CARRIER_STATE", state); in sd_network_get_carrier_state() 48 int sd_network_get_address_state(char **state) { in sd_network_get_address_state() argument 49 return network_get_string("ADDRESS_STATE", state); in sd_network_get_address_state() 52 int sd_network_get_ipv4_address_state(char **state) { in sd_network_get_ipv4_address_state() argument 53 return network_get_string("IPV4_ADDRESS_STATE", state); in sd_network_get_ipv4_address_state() 56 int sd_network_get_ipv6_address_state(char **state) { in sd_network_get_ipv6_address_state() argument 57 return network_get_string("IPV6_ADDRESS_STATE", state); in sd_network_get_ipv6_address_state() [all …]
|
/systemd-251/src/systemd/ |
D | sd-network.h | 52 int sd_network_get_operational_state(char **state); 53 int sd_network_get_carrier_state(char **state); 54 int sd_network_get_address_state(char **state); 55 int sd_network_get_ipv4_address_state(char **state); 56 int sd_network_get_ipv6_address_state(char **state); 57 int sd_network_get_online_state(char **state); 84 int sd_network_link_get_setup_state(int ifindex, char **state); 97 int sd_network_link_get_operational_state(int ifindex, char **state); 98 int sd_network_link_get_required_operstate_for_online(int ifindex, char **state); 99 int sd_network_link_get_required_family_for_online(int ifindex, char **state); [all …]
|
/systemd-251/hwdb.d/ |
D | acpi-update.py | 19 self.state = State.NOWHERE 28 if self.state == State.NOWHERE: 29 self.state = State.COMPANY 30 elif self.state == State.AFTER_COMPANY: 31 self.state = State.PNPID 32 elif self.state == State.AFTER_PNPID: 33 self.state = State.DATE 42 if self.state == State.COMPANY: 44 self.state = State.AFTER_COMPANY 45 elif self.state == State.PNPID: [all …]
|
/systemd-251/src/resolve/ |
D | resolved-dns-query.c | 181 if (t->state != DNS_TRANSACTION_NULL) in dns_query_candidate_go() 199 DnsTransactionState state = DNS_TRANSACTION_NO_SERVERS; in dns_query_candidate_state() local 209 switch (t->state) { in dns_query_candidate_state() 228 state = t->state; in dns_query_candidate_state() 232 if (state != DNS_TRANSACTION_SUCCESS) in dns_query_candidate_state() 233 state = t->state; in dns_query_candidate_state() 238 return state; in dns_query_candidate_state() 300 DnsTransactionState state; in dns_query_candidate_notify() local 308 state = dns_query_candidate_state(c); in dns_query_candidate_notify() 310 if (DNS_TRANSACTION_IS_LIVE(state)) in dns_query_candidate_notify() [all …]
|
D | resolved-dns-zone.c | 199 if (i->probe_transaction->state == DNS_TRANSACTION_NULL) { in dns_zone_item_probe_start() 258 if (j->state == DNS_ZONE_ITEM_ESTABLISHED) in dns_zone_put() 262 i->state = DNS_ZONE_ITEM_ESTABLISHED; in dns_zone_put() 264 i->state = DNS_ZONE_ITEM_PROBING; in dns_zone_put() 274 i->state = DNS_ZONE_ITEM_ESTABLISHED; in dns_zone_put() 324 … if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING)) in dns_zone_lookup() 350 … if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING)) in dns_zone_lookup() 360 … if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING)) in dns_zone_lookup() 391 … if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING)) in dns_zone_lookup() 396 if (j->state != DNS_ZONE_ITEM_PROBING) in dns_zone_lookup() [all …]
|
D | resolved-dns-rr.c | 292 static void dns_resource_key_hash_func(const DnsResourceKey *k, struct siphash *state) { in dns_resource_key_hash_func() argument 295 dns_name_hash_func(dns_resource_key_name(k), state); in dns_resource_key_hash_func() 296 siphash24_compress(&k->class, sizeof(k->class), state); in dns_resource_key_hash_func() 297 siphash24_compress(&k->type, sizeof(k->type), state); in dns_resource_key_hash_func() 1329 void dns_resource_record_hash_func(const DnsResourceRecord *rr, struct siphash *state) { in dns_resource_record_hash_func() argument 1332 dns_resource_key_hash_func(rr->key, state); in dns_resource_record_hash_func() 1337 siphash24_compress(&rr->srv.priority, sizeof(rr->srv.priority), state); in dns_resource_record_hash_func() 1338 siphash24_compress(&rr->srv.weight, sizeof(rr->srv.weight), state); in dns_resource_record_hash_func() 1339 siphash24_compress(&rr->srv.port, sizeof(rr->srv.port), state); in dns_resource_record_hash_func() 1340 dns_name_hash_func(rr->srv.name, state); in dns_resource_record_hash_func() [all …]
|
/systemd-251/src/libsystemd-network/ |
D | fuzz-dhcp6-client.c | 24 static void fuzz_client(sd_dhcp6_client *client, const uint8_t *data, size_t size, DHCP6State state… in fuzz_client() argument 25 …assert_se(sd_dhcp6_client_set_information_request(client, state == DHCP6_STATE_INFORMATION_REQUEST… in fuzz_client() 28 client->state = state; in fuzz_client() 34 if (IN_SET(client->state, DHCP6_STATE_INFORMATION_REQUEST, DHCP6_STATE_SOLICITATION)) in fuzz_client() 42 if (client->state != state) in fuzz_client() 43 switch (state) { in fuzz_client() 45 assert_se(client->state == DHCP6_STATE_STOPPED); in fuzz_client() 48 assert_se(IN_SET(client->state, DHCP6_STATE_REQUEST, DHCP6_STATE_BOUND)); in fuzz_client() 51 assert_se(client->state == DHCP6_STATE_BOUND); in fuzz_client() 58 … if (state != DHCP6_STATE_INFORMATION_REQUEST && sd_dhcp6_client_get_lease(client, NULL) >= 0) { in fuzz_client() [all …]
|
/systemd-251/src/libsystemd/sd-journal/ |
D | fsprg.c | 288 void FSPRG_GenState0(void *state, const void *mpk, const void *seed, size_t seedlen) { in FSPRG_GenState0() argument 298 memcpy(state, mpk, 2 + secpar / 8); in FSPRG_GenState0() 299 mpi_export(state + 2 + 1 * secpar / 8, secpar / 8, x); in FSPRG_GenState0() 300 memzero(state + 2 + 2 * secpar / 8, 8); in FSPRG_GenState0() 306 void FSPRG_Evolve(void *state) { in FSPRG_Evolve() argument 313 secpar = read_secpar(state + 0); in FSPRG_Evolve() 314 n = mpi_import(state + 2 + 0 * secpar / 8, secpar / 8); in FSPRG_Evolve() 315 x = mpi_import(state + 2 + 1 * secpar / 8, secpar / 8); in FSPRG_Evolve() 316 epoch = uint64_import(state + 2 + 2 * secpar / 8, 8); in FSPRG_Evolve() 321 mpi_export(state + 2 + 1 * secpar / 8, secpar / 8, x); in FSPRG_Evolve() [all …]
|
/systemd-251/src/systemctl/ |
D | systemctl-is-system-running.c | 15 char **state = userdata; in match_startup_finished() local 18 assert(state); in match_startup_finished() 20 … = bus_get_property_string(sd_bus_message_get_bus(m), bus_systemd_mgr, "SystemState", NULL, state); in match_startup_finished() 30 _cleanup_free_ char *state = NULL; in verb_is_system_running() local 54 match_startup_finished, NULL, &state); in verb_is_system_running() 61 r = bus_get_property_string(bus, bus_systemd_mgr, "SystemState", &error, &state); in verb_is_system_running() 70 if (arg_wait && STR_IN_SET(state, "initializing", "starting")) { in verb_is_system_running() 81 puts(state); in verb_is_system_running() 83 return streq(state, "running") ? EXIT_SUCCESS : EXIT_FAILURE; in verb_is_system_running()
|
/systemd-251/src/home/ |
D | homed-home.h | 45 static inline bool HOME_STATE_IS_ACTIVE(HomeState state) { in HOME_STATE_IS_ACTIVE() argument 46 return IN_SET(state, in HOME_STATE_IS_ACTIVE() 56 static inline bool HOME_STATE_IS_EXECUTING_OPERATION(HomeState state) { in HOME_STATE_IS_EXECUTING_OPERATION() argument 57 return IN_SET(state, in HOME_STATE_IS_EXECUTING_OPERATION() 80 static inline bool HOME_STATE_SHALL_PIN(HomeState state) { in HOME_STATE_SHALL_PIN() argument 82 return IN_SET(state, in HOME_STATE_SHALL_PIN() 91 #define HOME_STATE_SHALL_REBALANCE(state) HOME_STATE_SHALL_PIN(state) argument 93 static inline bool HOME_STATE_MAY_RETRY_DEACTIVATE(HomeState state) { in HOME_STATE_MAY_RETRY_DEACTIVATE() argument 95 return IN_SET(state, in HOME_STATE_MAY_RETRY_DEACTIVATE() 120 HomeState state; member [all …]
|
/systemd-251/src/timesync/ |
D | wait-sync.c | 179 _cleanup_(clock_state_release) ClockState state = { in run() 209 state.inotify_fd = r; in run() 211 r = sd_event_add_io(event, &state.inotify_event_source, state.inotify_fd, in run() 212 EPOLLIN, inotify_handler, &state); in run() 216 r = inotify_add_watch_and_warn(state.inotify_fd, "/run/systemd/", IN_CREATE); in run() 220 state.run_systemd_wd = r; in run() 222 (void) update_notify_run_systemd_timesync(&state); in run() 224 r = clock_state_update(&state, event); in run() 231 if (state.has_watchfile) in run() 234 if (state.adjtime_state == TIME_ERROR) in run()
|