From aa4338eed5f6aa7e20fb221b5de675158408da49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Fri, 15 Aug 2025 16:15:08 +0200 Subject: [PATCH] apps: cam: Do not overwrite name when adding camera model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 fa266eca..a1788b7a 100644 --- a/src/apps/cam/main.cpp +++ b/src/apps/cam/main.cpp @@ -337,7 +337,7 @@ std::string CamApp::cameraName(const Camera *camera) */ const auto &model = props.get(properties::Model); if (model) - name = "'" + *model + "' "; + name += "'" + *model + "' "; } name += "(" + camera->id() + ")";