[libcamera-devel] [PATCH 05/11] Removes references to std::filesystem, which Android 11's toolchain does not support.
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Oct 24 16:42:38 CEST 2022
Quoting Nicholas Roth via libcamera-devel (2022-10-24 06:55:37)
> From: Nicholas Roth <nicholas at rothemail.net>
>
> ---
> src/android/camera_hal_config.cpp | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
> index bacfe4b9..c06c993d 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 <filesystem>
> #include <stdlib.h>
> #include <string>
>
> @@ -160,13 +159,7 @@ CameraHalConfig::CameraHalConfig()
> */
> int CameraHalConfig::parseConfigurationFile()
> {
> - std::filesystem::path filePath = LIBCAMERA_SYSCONF_DIR;
> - filePath /= "camera_hal.yaml";
> - if (!std::filesystem::is_regular_file(filePath)) {
> - LOG(HALConfig, Debug)
> - << "Configuration file: \"" << filePath << "\" not found";
> - return -ENOENT;
> - }
> + std::string filePath = LIBCAMERA_SYSCONF_DIR "/camera_hal.yaml";
>
> File file(filePath);
Given the above checks if the file is not found, could / should we
replace that with:
if (!file.exists()) {
LOG(HALConfig, Error)
<< "Configuration file: \"" << filePath << "\" not found";
return -ENOENT;
}
here?
> if (!file.open(File::OpenModeFlag::ReadOnly)) {
> --
> 2.34.1
>
More information about the libcamera-devel
mailing list