From f2fcfd98e19231f88d3690892402e112ebfb53cd Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 4 Oct 2019 10:23:46 +0100 Subject: [PATCH] aux/os: Return 'errno' on device open failure --- src/xrt/auxiliary/os/os_hid_hidraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/auxiliary/os/os_hid_hidraw.c b/src/xrt/auxiliary/os/os_hid_hidraw.c index 170c904c9..bce0c1029 100644 --- a/src/xrt/auxiliary/os/os_hid_hidraw.c +++ b/src/xrt/auxiliary/os/os_hid_hidraw.c @@ -122,7 +122,7 @@ os_hid_open_hidraw(const char *path, struct os_hid_device **out_hid) hrdev->fd = open(path, O_RDWR); if (hrdev->fd < 0) { free(hrdev); - return -1; + return -errno; } *out_hid = &hrdev->base;