summaryrefslogtreecommitdiff
path: root/src/libcamera/sysfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/sysfs.cpp')
-rw-r--r--src/libcamera/sysfs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
index 3ebe66f8..e9004b2b 100644
--- a/src/libcamera/sysfs.cpp
+++ b/src/libcamera/sysfs.cpp
@@ -70,10 +70,11 @@ std::string charDevPath(const std::string &deviceNode)
std::string firmwareNodePath(const std::string &device)
{
std::string fwPath, node;
+ struct stat st;
/* Lookup for DT-based systems */
node = device + "/of_node";
- if (File::exists(node)) {
+ if (!stat(node.c_str(), &st)) {
char *ofPath = realpath(node.c_str(), nullptr);
if (!ofPath)
return {};