From patchwork Thu Aug 29 08:09:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 1881 Return-Path: Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 00DA560BCF for ; Thu, 29 Aug 2019 10:09:36 +0200 (CEST) X-Halon-ID: 5373383e-ca34-11e9-903a-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [46.114.35.223]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 5373383e-ca34-11e9-903a-005056917f90; Thu, 29 Aug 2019 10:09:33 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Thu, 29 Aug 2019 10:09:19 +0200 Message-Id: <20190829080919.16396-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.22.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_device: Fix error messages in setControls() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2019 08:09:37 -0000 The error messages looks copied from getControls() without being updated for the set controls case, fix this. Signed-off-by: Niklas Söderlund Acked-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index f89546610ac69ba0..349bf2d2970418e4 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -287,13 +287,13 @@ int V4L2Device::setControls(V4L2ControlList *ctrls) /* Generic validation error. */ if (errorIdx == 0 || errorIdx >= count) { - LOG(V4L2, Error) << "Unable to read controls: " + LOG(V4L2, Error) << "Unable to set controls: " << strerror(ret); return -EINVAL; } /* A specific control failed. */ - LOG(V4L2, Error) << "Unable to read control " << errorIdx + LOG(V4L2, Error) << "Unable to set control " << errorIdx << ": " << strerror(ret); count = errorIdx - 1; ret = errorIdx;