From nobody Sun Nov 24 14:41:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723034715; cv=none; d=zohomail.com; s=zohoarc; b=YEZ2p1e8AN8cDA4dU9r6Zpved0KTJdSGmvkVn4DFPJjduw5oOigPpmKrmkt0DfxJQJfmxOHXK6VhohsctfbNvYpBiNrFc4qqpdAGqcRrsgQLXXN030Thah35iWeWHIYLvrVzsploDOjL6WMjRC3hbkBuPdcgy5IRZwSkIE5vaEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723034715; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jaQO+2U4Q3+FxA+WUglfjEa6HzrZrjuAodkM2Cay3Ww=; b=aMh+1y0sFNUZDoyzhzIOqScE46D/VAXgbqlDH0rTvNJRaB1u3d/umbxC+tATC8afVqIg0KL7LRlhf9e64VZIBU08tfLCr5yr4jDonu+PAp9FNE1UcVaGgyYOo+/N3a+5deRWbpN4q+Rir4ZCt1GkCR1gTFWneKC1tjS7u75PBRM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172303471565358.93948288725437; Wed, 7 Aug 2024 05:45:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbg0j-00083w-5R; Wed, 07 Aug 2024 08:43:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbg0e-0007zI-B3 for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:43:20 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbg0c-0005OY-7L for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:43:20 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2ef2cce8be8so18578631fa.1 for ; Wed, 07 Aug 2024 05:43:17 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf0cc58sm15922573f8f.2.2024.08.07.05.43.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 05:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723034596; x=1723639396; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jaQO+2U4Q3+FxA+WUglfjEa6HzrZrjuAodkM2Cay3Ww=; b=rnHRcneI9cIq9DV4cXcj6D46/dv4vxGRgeaYkWxDCA5khUqiNe50AQsqm+ovR2ZgbR IJQxh4W+AVjD233XFWb//LiTFVcaXt6pH3d7Ch4gkkIgOhIOSWfa/O2c/x/NIGEbePMt OATdXN5ncWmzjZ3M4zcRAN2QScQyAqtNaZWNW3GgxCnzI948aLz4fsFLFCwj88XHK2Xc lkKw9EnGN2q56XktAitJIhFFYCzOXm8IR0SojGb+a3FLnQ4HHexG3csHbxwiQfpDGOvn 2jsoJR1NJNowYZIUFGk0RDdJ6anBQ4uswa6YW4zvBzSLyHkUPtvwNjpnM5ZPL0du6z4J LeFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723034596; x=1723639396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jaQO+2U4Q3+FxA+WUglfjEa6HzrZrjuAodkM2Cay3Ww=; b=Txm6Woab/LqFPr6AMO0r4Hb9ws2OEN8IzqsDXMNhJBdq1xwoORkxwrh+iljn1RDnl1 8vt/xVgcXtZELmR8hPx2CrHJ2AMhZF3X99X7TNyO3RkkvypixVt/l7VU7xHFJ4ZPa3+J aIjEBRlyX8+d23VUAqtaK8CRIbHZGJ20uhs2zJpBIAOqLUM7Eejgq6FbUlax6XOmag9h fNlSLqJBMbnMZM3Q+08OA+QcBftdOEIh/OlP1Jvjk1+rU5OxEAJV8p2dWMyfFSsWFBII pDZpY5UmvWof7rgFnZYvAylHJRA9DFv+lnLHtTbJlfoAHorU9tXLlGFqvifMyF45Cl5n HMQg== X-Gm-Message-State: AOJu0YxmDH2TenTN1dNoX2yg4iT2KyaCNS5ItCHmDomWTkOLojRwEKYx d7fzl3fvz+xg0fiZOhu1x/RUSBsHVI10OfI+ccdD5gNGLW3yzwoBeH8GBao0h+PrJlvJ0c4Vf3g x X-Google-Smtp-Source: AGHT+IFdgiA6JncU5pMswQQfZgXEob1ST9AC/LJ6nEukGJ4a18PDqkyaE7z2anTl9YAnMWgYma/6pw== X-Received: by 2002:a2e:8789:0:b0:2ef:2247:9881 with SMTP id 38308e7fff4ca-2f15ab0416cmr136361881fa.31.1723034595466; Wed, 07 Aug 2024 05:43:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Zach van Rijn , Richard Henderson , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/5] linux-user: Correct print_sockaddr() format Date: Wed, 7 Aug 2024 14:43:02 +0200 Message-ID: <20240807124306.52903-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807124306.52903-1-philmd@linaro.org> References: <20240807124306.52903-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723034717645116600 When the %addr argument can not be accessed, a double comma is logged (the final qemu_log call prepend a comma). Call print_raw_param with last=3D1 to avoid the extra comma. Remove spurious space. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Ilya Leoshkevich --- linux-user/strace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index b4d1098170..73f81e66fc 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -434,9 +434,9 @@ print_sockaddr(abi_ulong addr, abi_long addrlen, int la= st) } unlock_user(sa, addr, 0); } else { - print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 0); + print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 1); } - qemu_log(", "TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last)); + qemu_log(","TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last)); } =20 static void --=20 2.45.2