Commit Graph
54431 Commits
Author SHA1 Message Date
Yu Watanabe 1cf4c2fc42 network-generator: use hash_ops with destructor for Network, NetDev, and Link 2025-04-13 10:03:40 +09:00
Yu Watanabe 26f8a0144a wait-online: move manager_process_link() to link.c
Then, rename it to rtnl_process_link().

No functional change, just refactoring.
2025-04-13 10:03:40 +09:00
Yu Watanabe 9f66d61a41 wait-online: use hash_ops with destructor for managing Link 2025-04-13 10:03:40 +09:00
Yu Watanabe 4100e0f207 sysv-generator: introduce hash_ops for SysvStub
This also renames free_sysvstub() -> sysvstub_free(), to follow our
usual coding style.
2025-04-13 10:00:57 +09:00
Yu Watanabe 765ffa12ee sysusers: use trivial_hash_ops_free for storing user/group name 2025-04-13 10:00:57 +09:00
Yu Watanabe 5f43554f90 sd-netlink: introduce custom hash_ops for GenericNetlinkFamily 2025-04-13 10:00:57 +09:00
Yu Watanabe 70669fa2fe sd-device-enumerator: use custom hash_ops with destructor 2025-04-13 10:00:57 +09:00
Yu Watanabe f92fac7e9b sd-device: replace set_free_free() with set_free()
These uses string_hash_ops_free, hence not set_free() is enough.
2025-04-13 10:00:57 +09:00
Yu Watanabe 855800aaec coredump: replace custom cleanup function with specific hash_ops with destructor 2025-04-13 10:00:57 +09:00
Yu Watanabe f8b0277101 analyze: replace set_free_free() with set_free()
set_put_strdup() uses &string_hash_ops_free, hence set_free() also
frees stored contents.
2025-04-13 10:00:57 +09:00
Yu Watanabe d6c8db650d resolved-dns-trust-anchor: use hash_ops with destructor for managing DnsAnswer 2025-04-13 09:58:49 +09:00
Yu Watanabe 442ac1b1b0 resolved-dns-trust-anchor: use hash_ops with destructor for managing RRs 2025-04-13 09:58:49 +09:00
Yu Watanabe f7880e58f2 resolved-dns-scope: use hash_ops with destructor for conflict_queue 2025-04-13 09:58:49 +09:00
Yu Watanabe 5c274555c3 resolve: use dns_name_hash_ops_free for dnssec negative trust anchor 2025-04-13 09:58:49 +09:00
Yu Watanabe d9856d812b journal-remote: introduce custom hash_ops with destructor for MHDDaemonWrapper
Then, we can move declaration of the type from journal-remote.c to
journal-remote-main.c, and drop several #if ... #endif.
2025-04-13 09:57:19 +09:00
Yu Watanabe 8eb4ce4118 sd-journal: use hash_ops with destructor that closes JournalFile 2025-04-13 09:57:19 +09:00
Yu Watanabe c5ed193516 journal: use hash_ops with destructor that make JournalFile offline and close 2025-04-13 09:57:19 +09:00
Yu Watanabe 83d3aed907 journal: replace unnecessary use of set_free_free() with set_free()
These uses pcre2_code_hash_ops_free, hence set_free() is enough.
2025-04-13 09:57:19 +09:00
Yu Watanabe d502816b3e unit-file: use set_free() to free paths
As it uses path_hash_ops_free.
2025-04-13 09:49:40 +09:00
Yu Watanabe 5c6ea30209 core/unit: use string_hash_ops_free for Unit.aliases 2025-04-13 09:49:40 +09:00
Yu Watanabe 5793a39dd8 core,systemctl: unit_file_find_fragment() provides names with string_hash_ops_free
names are assigned with set_put_strdup(), hence string_hash_ops_free is
used and we can use set_free() rather than set_free_free().
2025-04-13 09:49:40 +09:00
Yu Watanabe c4c4ea2fb6 core: replace unnecessary use of set_free_free() with set_free()
These variables are assigned with set_put_strv(), hence
string_hash_ops_free is used.

This also drops unnecessary call of set_ensure_allocated() with wrong
hash ops.
2025-04-13 09:49:39 +09:00
Yu Watanabe f9ae1f5cf5 install: use hash_ops with destructor for InstallInfo 2025-04-13 09:49:39 +09:00
Yu Watanabe 8d190e990e install: use path_hash_ops_free 2025-04-13 09:49:39 +09:00
Yu Watanabe e2603934d5 locale-util,kbd-util: several cleanups (#37090) 2025-04-13 09:15:02 +09:00
Mike Yuan 7065494e7e core/execute: set_get_strv() does not transfer ownership of strings
Prompted by #37090
2025-04-13 09:14:18 +09:00
Luca Boccassi 5935d74613 fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/ (#37109) 2025-04-12 23:05:10 +01:00
Yu Watanabe fd7f760338 socket-proxy: several cleanups (#37107) 2025-04-13 05:56:57 +09:00
Yu Watanabe 002ff90d8c kbd-util: use string_hash_ops_free and set_to_strv() 2025-04-13 04:59:26 +09:00
Yu Watanabe 21d84e8905 locale-util: use string_hash_ops_free and set_to_strv()
Then we can drop hackish combination of use of set_free_free() and
set_free().
2025-04-13 04:59:26 +09:00
Yu Watanabe 3f23b37c5a strv: constify arguments for strv_equal_ignore_order()
Follow-up for 5072f4268b.
2025-04-13 04:59:26 +09:00
Yu Watanabe 24655047b0 set: introduce set_to_strv()
It is similar to set_get_strv(), but invalidates the set on success.
2025-04-13 04:59:26 +09:00
Yu Watanabe 4da43aeb0c locale-util: coding style cleanups 2025-04-13 04:59:26 +09:00
Yu Watanabe a4a5ee4cd1 locale-util: filter out non-UTF-8 locales even when failed to parse $SYSTEMD_LIST_NON_UTF8_LOCALES 2025-04-13 04:59:26 +09:00
Yu Watanabe 90abb64fd5 locale-util: fix argument for munmap() 2025-04-13 04:59:26 +09:00
Yu Watanabe 41c817e772 socket-proxy: reset connection only in callback functions
This makes connection_complete(), connection_start(), and friends not
reset connection on failure.
2025-04-13 04:28:35 +09:00
Yu Watanabe 37edefb33f socket-proxy: use event_source_hash_ops for managing event sources 2025-04-13 04:28:35 +09:00
Yu Watanabe 94dd3a569c event-util: use DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR() to define event_source_hash_ops
Currently, the hash_ops is only used by set, so this does not change
anything. But, there are several benefits,
- we can drop cast in the definition,
- the hash_ops can be also used by hashmap.
2025-04-13 04:28:35 +09:00
Yu Watanabe f4a717aa4d socket-proxy: use hash_ops with destructor for managing Connection
This also renames context_clear() -> context_done(), to follow our
recent coding style.
2025-04-13 04:28:35 +09:00
Yu Watanabe 234b86a444 socket-proxy: make connection_free() return NULL
To make it follow our coding style.
2025-04-13 04:28:35 +09:00
Yu Watanabe 10e41cdddc socket-proxy: use event_reset_time_relative()
Also, split out context_reset_timer() from connection_release().
No functional change. Preparation for later change.
2025-04-13 04:28:35 +09:00
Mike Yuan c89802b5ce stdio-bridge: use DEFAULT_SYSTEM_BUS_ADDRESS 2025-04-12 19:15:10 +02:00
Mike Yuan 6989688a51 stdio-bridge: minor modernization for parse_argv() 2025-04-12 19:15:10 +02:00
Mike Yuan e844ee0752 fstab-generator: honor x-systemd.validatefs from kernel cmdline too 2025-04-12 16:33:22 +02:00
Mike Yuan 7369c037e2 fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/
We carry a special logic for /usr/ in initrd that it initially gets
mounted to /sysusr/usr/ and later bind mounted to /sysroot/usr/.
When hooking up validatefs it is hence necessary to wait for
the bind mount and validate that, rather than the /sysusr/usr/
established as intermediate transport.

Alternative to #37102
2025-04-12 16:33:22 +02:00
Mike Yuan 39642b0130 gpt-auto: do not add /sysusr/usr/ -> /sysroot/usr/ after switch-root
Follow-up for 7852e301e0
2025-04-12 16:33:22 +02:00
Yu Watanabe 9ee08c8dce libudev: use 'type* func()' style rather than 'type *func()' 2025-04-12 22:30:57 +09:00
Yu Watanabe 19aa8c0f0e libudev-list: use strdup_to()
No functional change, just refactoring.
2025-04-12 22:30:57 +09:00
Yu Watanabe 3e8a4defa8 libudev-list: use hashmap_dump_sorted() 2025-04-12 22:30:57 +09:00
Yu Watanabe 76a8f5ae4b libudev-list: use custom hash_ops with destructor for udev_list_entry 2025-04-12 22:30:57 +09:00