v4l2: improve error debugging

This commit is contained in:
Wim Taymans 2022-11-03 13:22:38 +01:00
parent 44d743ed95
commit cd9dc974f5

View File

@ -713,7 +713,7 @@ static int v4l2_openat(int dirfd, const char *path, int oflag, mode_t mode)
goto error_unlock;
}
if (file->node == NULL) {
errno = -ENOENT;
errno = ENOENT;
goto error_unlock;
}
pw_thread_loop_unlock(file->loop);
@ -735,6 +735,9 @@ error_unlock:
error:
if (file)
free_file(file);
pw_log_info("path:%s oflag:%d mode:%d -> %d (%s)", path, oflag, mode,
-1, strerror(errno));
return -1;
}