[libvirt PATCH v2 06/20] commandhelper: Split argument parsing and printing
Tim Wiederhake
twiederh at redhat.com
Mon Feb 1 11:27:50 UTC 2021
Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
---
tests/commandhelper.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/commandhelper.c b/tests/commandhelper.c
index 62e1b98c60..24373d6c07 100644
--- a/tests/commandhelper.c
+++ b/tests/commandhelper.c
@@ -75,8 +75,6 @@ int main(int argc, char **argv) {
goto cleanup;
for (i = 1; i < argc; i++) {
- fprintf(log, "ARG:%s\n", argv[i]);
-
if (STREQ(argv[i - 1], "--readfd") &&
sscanf(argv[i], "%u%c", &readfds[numreadfds++], &c) != 1) {
printf("Could not parse fd %s\n", argv[i]);
@@ -88,6 +86,10 @@ int main(int argc, char **argv) {
}
}
+ for (i = 1; i < argc; i++) {
+ fprintf(log, "ARG:%s\n", argv[i]);
+ }
+
for (n = 0; environ[n]; n++) {
}
--
2.26.2
More information about the libvir-list
mailing list