From patchwork Thu Oct 27 22:41:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne via libcamera-devel X-Patchwork-Id: 17707 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 69FE5C3286 for ; Thu, 27 Oct 2022 22:41:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F195C62FBD; Fri, 28 Oct 2022 00:41:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666910512; bh=mEKe8DObtbMqMeq0QJ40bRzbuB1kkOYMwsT2S+BAfQ8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cgvEuKn1SnXleOdySAWDK8FgQENKgspURVWMVxnSx7dmmumplhrGZttez6hebLM81 RP8b5Ix57fYn3y2dwYxw2skL2hlruvFjgWMNGz9Fr4fZYK2FVIpuS+HsJySzAbKJ7j 2IilmklhxYPVbEBN+TwXsIaGYGDSoey2KyJ8R5bpwabOjwXstUfWHFSb8sTlILLFwv 2yd2JI3UjUN+ikByWE7ko7SLwCNGefUm+2zE1Fq8JHZug4kvEje4kjf2krYm7GAZgp /tJ93+fvvHyFU4V4KlOo33VKofIeSa77iUIrK0fr4Y1RGdn6XPTV9gYo8M+q0/0ZaH SxJntTwsh7sIg== Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1A60A62FAF for ; Fri, 28 Oct 2022 00:41:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=rothemail-net.20210112.gappssmtp.com header.i=@rothemail-net.20210112.gappssmtp.com header.b="ETeviXuF"; dkim-atps=neutral Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13ae8117023so4284217fac.9 for ; Thu, 27 Oct 2022 15:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothemail-net.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=qBhDf4OV6leDFFlgV+VCdce9GMxAf96qbwkaTsSXnsg=; b=ETeviXuFhfv7Lwelcv33NjG7NpQ0Ewzl6Umg+I6UOv7Pb2kPMYyx8s6aq0LZKrSAmV vQ1W6GDSBWXEFpM+s1zVVS0iEsx6gmyritk+IMQ75b6hWbnhFHcRTvpy4EsRoYfLoZeO W1wysqHi7pH4KPwhp3PTNei28x+x1W2HvHvilcnXPSgtK8bhACtkFwyNQYu5SKgv+OCv PV0IPFQIZK6S2xg5FoF0hs2QjkqDH8gplHmDcSKCP3dH1JMKMPYz1tqM7XMFObSLbpa0 ZmnyRFXu0OxjCfB6oUgrJsb63yKfmHqLDo10/FucUu29bq1s8Rnh/71eLgDB/Ia6JPca uC/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qBhDf4OV6leDFFlgV+VCdce9GMxAf96qbwkaTsSXnsg=; b=Dc6uAN2JOZ3R3YTPqmKfI99bcuUxQTJgI2Hu9/XlSMXDppglvOEQluYTq9k7WVY9h5 YZwt/npFbCkr7qWdqjX6LbzOzsYbYiuGf0WRaj8joZymSnzrbymcdXd4v9advlSGLQJL czM3jVyRxMYSrTziiKwa1qcaNIK7aZONbu2zjWpjKPCIPOV8/+JfwRfs9cnXXMK8AyMC NKGByuN8g/CpTX+P3v3bIPSdQ2sX0NGzEK+C90CD7Z3iO7eIVaJxFDs7H4aC2UIU8hTZ snlYsTpsfiT3EzTagqq9SRk7AoFwOLA0+3HMdhYCl3/wcjmqPbXZ8F/JvlbMNqAq2nUS Voww== X-Gm-Message-State: ACrzQf3nh538o/30an/ZkOY0cpViYlFCfvg0le2hOUlPuyaE6gq5vXO+ sl9TXhqI7Uy96io1NbaJkrBbkiI1RoGP21x4 X-Google-Smtp-Source: AMsMyM4NfmVmYPvJRhw9zJCJt3VWr5OAZ58XLzI6F5ROeeuWPBpW5oP4+wn9MQS4MX8ISs01Bblp6w== X-Received: by 2002:a05:6870:d14f:b0:13c:673d:6799 with SMTP id f15-20020a056870d14f00b0013c673d6799mr1785508oac.149.1666910503548; Thu, 27 Oct 2022 15:41:43 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:6a4b:7aa7:dda2:75cb]) by smtp.gmail.com with ESMTPSA id r20-20020a056830419400b006619533d1ddsm976825otu.76.2022.10.27.15.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 15:41:43 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 27 Oct 2022 17:41:30 -0500 Message-Id: <20221027224135.348115-6-nicholas@rothemail.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027224135.348115-1-nicholas@rothemail.net> References: <20221027224135.348115-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 05/10] android: remove references to std::filesystem 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-Patchwork-Original-From: Nicholas Roth via libcamera-devel From: Nicolas Dufresne via libcamera-devel Reply-To: libcamera-devel@lists.libcamera.org Cc: nicholas@rothemail.net Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicholas Roth Android 11's toolchain does not support std::filesystem, but camera_hal_config.cpp currently uses it. Remove references to std::filesystem in order to support Android <= 11. This adds a very small difference in behaviour, as File::exist() will return true for special files (pipes, character or block devices, ...) while std::filesystem::is_regular_file() doesn't, but I consider this to be a corner case that doesn't matter much. Signed-off-by: Nicholas Roth --- src/android/.camera_hal_config.cpp.swp | Bin 0 -> 16384 bytes src/android/camera_hal_config.cpp | 9 ++++----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 src/android/.camera_hal_config.cpp.swp diff --git a/src/android/.camera_hal_config.cpp.swp b/src/android/.camera_hal_config.cpp.swp new file mode 100644 index 0000000000000000000000000000000000000000..e6b7220ae345f309242d3d97dd369fe783e65ed6 GIT binary patch literal 16384 zcmeI3TWlOx8OMjVp)92r1zy@baI!}3uI0VhQLAcVTe8<{XVs1E_!2dw)@pX@r)RYPYR0O1|Patvof9IUp z8SmQ81(1-Km44pc*>nA$bG|v>cgFSN@yb#5Kz>xi>n=@u_m-39o45Vr<}cp8Pjfss zSflG#d5Ltnwt1CgT49}Awowqt3saTZYGrQap+d`cxY6XUU*L}h+;fZ;F4awAoqI;X z_soLfSe|QJ1$n8qX0&Ri>on|U-fXw8R%h~iqClbm6zBwv+yl33hek(=q{l$|Ap7|K zl|-6Efkc5sfkc5sfkc5sfkc5sfkc7-BL#x?P1UqCeeb?3dQ$4?{ zugP1YK%zjRK%zjRK%zjRK%zjRK%zjRK%zjRK%&6^paO=aX}6+XTND7m`G4sD|MX5x zdlP&Id<$@3fGIEua^L{C2mJL8P5Tx2C3pcm56*)xfk!|a90LpB6JS61!|j^(d+-i; z3;Z0M180E`2EnC|Y1)^;d2j+82PS)CVqs z*TIY6N$>^mdEkLhgDG%77y(6a0NevEr_es|8u$UY2p$KI0T;}HF>n}Y;GZASv|oT9 zfgge`a0J{3M!^Ue1fK!};4KWmbKu+Ho8WVx4O}n^M!;R*?GJ0(Prw`CIS_z4Fu-xJ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}w+)kHMW|=J(ewe^FH+)`bxlJl9s;lRB zn(N!E!`h;qTs#jZH?nO{rc7G=0d+Kl%q1+LG(7R&@bEgzDV4=K$7I3Hu>;FOUI;aV zts4#=jrULhl~Horo1WcV3s|OkzqFLx=kdkIA&ghZNM&RX<_=IT-7#Vtaz?s zaVM}FHurQ^on5HrM)M;%*UPnFZ#-%m`Tq~XXPt+iOa6a&zW+P;^}hwb0lx+p!6{G# ze}e!19{3)36>NYGsDUG(2tI)S{w}x--UiQuC%`elzLiYskO){iG|UfPOF7r1UxhuM!%Oih(uW2 zH$A%!f7^D1A5N}s|CTu2%_bcecCU!J%k6aqF7#d@cN+nZZY-mg=Z_ufu5;?HujGsScf~z}?3uq^@CDa}&ZB zl_mm!gh9;-9qiCBUE2rmQE#$n5MW!*+pnZ*XQx^sB7_=meJJpMQ&L0PHR)e zMPt3mmFMQm;@m>6I;l+D+tk^^X)$xQb@So0Se^~H<5*&*^>k0ppLpY>s4_I0nn4$Y zFDt@|B%TmHK0UhCjk739v28Cb&VQ;kd$)6 zF-DkFOr7MhWrWx;xqIDi3e|03tPI5eSiKVn1;k_|H@sVh5Oj|+$gFkCp`45A_>sZC z_dBM^eSa81L5DZt^KWn_h8hh*1O)$i&%HA?j=7MJ#&{2#$nYQX@;nq?J+lL!`h;WE PK!gP7+;cZs4r~7c$v(c4 literal 0 HcmV?d00001 diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp index bacfe4b9..0e7cde63 100644 --- a/src/android/camera_hal_config.cpp +++ b/src/android/camera_hal_config.cpp @@ -6,7 +6,6 @@ */ #include "camera_hal_config.h" -#include #include #include @@ -160,15 +159,15 @@ CameraHalConfig::CameraHalConfig() */ int CameraHalConfig::parseConfigurationFile() { - std::filesystem::path filePath = LIBCAMERA_SYSCONF_DIR; - filePath /= "camera_hal.yaml"; - if (!std::filesystem::is_regular_file(filePath)) { + std::string filePath = LIBCAMERA_SYSCONF_DIR "/camera_hal.yaml"; + + File file(filePath); + if (!file.exists()) { LOG(HALConfig, Debug) << "Configuration file: \"" << filePath << "\" not found"; return -ENOENT; } - File file(filePath); if (!file.open(File::OpenModeFlag::ReadOnly)) { int ret = file.error(); LOG(HALConfig, Error) << "Failed to open configuration file "