From patchwork Tue Oct 15 14:02:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2193 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B44961562 for ; Tue, 15 Oct 2019 16:02:14 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 41E8D324; Tue, 15 Oct 2019 16:02:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1571148133; bh=uncwVmLCHmeqp27j2Ov1xeBZ0oNfcfZiPzGsVmcduEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rvjPYVAWhMAo/U3sArCCZW80ueE7QLDuN9gj/M9lhkReruSRPwn9v1fYZzcKauYeq TaTA6TABAeCmvRNX58QLoMi7BTDfIOJ5KtNxISo16MSWcj54BzjG7Ueed8ngunBLhN SZ5MJMN3iqEWT8oDID7lX3DJh7UD9ljFLpfpdqug= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Oct 2019 17:02:07 +0300 Message-Id: <20191015140207.8227-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191015000743.GA5976@bigcity.dyn.berto.se> References: <20191015000743.GA5976@bigcity.dyn.berto.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_device: Print control ID in unknown type log messagge 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: , X-List-Received-Date: Tue, 15 Oct 2019 14:02:14 -0000 When the type of a control enumerated from a V4L2 device is not supported, we log a debug message that mentions the control type. This makes it hard to figure out which control is faulty. Print the control ID instead. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/v4l2_device.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index b47ba448f354..68f2d44d11f4 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -8,11 +8,13 @@ #include "v4l2_device.h" #include +#include #include #include #include #include "log.h" +#include "utils.h" #include "v4l2_controls.h" /** @@ -371,8 +373,9 @@ void V4L2Device::listControls() break; /* \todo Support compound controls. */ default: - LOG(V4L2, Debug) << "Control type '" << ctrl.type - << "' not supported"; + LOG(V4L2, Debug) + << "Control " << utils::hex(ctrl.id) + << " has unsupported type " << ctrl.type; continue; }