From 80fcdb731d4b338acd1eff55a3990e863b627d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 14 Mar 2024 12:37:31 +0100 Subject: [PATCH 1/3] journal: use empty_to_null() in one more place Follow-up for 45bcab66a9c23a74107118d310e09a46f28494fd. --- src/journal/cat.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/journal/cat.c b/src/journal/cat.c index 1634f30b44..90d4f5352f 100644 --- a/src/journal/cat.c +++ b/src/journal/cat.c @@ -95,10 +95,7 @@ static int parse_argv(int argc, char *argv[]) { return version(); case 't': - if (isempty(optarg)) - arg_identifier = NULL; - else - arg_identifier = optarg; + arg_identifier = empty_to_null(optarg); break; case 'p': @@ -122,10 +119,7 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_NAMESPACE: - if (isempty(optarg)) - arg_namespace = NULL; - else - arg_namespace = optarg; + arg_namespace = empty_to_null(optarg); break; case '?': From c7fa1470f9de85a7cc94eac4ad308702e0b8ef8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 15 Mar 2024 09:18:06 +0100 Subject: [PATCH 2/3] portablectl: add forgotten value to --help Followup for 82047a6aa7230031d2a579e81d5f8871c23e0616. --- src/portable/portablectl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index db5e4febe0..0f67e4432f 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -1251,7 +1251,8 @@ static int help(int argc, char *argv[], void *userdata) { " -M --machine=CONTAINER Operate on local container\n" " -q --quiet Suppress informational messages\n" " -p --profile=PROFILE Pick security profile for portable service\n" - " --copy=copy|auto|symlink Prefer copying or symlinks if possible\n" + " --copy=copy|auto|symlink|mixed\n" + " Pick copying or symlinking of resources\n" " --runtime Attach portable service until next reboot only\n" " --no-reload Don't reload the system and service manager\n" " --cat When inspecting include unit and os-release file\n" From 3df28dd9b64c32ea0ab2a7f91f950a76845ef538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 15 Mar 2024 10:54:56 +0100 Subject: [PATCH 3/3] test/TEST-46: drop whitespace after redirection operators --- test/units/testsuite-46.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/units/testsuite-46.sh b/test/units/testsuite-46.sh index e28a1562bf..4bf9922ef3 100755 --- a/test/units/testsuite-46.sh +++ b/test/units/testsuite-46.sh @@ -181,13 +181,13 @@ checkblob() { } mkdir /tmp/blob1 /tmp/blob2 -echo data1 blob1 > /tmp/blob1/test1 -echo data1 blob2 > /tmp/blob2/test1 -echo data2 blob1 > /tmp/blob1/test2 -echo data2 blob2 > /tmp/blob2/test2 -echo invalid filename > /tmp/blob1/файл -echo data3 > /tmp/external-test3 -echo avatardata > /tmp/external-avatar +echo data1 blob1 >/tmp/blob1/test1 +echo data1 blob2 >/tmp/blob2/test1 +echo data2 blob1 >/tmp/blob1/test2 +echo data2 blob2 >/tmp/blob2/test2 +echo invalid filename >/tmp/blob1/файл +echo data3 >/tmp/external-test3 +echo avatardata >/tmp/external-avatar ln -s /tmp/external-avatar /tmp/external-avatar-lnk dd if=/dev/urandom of=/tmp/external-barely-fits bs=1M count=64 dd if=/dev/urandom of=/tmp/external-toobig bs=1M count=65