Commit Graph
15 Commits
Author SHA1 Message Date
Daan De Meyer 69a283c5f2 shared: Clean up includes
Split out of #37344.
2025-05-24 14:00:44 +02:00
Daan De Meyer e548ca38b9 device-util: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Zbigniew Jędrzejewski-Szmek bfd5a0687f various: move const ptr indicator to return value 2024-06-19 16:28:28 +02:00
Sam Leonard c50e7dcaf6 nspawn,shared/netif-util: move generate_mac and shorten_ifname to shared/netif-util 2024-04-15 11:42:05 +01:00
Zbigniew Jędrzejewski-Szmek 454318d3e8 various: use strdup_to() in various obvious cases
strdup_to() returns 0 on success and here we convert obvious blocks
which either return -ENOMEM or 0.
2024-03-20 15:13:44 +01:00
Zbigniew Jędrzejewski-Szmek 5980d46304 strv: declare iterator of FOREACH_STRING() in the loop
Same idea as 03677889f0.

No functional change intended. The type of the iterator is generally changed to
be 'const char*' instead of 'char*'. Despite the type commonly used, modifying
the string was not allowed.

I adjusted the naming of some short variables for clarity and reduced the scope
of some variable declarations in code that was being touched anyway.
2022-03-23 11:50:18 +01:00
Yu Watanabe 61e964df71 netif-util: introduce netif_has_carrier() 2022-01-21 05:02:42 +09:00
Yu Watanabe 45aa0e841b network,udev: do not adjust local assignment bit of specified MAC address
People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.

Fixes #21649.
2021-12-07 15:01:04 +09:00
Yu Watanabe 4bd2c4e8e0 netif-util: update log message
Follow-up for 37593b7c48.
2021-11-26 21:05:52 +09:00
Yu Watanabe 37593b7c48 netif-util: introduce net_verify_hardware_address() 2021-11-25 21:07:32 +09:00
Yu Watanabe 9133c1877f netif-util: fix stack-use-after-scope
Fixes a bug introduced by 0295b2fd1d.

Fixes #21292.
2021-11-10 22:11:18 +00:00
Yu Watanabe 0295b2fd1d netif-util: split net_get_unique_predictable_data() into two 2021-11-09 08:24:10 +09:00
Yu Watanabe 043b193f6e netif-util: rename net_get_name_persistent() -> net_get_persistent_name() 2021-11-09 08:24:10 +09:00
Yu Watanabe 4eef6fad31 netif-util: rename link_get_type_string() -> net_get_type_string() 2021-11-09 08:24:10 +09:00
Yu Watanabe b5cc5591fa netif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]
These functions are not relevant to sd-network, and only used by
networkd, networkctl, and udevd.
2021-11-09 08:24:10 +09:00