summaryrefslogtreecommitdiff
path: root/src/test/test-tables.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-02-10 22:15:01 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-18 18:20:56 +0100
commita11300221482da7ffe7be2d75d508ddd411814f6 (patch)
tree009163435be6a2878d026e70439d731a1587a6e9 /src/test/test-tables.c
parent96fb82aa06f2edef153c0ecb1642783aac1c1c84 (diff)
downloadsystemd-a11300221482da7ffe7be2d75d508ddd411814f6.tar.gz
sd-device: add sd_device_get_action() + sd_device_get_seqnum() + sd_device_new_from_stat_rdev()
To make sd-device properly usable for all programs we need to provide an API for the "action" field of an event, it's one of the most relevant ones, and it was so far missing. This also adds sd_device_get_seqnum(), which isn't that interesting, except for generating pretty debug output, which we use it ourselves for. This also makes device_new_from_stat_rdev() public, as it is truly useful, as we can see in our own uses of it, and I think is fairly generic to show up in the public APIs.
Diffstat (limited to 'src/test/test-tables.c')
-rw-r--r--src/test/test-tables.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test-tables.c b/src/test/test-tables.c
index cc93bbbc74..3e5df04590 100644
--- a/src/test/test-tables.c
+++ b/src/test/test-tables.c
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
test_table(collect_mode, COLLECT_MODE);
test_table(condition_result, CONDITION_RESULT);
test_table(condition_type, CONDITION_TYPE);
- test_table(device_action, DEVICE_ACTION);
+ test_table(device_action, SD_DEVICE_ACTION);
test_table(device_state, DEVICE_STATE);
test_table(dns_over_tls_mode, DNS_OVER_TLS_MODE);
test_table(dnssec_mode, DNSSEC_MODE);
@@ -125,5 +125,7 @@ int main(int argc, char **argv) {
test_table_sparse(object_compressed, OBJECT_COMPRESSED);
+ assert_cc(sizeof(sd_device_action_t) == sizeof(int64_t));
+
return EXIT_SUCCESS;
}