apps: Fix additional open() arguments.

Add missing mode arguments to direct open() calls that use O_CREAT.

Also open the lp503x device with explicit read-only flags instead of O_CREAT, matching the device-node usage.

Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
This commit is contained in:
Nightt 2026-05-19 17:56:09 +08:00 committed by Xiang Xiao
parent 5c703f5603
commit b4f1e29494
12 changed files with 15 additions and 14 deletions

View file

@ -451,7 +451,7 @@ int main(int argc, char *argv[])
cfg.run_duration *= 1000;
bench_fd = open(BENCHMARK_FILE,
O_CREAT | (verify ? O_RDWR : O_WRONLY) | O_TRUNC);
O_CREAT | (verify ? O_RDWR : O_WRONLY) | O_TRUNC, 0666);
if (bench_fd < 0)
{