| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
By using __extension__, we can silence pedantic errors we cannot or
do not want to fix.
This in particular silences:
- enum values being outside of int range
- variadic macros
- long long being C99
- type of bit-field ‘type’ is a GCC extension
- use of C99 bool in public header functions
|
|
|
|
|
|
|
|
|
|
| |
The existing sd_hwdb_new function always initializes the hwdb from the
first successful hwdb.bin it finds from hwdb_bin_paths. This means there
is currently no way to initialize a hwdb from an explicit path, which
would be useful for systemd-hwdb query.
Add sd_hwdb_new_from_path to allow a sd_hwdb to be initialized from a
custom path outside of hwdb_bin_paths.
|
|
|
|
| |
This should ensure public headers are free from any warnings.
|
|
|
|
|
|
| |
This makes it easier to only test a subset of tests without having
to specify them all on the command line:
meson test -C build --suite headers
|
|
|
|
|
|
|
|
|
| |
No need to involve a trivial shell script for this.
We could call the compiler directly, but test() expects arguments
to be passed separately and cc.cmd_array() can contain arguments
itself. Using env is easier than manually slicing the array because
meson has no builtins for that.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We usually open() device node obtained by sd_device_get_devname().
However, the device node corresponds to the sd-device object may be
already removed, and another device node with the same path may be
created, hence an unexpected device may be opened.
The sd_device_open() opens device node, and checks the devnum and
diskseq of opened devnum, to avoid the above possibility.
Prompted by https://github.com/systemd/systemd/issues/22906#issuecomment-1082736443.
|
|
|
|
| |
and sd_device_new_from_path() which takes devname or syspath.
|
|
|
|
|
|
|
|
|
|
| |
correctly
Usecase: later on we can use this to retroactively adjust log output in
journalctl or similar on systems lacking an RTC: we just have to search
for this sructured log message that indicates the first sync point and
can then retroactively adjust the incorrect timestamps collected before
that.
|
|
|
|
|
|
|
| |
If the prefix is only referenced by sd_radv, then the returned pointer
is already freed.
networkd does not uses the returned value. Let's voidify the function.
|
|
|
|
|
|
|
| |
And make the settings configures DHCP option 66 and 67.
Follow-ups for #22615.
Fixes #22661.
|
|
|
|
| |
To make them follow corresponding DHCPv4 options.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The approach to use '''…'''.split() instead of a list of strings was initially
used when converting from automake because it allowed identical blocks of lines
to be used for both, making the conversion easier.
But over the years we have been using normal lists more and more, especially
when there were just a few filenames listed. This converts the rest.
No functional change.
|
|
|
|
| |
boot systems
|
|\
| |
| | |
sd-dhcp6-client: several fixes and cleanups
|
| |
| |
| |
| |
| |
| |
| | |
This is mostly for tests or fuzzers. Hence, this makes the function
requires that the client is running in the test mode.
Also, now the function mask the value for message type.
|
| |
| |
| |
| | |
And allows to specify multiple hints.
|
|/
|
|
|
|
|
|
|
| |
We expose various other forms of UUID helpers already, i.e.
SD_ID128_UUID_FORMAT_STR and SD_ID128_MAKE_UUID_STR(), and we parse
UUIDs, hence add a high-level helper for formatting UUIDs too.
This doesn't add any new code, it just moves some helpers
id128-util.[ch] → sd-id128.[ch], to make them public.
|
|
|
|
| |
sd_rtnl_message_traffic_control_get_{ifindex,parent,handle}()
|
|
|
|
|
| |
As the netlink message header types for both qdisc and tclass are
equivalent.
|
|
|
|
|
|
|
|
|
|
|
| |
arrays
When classless static routes option is provided, then static routes
option should not be used. Hence, let's not mix and store them in one
storage.
This introduce sd_dhcp_lease_get_static_routes() and
sd_dhcp_lease_get_classless_routes().
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
sd_event_add_inotify_fd() is like sd_event_add_inotify(), but takes an
fd to an inode instead of a path, and is hence a ton nicer.
|
|
|
|
| |
Closes #21202.
|
|\
| |
| | |
sd-dhcp6-client: introduce sd_dhcp6_lease_get_server_address()
|
| | |
|
|/
|
|
|
| |
sd-lldp-tx does not call any callback function. So, the function is
mostly useless.
|
|
|
|
|
| |
All received information is stored in sd_ndisc_router, and we have
sd_ndisc_router_get_mtu() and sd_ndisc_router_get_hop_limit().
|
|
|
|
|
|
|
|
|
| |
independently with valid_until
Previously, valid_until (or preferred_until for preferred lifetime) was
calculated from lifetime. So, when an upstream interface acquire a
dynamic prefix (e.g. through DHCPv6-PD) with long lifetime, then sd-radv
advertise the same lifetime. It may not be desired for some situations.
|
| |
|
| |
|
|\
| |
| | |
network: dhcp6pd: set lifetime and route metric
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
sd_radv_route_prefix_set_prefix()
|
|\
| |
| | |
sd-dhcp6-client: several cleanups for parsing options
|
| | |
|
|/ |
|
|
|
|
| |
negative errno on error
|
| |
|