summaryrefslogtreecommitdiff
path: root/utils/tracepoints
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2021-01-08 17:42:37 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2021-01-13 13:20:06 +0100
commit7415c139cd1cab73fdd91785a7816eab51e7a567 (patch)
treef7f0bc84eaa536e1c7ed7ecf20284545e19023b0 /utils/tracepoints
parent44058f1c68a9789f0e9fbdfcb64d99d6313ed121 (diff)
libcamera: sysfs: Fix directory exists check
The scope of File::exists() was changed to only validate that a file exists and is therefore not usable to check if a directory exists. This breaks the persistent name generation for DT based systems as it uses File::exists() to check for directories, fix this by using stat() directly. On Scarlet the persistent names of the cameras are impacted by this and where incorrectly reported as: $ cam -l Available cameras: 1: Internal front camera (platform/ff160000.i2c/i2c-7/7-003c ov2685) 2: Internal front camera (platform/ff160000.i2c/i2c-7/7-0036 ov5695 While the expected ones are restored with this fix: $ cam -l Available cameras: 1: Internal front camera (/base/i2c@ff160000/camera@3c) 2: Internal front camera (/base/i2c@ff160000/camera@36) Fixes: 8f4e16f014c820a0 ("test: file: Check that directories are not treated as files") Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/tracepoints')
0 files changed, 0 insertions, 0 deletions