From patchwork Sun Jan 19 04:41:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 13944348 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15301C02183 for ; Sun, 19 Jan 2025 04:43:11 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tZN7x-0005Ua-N1; Sat, 18 Jan 2025 23:41:37 -0500 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 1tZN7v-0005Tg-R8 for qemu-devel@nongnu.org; Sat, 18 Jan 2025 23:41:35 -0500 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZN7t-0003X2-6d for qemu-devel@nongnu.org; Sat, 18 Jan 2025 23:41:35 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AFEFE5C0703; Sun, 19 Jan 2025 04:40:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FF04C4CED6; Sun, 19 Jan 2025 04:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737261690; bh=f4X9zMW2UNRK6C5YvFLwtVaulKW3SQq3pLWgREWOxYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IlXj4YMi3GNC+fAkbfQNq24x3sxoquhS7S71cXGh7ltGbo5kC+MHF0ghVGzl7NZCD KDEdD7N/zUX+1afSglCPNBFLRRvbJWqidw8zLksrc/xgVRhsisHXvWuen4oHrfp5v6 Qi0zhURDJdvnVqMFwvsvCe7emjgXVZjMjHnJWvZyq/ZL1Rgs+1CBpZf5eQ0NkSJqOV wi/g4n3GXbbhwODwPPbFENh+LpVf1suuTh2FukEU9jaLMTuF2x7/8We6kp5ZYQNviq F5m6dnfyjdzag6uDxe44jjYkkK5fjHsFN/XAid9+Zki2TzlvqLYnfVDpVRs+/CHVdI mZYiyTbUOWGPA== From: deller@kernel.org To: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Laurent Vivier , qemu-devel@nongnu.org, Stefan Hajnoczi Cc: deller@gmx.de Subject: [PATCH v3 2/6] linux-user: Use unique error messages for cmsg parsing Date: Sun, 19 Jan 2025 05:41:18 +0100 Message-ID: <20250119044122.9637-3-deller@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250119044122.9637-1-deller@kernel.org> References: <20250119044122.9637-1-deller@kernel.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2604:1380:4641:c500::1; envelope-from=deller@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.07, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Helge Deller Avoid using the same error message for two different code paths as it complicates determining the one which actually triggered. Signed-off-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 78c7c0b34e..a157abc40c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1827,7 +1827,7 @@ static inline abi_long target_to_host_cmsg(struct msghdr *msgh, *dst = tswap32(*dst); } } else { - qemu_log_mask(LOG_UNIMP, "Unsupported ancillary data: %d/%d\n", + qemu_log_mask(LOG_UNIMP, "Unsupported target ancillary data: %d/%d\n", cmsg->cmsg_level, cmsg->cmsg_type); memcpy(data, target_data, len); } @@ -2049,7 +2049,7 @@ static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh, default: unimplemented: - qemu_log_mask(LOG_UNIMP, "Unsupported ancillary data: %d/%d\n", + qemu_log_mask(LOG_UNIMP, "Unsupported host ancillary data: %d/%d\n", cmsg->cmsg_level, cmsg->cmsg_type); memcpy(target_data, data, MIN(len, tgt_len)); if (tgt_len > len) {