diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-08-20 10:54:49 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-08-20 11:09:48 +0200 |
commit | 85b55869bc1065754fdd35ef43ff324cc5e3ef2e (patch) | |
tree | 013fe377acb8a8617c700af9b14fa3be95acb06c /src/test/test-namespace.c | |
parent | c970388b22e81a90f58fdbed195413229d89d6d7 (diff) | |
download | systemd-85b55869bc1065754fdd35ef43ff324cc5e3ef2e.tar.gz |
tree-wide: port everything over to new sd-id128 compund literal bliss
Diffstat (limited to 'src/test/test-namespace.c')
-rw-r--r-- | src/test/test-namespace.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c index cfa46b00b5..796382f3cf 100644 --- a/src/test/test-namespace.c +++ b/src/test/test-namespace.c @@ -200,9 +200,8 @@ static void test_protect_kernel_logs(void) { } int main(int argc, char *argv[]) { - sd_id128_t bid; - char boot_id[SD_ID128_STRING_MAX]; _cleanup_free_ char *x = NULL, *y = NULL, *z = NULL, *zz = NULL; + sd_id128_t bid; test_setup_logging(LOG_INFO); @@ -214,16 +213,15 @@ int main(int argc, char *argv[]) { } assert_se(sd_id128_get_boot(&bid) >= 0); - sd_id128_to_string(bid, boot_id); - x = strjoin("/tmp/systemd-private-", boot_id, "-abcd.service-"); - y = strjoin("/var/tmp/systemd-private-", boot_id, "-abcd.service-"); + x = strjoin("/tmp/systemd-private-", SD_ID128_TO_STRING(bid), "-abcd.service-"); + y = strjoin("/var/tmp/systemd-private-", SD_ID128_TO_STRING(bid), "-abcd.service-"); assert_se(x && y); test_tmpdir("abcd.service", x, y); - z = strjoin("/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-"); - zz = strjoin("/var/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-"); + z = strjoin("/tmp/systemd-private-", SD_ID128_TO_STRING(bid), "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-"); + zz = strjoin("/var/tmp/systemd-private-", SD_ID128_TO_STRING(bid), "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-"); assert_se(z && zz); |