From patchwork Fri Aug 15 14:25:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24148 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3134CBDCC1 for ; Fri, 15 Aug 2025 14:25:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F29926925A; Fri, 15 Aug 2025 16:25:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ceJF/pe7"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E257369251 for ; Fri, 15 Aug 2025 16:25:25 +0200 (CEST) Received: from pb-laptop.local (185.221.141.188.nat.pool.zt.hu [185.221.141.188]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E498B56D for ; Fri, 15 Aug 2025 16:24:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1755267871; bh=5fWLZ+WyHO8f2nz2P9Yj+205dlEftXbrW2foKAoUBSI=; h=From:To:Subject:Date:From; b=ceJF/pe7awVHnUaYr8sTbKVTNxQ/rVrCnXUg3oQ/xfaC4xjj43e+A2Ct20Q4V8a2a ruE1vQKxvEsO8ErsH1IUt2F9yk7akCLeyaTJrBvq7QcTQdjmg7BhqG+cw9ROGH90U3 tbJOjWMie+vwQ8qEowYU0mIrAw2/Zy7FffrRWZ3k= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1] apps: cam: Do not overwrite name when adding camera model Date: Fri, 15 Aug 2025 16:25:22 +0200 Message-ID: <20250815142522.2237088-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If `addModel` is true, then the previously set `name` will be overwritten. This does not seem to be the intended behaviour, so fix it by using `+=`. Before: Available cameras: 1: 'imx219' (/base/soc@0/bus@30800000/i2c@30a30000/camera@10) After: Available cameras: 1: External camera 'imx219' (/base/soc@0/bus@30800000/i2c@30a30000/camera@10) Fixes: aab49f903e858a ("cam: Do not assume Location is available") Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/apps/cam/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/cam/main.cpp b/src/apps/cam/main.cpp index cbc85b59f..ad6bde68a 100644 --- a/src/apps/cam/main.cpp +++ b/src/apps/cam/main.cpp @@ -322,7 +322,7 @@ std::string CamApp::cameraName(const Camera *camera) */ const auto &model = props.get(properties::Model); if (model) - name = "'" + *model + "' "; + name += "'" + *model + "' "; } name += "(" + camera->id() + ")";