From patchwork Mon Feb 5 16:49:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 10200957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B5B93601A1 for ; Mon, 5 Feb 2018 16:49:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A606D2871B for ; Mon, 5 Feb 2018 16:49:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9865E2877E; Mon, 5 Feb 2018 16:49:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84CD02871B for ; Mon, 5 Feb 2018 16:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753025AbeBEQtL (ORCPT ); Mon, 5 Feb 2018 11:49:11 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:34682 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752925AbeBEQtL (ORCPT ); Mon, 5 Feb 2018 11:49:11 -0500 Received: by mail-wm0-f54.google.com with SMTP id j21-v6so14044534wmh.1 for ; Mon, 05 Feb 2018 08:49:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=F5i14PErTzfJqorYs4PtvWaOEKZoglSMVI7YSZ+TwxE=; b=ffcWBqPHL70jQI37IP0xAwa2yfgSm/2LD5O2fPttakzlpj5ysjsz280X2HD7q+EJ2G wwZyLnO28o9FQ9MQy3BR99Mfoq1iHLTJuG4TPYOXpMNZBZ+Z89MXm6uk3IHGUKIWNpaG wS1aGzHbpLNxVCeWH78Z+Kovd5f+FyJatDPmq+COyqBw+A4HTR9+zPRpsyJBucQ0an61 IlTREtEMo1NEkxiT9tFIO/YrgOUI9mF9VlhLwpdToxs9fFT4Tlgum2MIxrWrIiFe/OU2 NDHI5pyJYU8H+jw4BZR3StIqnsrrzOSlCr4i+r2xvTvtz4Nv9D19xl6G+JT2y55Gnbzq 26Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=F5i14PErTzfJqorYs4PtvWaOEKZoglSMVI7YSZ+TwxE=; b=Kama2eRevZ+DC2/qONVfFOioTYQ9j0Ckj56n44sbk9dxM67zAYIIly7D/+qq1WZbbV J6o5KP8pf5w7YUI3Eld6cVAZKHQYhBrzpsY7FN8GmoVl4eo0hLBsBmJx2OJbb+hyBxmS vagLfeiWF4Cv+UuMxQU3w9JqmKHXeisZliH2Sbae5w17Pl4WT33lFjbi/jWiGSen8dWz OanIQsAOOh654LynPAzHxwgHG2exHDolWoU4rMHBwpAJ98xA5XIJdAlxxQvceWdhQGER ZJHp9lMXSFpQcP07yOEkkVubF+Dd43pLNWtcogfqSa5+5UHVPMD6A7lgCUi65nIMGQwG npAA== X-Gm-Message-State: AKwxytetCGrbR1O+iFzyjGGWYpcb822i7lxU937io32mDIwAQcNZ9Lec UMfXsg35b0lkyFF918o+DWHIsLba5HPJIcXcGI8zfw== X-Google-Smtp-Source: AH8x226B+L+V2XkWzKb+vhZlEEfMH1iIjs6+Nu1LuMYhi928ALrVN2O59ZqVsc+MBDHXWLFLniyCbrWb+f9o00P4IpM= X-Received: by 10.28.153.147 with SMTP id b141mr27781520wme.47.1517849349738; Mon, 05 Feb 2018 08:49:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.66.74 with HTTP; Mon, 5 Feb 2018 08:49:09 -0800 (PST) In-Reply-To: References: From: Tim Harvey Date: Mon, 5 Feb 2018 08:49:09 -0800 Message-ID: Subject: Re: Please help test the new v4l-subdev support in v4l2-compliance To: Hans Verkuil Cc: Linux Media Mailing List , Jacopo Mondi , Laurent Pinchart , Mauro Carvalho Chehab Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Feb 5, 2018 at 8:27 AM, Hans Verkuil wrote: > On 02/05/2018 05:21 PM, Tim Harvey wrote: > > > >> >> I ran a 'make distclean; ./bootstrap.sh && ./configure && make' >> >> last version I built successfully was '1bb8c70 v4l2-ctl: mention that >> --set-subdev-fps is for testing only' > > That's a lot of revisions ago. I've been busy last weekend :-) right... I was up to date Thursday morning! ;) > > Do a new git pull and try again. I remember hitting something similar during > the weekend where I was missing a C++ include. > Yes, I tried that on my x86 dev host - same failure as from my target. >> >> I haven't dug into the failure at all. Are you using something new >> with c++ requiring a new lib or specific version of something that >> needs to be added to configure? > > Nope, bog standard C++. Real C++ pros are probably appalled by the code. > Google to the rescue: The ifstream constructor expects a const char*, so you need to do ifstream file(filename.c_str()); to make it work. the following patch fixes it: Tim diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp index eef743e..39da9b8 100644 --- a/utils/common/media-info.cpp +++ b/utils/common/media-info.cpp @@ -76,7 +76,7 @@ media_type media_detect_type(const char *device) uevent_path += num2s(major(sb.st_rdev), false) + ":" + num2s(minor(sb.st_rdev), false) + "/uevent"; - std::ifstream uevent_file(uevent_path); + std::ifstream uevent_file(uevent_path.c_str()); if (uevent_file.fail()) return MEDIA_TYPE_UNKNOWN; @@ -117,7 +117,7 @@ std::string media_get_device(__u32 major, __u32 minor) sprintf(fmt, "%d:%d", major, minor); uevent_path += std::string(fmt) + "/uevent"; - std::ifstream uevent_file(uevent_path); + std::ifstream uevent_file(uevent_path.c_str()); if (uevent_file.fail()) return "";