[libvirt PATCH 06/19] commandhelper: Split argument parsing and printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 tests/commandhelper.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/commandhelper.c b/tests/commandhelper.c
index a964420d81..a77bee931f 100644
--- a/tests/commandhelper.c
+++ b/tests/commandhelper.c
@@ -65,8 +65,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]);
@@ -78,6 +76,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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux