From nobody Tue Feb 10 15:01:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611937031; cv=none; d=zohomail.com; s=zohoarc; b=Wi44MyRLD7M8xfRnGKQBJCV8huDg6myjBmnV8UC2lpF2KLyK9WSVY0pkiAaIYPdGd1ld/3s67uzmHi3aukFf67oUktQJvMrvtYBovZDP00qYRWnUBNyxYHBpdQw0gvGzpj8JyiwnuHeRYHjsIk+e2fpG5R0Yrm3Xlu1s3QBenXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611937031; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Dad0WEqRnbo/3JfZw8BuYm+1Yhj9FlRPYxhW569Khl8=; b=hZBinRfN7/Ltc+TZ6tDQhw29bTj2VNvNtbSZju7dXBmYct7dTBoRPnYW13vNGgP5fRmAI3Rtd3pYWJHa7gBLnBDGtrSsRfTPbqRfxwEBfXGLezkN+HnOIOu+JIJfqnvaQn+FsUZDf/LrJfERvGY3AnJIe4Y6mdUV4I4cmWuCFh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611937031442164.1048520266512; Fri, 29 Jan 2021 08:17:11 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-ijt0rs0ZM1KDsPl3qVzyBQ-1; Fri, 29 Jan 2021 11:17:04 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AACD2100C60A; Fri, 29 Jan 2021 16:16:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C04A50F1A; Fri, 29 Jan 2021 16:16:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EF73B1809CAB; Fri, 29 Jan 2021 16:16:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10TGGjAf010302 for ; Fri, 29 Jan 2021 11:16:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6A31F60CD2; Fri, 29 Jan 2021 16:16:45 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id A836E60CE6; Fri, 29 Jan 2021 16:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611937030; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Dad0WEqRnbo/3JfZw8BuYm+1Yhj9FlRPYxhW569Khl8=; b=YInWaU19Z64IY0CZCpdlauPpcFa8/WICYOuQiNV7Q2LVj94dcvotPyfFHPIOWMEjtzldWC v8N3HR3oecWsTN3WwNKoosxpJuufMr+nDH36fBL9QCpZbGc5BvKy7UofdY4DaLEzvkVtRZ VRSnCXCfsodzzhc5OHmaKd56SnAbLtI= X-MC-Unique: ijt0rs0ZM1KDsPl3qVzyBQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 08/19] commandhelper: Factor out printArguments Date: Fri, 29 Jan 2021 17:16:18 +0100 Message-Id: <20210129161629.604823-9-twiederh@redhat.com> In-Reply-To: <20210129161629.604823-1-twiederh@redhat.com> References: <20210129161629.604823-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- tests/commandhelper.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/commandhelper.c b/tests/commandhelper.c index c44322502f..aa346f1dfd 100644 --- a/tests/commandhelper.c +++ b/tests/commandhelper.c @@ -80,6 +80,15 @@ static struct Arguments *parseArguments(int argc, char**= argv) return NULL; } =20 +static void printArguments(FILE *log, int argc, char** argv) +{ + size_t i; + + for (i =3D 1; i < argc; i++) { + fprintf(log, "ARG:%s\n", argv[i]); + } +} + static int envsort(const void *a, const void *b) { const char *const*astrptr =3D a; @@ -105,9 +114,7 @@ int main(int argc, char **argv) { if (!log || !args) goto cleanup; =20 - for (i =3D 1; i < argc; i++) { - fprintf(log, "ARG:%s\n", argv[i]); - } + printArguments(log, argc, argv); =20 for (n =3D 0; environ[n]; n++) { } --=20 2.26.2