{"id":17717,"url":"https://patchwork.libcamera.org/api/1.1/patches/17717/?format=json","web_url":"https://patchwork.libcamera.org/patch/17717/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221028031726.4849-6-nicholas@rothemail.net>","date":"2022-10-28T03:17:21","name":"[libcamera-devel,v5,05/10] android: remove references to std::filesystem","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"39a0acbe7683c5532be79d0181ca3a1e09bfad14","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/1.1/people/97/?format=json","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17717/mbox/","series":[{"id":3583,"url":"https://patchwork.libcamera.org/api/1.1/series/3583/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3583","date":"2022-10-28T03:17:17","name":"[libcamera-devel,v5,01/10] ipa: workaround libcxx duration limitation","version":5,"mbox":"https://patchwork.libcamera.org/series/3583/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17717/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17717/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6C929BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Oct 2022 03:17:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 186D962FBE;\n\tFri, 28 Oct 2022 05:17:42 +0200 (CEST)","from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com\n\t[IPv6:2607:f8b0:4864:20::22b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA37962FAF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Oct 2022 05:17:34 +0200 (CEST)","by mail-oi1-x22b.google.com with SMTP id r83so4923338oih.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 20:17:34 -0700 (PDT)","from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:293a:90ce:6463:244d])\n\tby smtp.gmail.com with ESMTPSA id\n\tfp19-20020a056870659300b0013626c1a5f6sm1527738oab.10.2022.10.27.20.17.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 27 Oct 2022 20:17:32 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666927062;\n\tbh=sX1r6Ne5eEwF5zJZASR+vpq0X820AepDT5mhE6+pR0Y=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=OIn+8KKqIeBT/PN7e0nMtgIsiX/4ha6MOYBuEI7Vv4FFOSVG6sC7S8NKx+yQQnLEe\n\tleENq5idXatKKJdTwcaYGsmFBDD/mx5xsFI/IFDZXy9Os48VnwOeL6JtoftY+awLaD\n\to5dMmWpa6GmrbGkC7Q/tQ40lFB7RsKpB6c48qWw2EL6YPpBGwvQzjjqp+nvchm2CVY\n\tIptW5GqY4F7FZUbFvJ/+/hwtYeg9YojL6WP9q5l0lNq/QSKP3SSf2rpa8XxtrW0O5y\n\tkklYWABOcKoRHUlGr7nFcZ4VqjiAdMJ3nO/RVLvcPv2R9qskcJ0g67RFi1xTX+grF9\n\tfzvbyzuTcGzZw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rothemail-net.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=ZTPVpdQPJ0vurOhdlddImO+6D58jD4bRP983l5lu4lc=;\n\tb=vgUrq4HdbQvNLcqT0Oa/o0OPhMUjNBuSA/Nx37+VlFrdOCqocB8ClIg+S1tJWjKdbh\n\tTQu7I5xP2El0CozDxo+O8xbaSudyAjIKpPkTO/WM2tZE8RqxRDLFXSAWG7ffF/B7ItPG\n\tzpNN27fyd5dPkFgN+CG1skdHcmScou4+UxT4NztD4XfZZeBwQDkVXOhjNvhK2H6EzxpR\n\trM1MLTwXiRy7kocgp+AAT6XOMhy2zpzWgmeI20SoRohwy6G6ut2T7c4/h6NcWv9TTmrU\n\tW0WGLSPATd0agf77/K+4hFsk8ypGeZHSM26DclrH3EplWI5QwtFhYGyeWe9wwpgPeW9t\n\t+msQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=rothemail-net.20210112.gappssmtp.com\n\theader.i=@rothemail-net.20210112.gappssmtp.com header.b=\"vgUrq4Hd\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ZTPVpdQPJ0vurOhdlddImO+6D58jD4bRP983l5lu4lc=;\n\tb=pFOXFkfbTkJnChb95smCUPRHZ1i9v/OJhRoyun2ZGbmQ2olhQ6OvYdOpFFD4loqwZl\n\twHE5vZEVs7xg1UpyWQcKR4H5XB+jBXmgMshj+BCVb/rcDdytxtFbFExgaBuYH1O+bV+9\n\tqZVOo5saicIXbF412hhxlcs91234U3qMLI9X654ZC7csdQLs0pvZzoRey1uW11JGT+kz\n\tozrVs/L0Wc8glbZUIPvDB7n7zgJuyjd3q4ZtXj4udVM70fAiZMfdvQqh9r0FAz32itnA\n\totgNsaq5YMfIz9LdI+Dxg4Hm3NmHRBMAjjlDAb3eiOo0sRuhwE0ShCtBm2dy75S+7+Dg\n\tR4kA==","X-Gm-Message-State":"ACrzQf0xftdwTrcmA9pAdGgOIkR7s/EkJfbcIUhKKXdGgXrU8P8GTF/y\n\tnajUYCKtOgRmL+OXo7/9jfYtEtThWlb6drT7O38=","X-Google-Smtp-Source":"AMsMyM6GB5Qy4n1T021VviGyKbTAikROTlthHLxCsW/OCVllFKTpF+NeTIqiAUQ1AqMvfEGPzcuMjw==","X-Received":"by 2002:a05:6808:1209:b0:353:92d1:2a0 with SMTP id\n\ta9-20020a056808120900b0035392d102a0mr6863774oil.51.1666927053043; \n\tThu, 27 Oct 2022 20:17:33 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 27 Oct 2022 22:17:21 -0500","Message-Id":"<20221028031726.4849-6-nicholas@rothemail.net>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20221028031726.4849-1-nicholas@rothemail.net>","References":"<20221027224135.348115-1-nicholas@rothemail.net>\n\t<20221028031726.4849-1-nicholas@rothemail.net>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 05/10] android: remove references to\n\tstd::filesystem","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"libcamera-devel@lists.libcamera.org","Cc":"nicholas@rothemail.net","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Nicholas Roth <nicholas@rothemail.net>\n\nAndroid 11's toolchain does not support std::filesystem, but\ncamera_hal_config.cpp currently uses it. Remove references to\nstd::filesystem in order to support Android <= 11.\n\nThis adds a very small difference in behaviour, as File::exist() will\nreturn true for special files (pipes, character or block devices, ...)\nwhile std::filesystem::is_regular_file() doesn't, but I consider this\nto be a corner case that doesn't matter much.\n\nSigned-off-by: Nicholas Roth <nicholas@rothemail.net>\n---\n src/android/camera_hal_config.cpp | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)","diff":"diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp\nindex bacfe4b9..0e7cde63 100644\n--- a/src/android/camera_hal_config.cpp\n+++ b/src/android/camera_hal_config.cpp\n@@ -6,7 +6,6 @@\n  */\n #include \"camera_hal_config.h\"\n \n-#include <filesystem>\n #include <stdlib.h>\n #include <string>\n \n@@ -160,15 +159,15 @@ CameraHalConfig::CameraHalConfig()\n  */\n int CameraHalConfig::parseConfigurationFile()\n {\n-\tstd::filesystem::path filePath = LIBCAMERA_SYSCONF_DIR;\n-\tfilePath /= \"camera_hal.yaml\";\n-\tif (!std::filesystem::is_regular_file(filePath)) {\n+\tstd::string filePath = LIBCAMERA_SYSCONF_DIR \"/camera_hal.yaml\";\n+\n+\tFile file(filePath);\n+\tif (!file.exists()) {\n \t\tLOG(HALConfig, Debug)\n \t\t\t<< \"Configuration file: \\\"\" << filePath << \"\\\" not found\";\n \t\treturn -ENOENT;\n \t}\n \n-\tFile file(filePath);\n \tif (!file.open(File::OpenModeFlag::ReadOnly)) {\n \t\tint ret = file.error();\n \t\tLOG(HALConfig, Error) << \"Failed to open configuration file \"\n","prefixes":["libcamera-devel","v5","05/10"]}