From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 2945ED36E; Fri, 13 Jun 2025 14:05:41 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 84015D25B; Fri, 13 Jun 2025 14:05:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) by atuin.qyliss.net (Postfix) with ESMTPS id 60B07D295 for ; Fri, 13 Jun 2025 14:05:26 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 878211140177; Fri, 13 Jun 2025 10:05:24 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Fri, 13 Jun 2025 10:05:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1749823524; x= 1749909924; bh=4NH501aZ2TOwQWHqBA5rLkxC1ql1A+k1I1D1y2w0U00=; b=R X3s+LoBznFbS6FLbGvjGa1UUaB4g42lzOOIPMCUX5waKEPX3t+qixxx1IYjdSzC/ jT1FNOqs1At1uupsxClWVeIf7UgjgkH4rio6z3LJkVIyJoiJ1gUv8f+FMxCY3esl 0QXdeNCckHu0AkbNnje5+DjhruYSXImLum10QJtjyOU87hqcYaiIc59wVQ07TSbA gVsYYRKy9ohDRv6p0BVwPbMTmA136D3d407/3wenoPVPJiJ+Ld95yUIl2HOpOJW2 1FcPfk7tnTzazYGSOlb0bsmatUQkGhM8UqVQN43+JCvYv74AyY67NVh0if1NphSL uEM2t01i/S8+U24eAZJyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1749823524; x=1749909924; bh=4 NH501aZ2TOwQWHqBA5rLkxC1ql1A+k1I1D1y2w0U00=; b=YyIX779hvjj7645vo Qar0W08dhdZxVvXhXYpdhB7suQo0HRoYMMZOOBrCayOi7A0klGzxzW/RdYQo8tQx 5uzS2miLpxeXfvFwV1TnWgjNPjtk2bXfbvMLrF11g+hoNE7s3cODUIaJcoo0cALE tedRjuz37O/m4O84K41MyVgkyL/CUA4m4PylGNBX0hvuUuySyHLt9qGkHANf7JAp v5eLhChu72MyvlBqJFRQdG4yfDjxA9Wpxh1Oyq0Gt82PohVex6jvKnL40K5SAoeN 9aPnZaiWwBppoKsdwRp1FJwVs78wam+7o/B6OU+XCHZC26RQbirhiYOJGt5A75Bs 3FKSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddukedugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvve fufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlhihsshgrucftohhsshcu oehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepgeeuieduueekkeeivd etffegkeduhfduvedvledvkefhfeeiteekuddujefffeegnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsg gprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghvvghl sehsphgvtghtrhhumhdqohhsrdhorhhgpdhrtghpthhtohephihukhgrseihuhhkrgdrug gvvh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 13 Jun 2025 10:05:24 -0400 (EDT) Received: by sf.qyliss.net (Postfix, from userid 1000) id D5D55245D6709; Fri, 13 Jun 2025 16:05:20 +0200 (CEST) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH 6/8] release/checks/integration: name QEMU arg pointers Date: Fri, 13 Jun 2025 16:05:06 +0200 Message-ID: <20250613140508.76998-7-hi@alyssa.is> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250613140508.76998-1-hi@alyssa.is> References: <20250613140508.76998-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 5AYGQ376BCNI6EFRWPBKJZH4KTQAZ6UI X-Message-ID-Hash: 5AYGQ376BCNI6EFRWPBKJZH4KTQAZ6UI X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Yureka X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Only hardcoding indices right next to the array initilizer makes it easier to understand the code where these pointers are referred to. Signed-off-by: Alyssa Ross --- release/checks/integration/networking.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/release/checks/integration/networking.c b/release/checks/integration/networking.c index 1e5983f..7331c4a 100644 --- a/release/checks/integration/networking.c +++ b/release/checks/integration/networking.c @@ -209,6 +209,8 @@ static FILE *start_qemu(struct config c) "-serial", "unix:console", nullptr, }; + char **efi_arg = &args[2], **img_arg = &args[4], + **user_data_arg = &args[6]; if (!(arch = getenv("ARCH"))) { uname(&u); @@ -229,9 +231,9 @@ static FILE *start_qemu(struct config c) exit(EXIT_FAILURE); } - if (asprintf(&args[2], "file=%s,format=raw,if=pflash,readonly=true", c.drives.efi) == -1 || - asprintf(&args[4], "file=%s,format=raw,if=virtio,readonly=true", c.drives.img) == -1 || - asprintf(&args[6], "file=%s,format=raw,if=virtio,readonly=true", c.drives.user_data) == -1) { + if (asprintf(efi_arg, "file=%s,format=raw,if=pflash,readonly=true", c.drives.efi) == -1 || + asprintf(img_arg, "file=%s,format=raw,if=virtio,readonly=true", c.drives.img) == -1 || + asprintf(user_data_arg, "file=%s,format=raw,if=virtio,readonly=true", c.drives.user_data) == -1) { perror("asprintf"); exit(EXIT_FAILURE); } -- 2.49.0