util: Change os_same_file_description return type from bool to int
authorMichel Dänzer <mdaenzer@redhat.com>
Tue, 18 Feb 2020 18:04:00 +0000 (19:04 +0100)
committerMichel Dänzer <michel@daenzer.net>
Fri, 21 Feb 2020 16:10:48 +0000 (17:10 +0100)
commitf5a8958910f53d924d062cbf024cebe4134f757a
tree3f7234ce1e9d46766768fc0b912dce2b895c97a8
parent228cbdfe67e465dc79558fc76a51d8115251b5e5
util: Change os_same_file_description return type from bool to int

This allows communicating that it wasn't possible to determine whether
the two file descriptors reference the same file description. When
that's the case, log a warning in the amdgpu winsys.

In turn, remove the corresponding debugging output from the fallback
os_same_file_description implementation. It depends on the caller if
false negatives are problematic or not.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3879>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3879>
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/util/os_file.c
src/util/os_file.h